光谱学与光谱分析, 2020, 40 (5): 1588, 网络出版: 2020-12-10  

基于可见光光谱和YOLOv2的生猪饮食行为识别

Recognition of Pig Eating and Drinking Behavior Based on Visible Spectrum and YOLOv2
嵇杨培 1杨颖 1,*刘刚 1,2,3
作者单位
1 中国农业大学信息与电气工程学院, 北京 100083
2 现代精细农业系统集成研究教育部重点实验室, 北京 100083
3 农业部农业信息获取技术重点实验室, 北京 100083
摘要
猪的进食、 饮水行为是评价生猪健康程度最直接的依据, 利用计算机视觉技术实时监控生猪的进食、 饮水等状况对提高生猪养殖福利有重要的意义。 提出一种基于可见光光谱和改进YOLOv2神经网络的生猪进食、 饮水行为识别方法, 该方法在生猪可见光图像序列上构建头颈模型, 结合改进的YOLOv2神经网络实现真实养殖场景中的生猪目标检测, 并利用位置信息对生猪的进食、 饮水行为进行预判断, 对符合判断的图像使用图像处理方法精准判断生猪进食、 饮水行为。 首先在生猪图像序列上构建头颈模型, 利用未被遮挡的头颈作为检测目标, 该模型能有效改善生猪目标检测过程的遮挡问题, 且能够精准定位生猪的头部, 为后续识别进食饮水行为提供辅助。 然后采用国际主流神经网络YOLOv2作为目标检测的基础网络模型, 改进其激活函数, 实现快速精准地生猪目标检测。 在使用网络训练前, 对生猪数据集使用K-means算法进行聚类候选边框, 其mAP值和Recall值相比于最初YOLOv2提高了3.94%和5.3%。 为了增加网络对输入变化或噪声的鲁棒性, 对比使用ReLU, Leaky-ReLU和ELU三个激活函数的性能, 可以发现使用ELU的性能比前两者有明显提高。 将改进后的网络与原YOLOv2, SSD模型以及Faster R-CNN相比, 该模型的mAP值达到90.24%, Recall值达到84.56%, 均优于后三者。 最后利用目标检测得到的生猪头颈位置信息, 对生猪的进食、 饮水行为进行预判断。 当图像中进食、 饮水区域出现生猪时, 对该图进行背景差分法、 形态学运算等处理, 并结合饮水区域停留时间等对生猪的进食、 饮水行为进行更精准判断。 实验表明: 利用该方法判断生猪的进食、 饮水行为, 准确率分别达到94.59%和96.49%, 均优于直接使用传统方法判断的结果, 可应用于实际养殖过程中辅助养殖人员进行生猪管理。
Abstract
The eating and drinking behavior of pigs is the most direct evidence to evaluate the health degree of pigs. Therefore, it is of great significance to use real-time monitoring of the eating and drinking status of pigs by computer vision technology for improving the welfare of pig breeding. This paper proposes a recognition method of pig eating and drinking behavior based on visible spectrum and improved YOLOv2 neural network. The method builds head-neck model on the pig visible spectrum image sequence, making use of improved YOLOv2 neural network to realize target detection in the scene of the real pigsty, then utilizing the output of the position information for preliminary judgment of eating and drinking behavior. Then using traditional image processing methods to make an accurate judgment of pig eating and drinking behavior. First, the head-neck model is constructed in the sequence of pig images, and the unblocked head and neck were used as the detection target. This model can effectively solve the occlusion problem in the pig target detection processing, and can also accurately locate the head of the pig, providing assistance for the subsequent identification of eating and drinking behaviors. Then this paper adopted the international mainstream neural network YOLOv2 as the basic network model for target detection, and improve the activation function to achieve fast and accurate target detection of live pigs. Before network training, the K-means algorithm is used to cluster the target frame of the homemade pig data set. Compared with the initial performance of YOLOv2, the mAP value and the Recall value was improved by 3.94% and 5.3%. In order to increase the robustness of the network-facing input changes or noise, this paper compared the performance of the three activation functions of ReLU, Leaky-ReLU and ELU, and found that the performance of the ELU was significantly different from the former two. Compared with the original YOLOv2 and Faster R-CNN, the target detection model in this paper has a mAP value of 90.24% and a recall value of 84.56%, both of which are better than the latter two. Finally, the pig head-neck position information gets from target detection was used to make the preliminary judgment of eating and drinking behavior. When pigs appeared in the eating and drinking area of the picture, background difference method, morphological calculation and other image processing methods are performed on the picture, and the pig eating and drinking behavior is judged more accurately by combining with the residence time of the drinking area. The experiment shows that: the method used in this paper can be used to judge the eating and drinking behavior with an accuracy of 94.59% and 96.49%, which are better than the results judged by the traditional method directly, and can be applied to assist the management of breeding personnel in the actual breeding process.

嵇杨培, 杨颖, 刘刚. 基于可见光光谱和YOLOv2的生猪饮食行为识别[J]. 光谱学与光谱分析, 2020, 40(5): 1588. Ji Yang-pei, YANG Ying, LIU Gang. Recognition of Pig Eating and Drinking Behavior Based on Visible Spectrum and YOLOv2[J]. Spectroscopy and Spectral Analysis, 2020, 40(5): 1588.

关于本站 Cookie 的使用提示

中国光学期刊网使用基于 cookie 的技术来更好地为您提供各项服务,点击此处了解我们的隐私策略。 如您需继续使用本网站,请您授权我们使用本地 cookie 来保存部分信息。
全站搜索
您最值得信赖的光电行业旗舰网络服务平台!