|
|
|
|
|
|
Recognition of Pig Eating and Drinking Behavior Based on Visible Spectrum and YOLOv2 |
JI Yang-pei1, YANG Ying1*, LIU Gang1,2,3 |
1. College of Information and Electrical Engineering, China Agricultural University, Beijing 100083, China
2. Key Laboratory of Modern Precision Agriculture System Integration Research, Ministry of Education, Beijing 100083, China
3. Key Laboratory of Agricultural Information Acquisition Technology, Ministry of Agriculture, Beijing 100083, China |
|
|
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.
|
Received: 2019-04-11
Accepted: 2019-08-27
|
|
Corresponding Authors:
YANG Ying
E-mail: hbxtyy@126.com
|
|
[1] Maselyne J, Adriaens I, Huybrechts T, et al. Animal, 2016, 10(09): 1557.
[2] Brownbrandl T M, Rohrer G A, Eigenberg R A. Computers & Electronics in Agriculture, 2013, 96(6): 246.
[3] Roland L, Lidauer L, Sattlecker G, et al. Computers & Electronics in Agriculture, 2018, 145: 298.
[4] Jinseong K, Yeonwoo C, Younchang C, et al. Sensors, 2017, 17(12): 2757.
[5] YANG Qiu-mei, XIAO De-qin, ZHANG Gen-xing(杨秋妹,肖德琴,张根兴). Transactions of the Chinese Society for Agricultural Machinery(农业机械学报), 2018, 49(6): 232.
[6] Mohammadamin K, Claudia B, Sara A H, et al. Computers & Electronics in Agriculture, 2013, 90: 164.
[7] Redmon J, Farhadi A. IEEE Conference on Computer Vision and Pattern Recognition. 2017. 6517.
[8] Zhang X. Computer Assisted Surgery, 2017, 22(Sup1): 1.
[9] Cai B, Xu X, Jia K, et al. IEEE Transactions on Image Processing, 2016, 25(11): 5187.
[10] Ma K, Liu W, Zhang K, et al. IEEE Transactions on Image Processing, 2018, 99: 1.
[11] Xu J, Denman S, Sridharan S, et al. IEEE Transactions on Circuits and Systems for Video Technology, 2015, 25(6): 1063. |
[1] |
GAO Feng1, 2, XING Ya-ge3, 4, LUO Hua-ping1, 2, ZHANG Yuan-hua3, 4, GUO Ling3, 4*. Nondestructive Identification of Apricot Varieties Based on Visible/Near Infrared Spectroscopy and Chemometrics Methods[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(01): 44-51. |
[2] |
YANG Guang1, JIN Chun-bai1, REN Chun-ying2*, LIU Wen-jing1, CHEN Qiang1. Research on Band Selection of Visual Attention Mechanism for Object
Detection[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(01): 266-274. |
[3] |
WU Hu-lin1, DENG Xian-ming1*, ZHANG Tian-cai1, LI Zhong-sheng1, CEN Yi2, WANG Jia-hui1, XIONG Jie1, CHEN Zhi-hua1, LIN Mu-chun1. A Revised Target Detection Algorithm Based on Feature Separation Model of Target and Background for Hyperspectral Imagery[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(01): 283-291. |
[4] |
WANG Yu-chen1, 2, KONG Ling-qin1, 2, 3*, ZHAO Yue-jin1, 2, 3, DONG Li-quan1, 2, 3*, LIU Ming1, 2, 3, HUI Mei1, 2. Hyperspectral Reconstruction From RGB Images for Tissue Oxygen
Saturation Assessment[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(10): 3193-3201. |
[5] |
YE Wen-chao1, LUO Shui-yang1, LI Jin-hao1, LI Zhao-rong1, FAN Zhi-wen1, XU Hai-tao1, ZHAO Jing1, LAN Yu-bin1, 2, DENG Hai-dong1*, LONG Yong-bing1, 2, 3*. Research on Classification Method of Hybrid Rice Seeds Based on the Fusion of Near-Infrared Spectra and Images[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(09): 2935-2941. |
[6] |
CHEN Chao-yang1, 2, LIU Cui-hong1, 2, LI Zhi-bin3, Andy Hsitien Shen1, 2*. Alexandrite Effect Origin of Gem Grade Diaspore[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(08): 2557-2562. |
[7] |
LI Shu-fei1, LI Kai-yu1, QIAO Yan2, ZHANG Ling-xian1*. Cucumber Disease Detection Method Based on Visible Light Spectrum and Improved YOLOv5 in Natural Scenes[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(08): 2596-2600. |
[8] |
TANG Ting, PAN Xin*, LUO Xiao-ling, GAO Xiao-jing. Fusion of ConvLSTM and Multi-Attention Mechanism Network for
Hyperspectral Image Classification[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(08): 2608-2616. |
[9] |
MAO Yi-lin1, LI He1, WANG Yu1, FAN Kai1, SUN Li-tao2, WANG Hui3, SONG Da-peng3, SHEN Jia-zhi2*, DING Zhao-tang1, 2*. Quantitative Judgment of Freezing Injury of Tea Leaves Based on Hyperspectral Imaging[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(07): 2266-2271. |
[10] |
ZHANG Jing, GUO Zhen, WANG Si-hua, YUE Ming-hui, ZHANG Shan-shan, PENG Hui-hui, YIN Xiang, DU Juan*, MA Cheng-ye*. Comparison of Methods for Water Content in Rice by Portable Near-Infrared and Visible Light Spectrometers[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(07): 2059-2066. |
[11] |
LI Kai-yu1, ZHANG Hui2, MA Jun-cheng3, ZHANG Ling-xian1*. Segmentation Method for Crop Leaf Spot Based on Semantic Segmentation and Visible Spectral Images[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(04): 1248-1253. |
[12] |
LIU Si-qi1, FENG Guo-hong1*, TANG Jie2, REN Jia-qi1. Research on Identification of Wood Species by Mid-Infrared Spectroscopy Based on CA-SDP-DenseNet[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(03): 814-822. |
[13] |
LENG Si-yu1, 2, QIAO Jia-hui1, WANG Lian-qing3, WANG Jun1, 2*, ZOU Liang1. Rapid Qualitative Analysis of Wool Content Based on Improved
U-Net++ and Near-Infrared Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(01): 303-309. |
[14] |
FU Peng-you1, 2, WEN Yue2, ZHANG Yu-ke3, LI Ling-qiao1*, YANG Hui-hua1, 2*. Deep Learning Modelling and Model Transfer for Near-Infrared Spectroscopy Quantitative Analysis[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(01): 310-319. |
[15] |
CUI De-jian1, LIU Yang-yang1, XIA Yuan-tian1, JIA Wei-e1, LIAN Zheng-xing2, LI Lin1*. Non-Destructive Detection of Egg Fertilization Status Based on Hyperspectral Diffuse Reflectance[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2022, 42(12): 3685-3691. |
|
|
|
|