Pig Counting Algorithm Based on Improved YOLO v5n

被引:0
作者
Yang Q. [1 ,2 ]
Chen M. [1 ,2 ]
Huang Y. [1 ,2 ]
Xiao D. [1 ,2 ]
Liu Y. [1 ,2 ]
Zhou J. [1 ,2 ]
机构
[1] College of Mathematics and Informatics, South China Agricultural University, Guangzhou
[2] Key Laboratory of Smart Agricultural Technology in Tropical South China, Ministry of Agriculture and Rural Affairs, Guangzhou
来源
Nongye Jixie Xuebao/Transactions of the Chinese Society for Agricultural Machinery | 2023年 / 54卷 / 01期
关键词
attention mechanism; multi-scale perception; object detection; pig counting;
D O I
10.6041/j.issn.1000-1298.2023.01.025
中图分类号
学科分类号
摘要
Pig counting is an important part in large-scale farming, which provides the basis for precise pig feeding and asset management. Manual counting is both time-consuming and inefficient, more than error-prone. In recent years, as the performance of deep learning systems far outperforms traditional machine learning systems, deep learning-based methods have demonstrated state-of-the-art performance in tasks such as image classification, segmentation, and object detection. Although there are currently existing intelligent pig counting algorithms based on deep learning, the counting accuracy is low in complex scenes such as occlusion and different illumination. So as to increase the accuracy of pig counting in complex scenarios, a pig counting algorithm was proposed based on improved YOLO v5n. Starting from improving the performance of pig target detection, the algorithm constructed a multi-scene pig dataset. In the field of target detection, each target was surrounded by the surrounding background, and the environment around the target object had rich contextual information. However, in the deep convolutional neural network, although the convolutional layer can capture the features of the image from the global receptive field to describe the image, it essentially only modeled the spatial information of the image without modeling the information between channels. By introducing the SE - Net channel attention module into the Backbone network, the model was guided to place greater emphasis on the channel features of the pig target information under occlusion conditions, so that it can better locate the features to be detected and enhance the network performance. At the same time, there may be pig targets of various scales in an actual picture of a dense scene of a pig farm. In order to deal with the complex and densely occluded actual production pig farm scene and obtain more abundant and comprehensive feature information, a detection layer was added based on the original three detection layers of different scales for multi-scale feature detection, so as to better learn the multi-level features of the occlusion target and improve the detection performance of model complex occlusion scenes. Finally, the loss function of the boundary box and the non-maximum suppression processing were improved to make the model have better recognition effect on the occluded targets. According to experimental results, in contrast with the original YOLO v5n algorithm, the mean absolute error (MAE), root mean square error (RMSE) and missed detection rate of the improved algorithm were reduced by 0.509, 0.708 and 3.02 percentage points, respectively, and the average precision (AP) was improved by 1. 62 percentage points to 99. 39% . The improved algorithm had high accuracy and good robustness in complex occlusion overlapping scenarios. Compared with other pig inventory algorithms; CClusnet, CCNN and PCN, the MAE of this algorithm was 0. 173, which was 0.257, 1.497 and 1.567 lower than that of the other three algorithms. In terms of time performance, it only took 0. 056 s to recognize a single image on average, satisfying the real-time requirements of actual pig farm production. © 2023 Chinese Society of Agricultural Machinery. All rights reserved.
引用
收藏
页码:251 / 262
页数:11
相关论文
共 44 条
[1]  
KAMILARIS A, PRENAFETA-BOLDU F X., Deep learning in agriculture
[2]  
a survey [J], Computers and Electronics in Agriculture, 147, 1, pp. 70-90, (2018)
[3]  
ZHANG Tianhao, LIANG Yansen, HE Zhiyi, Applying image recognition and counting to reserved live pigs statistics [J], Computer Applications and Software, 33, 12, pp. 173-178, (2016)
[4]  
LIANG Yansen, ZHANG Tianhao, HE Zhiyi, A remote image acquisition and target counting system for livestock farm [J], Journal of Guilin University of Electronic Technology, 37, 6, pp. 437-441, (2017)
[5]  
ZHANG Hongming, FU Zhenyu, HAN Wenting, Et al., Detection method of maize seedling number based on improved YOLOv [J], Transactions of the Chinese Society for Agricultural Machinery, 52, 4, pp. 221-229, (2021)
[6]  
ONORO-RUBIO D, LOPEZ-SASTRE R J., Towards perspective-free object counting with deep learning [C], European Conference on Computer Vision, pp. 615-629, (2016)
[7]  
XU M, GE Z, JIANG X, Et al., Depth information guided crowd counting for complex crowd scenes, Pattern Recognition Letters, 125, pp. 563-569, (2019)
[8]  
CHEN S W, SHIVAKUMAR S S, DCUNHA S, Et al., Counting apples and oranges with deep learning: a data-driven approach, IEEE Robotics and Automation Letters, 2, 2, pp. 781-788, (2017)
[9]  
TIAN M, GUO H, CHEN H, Et al., Automated pig counting using deep le arning[J], Computers and Electronics in Agriculture, 163, (2019)
[10]  
GAO Yun, LI Jing, YU Mei, Et al., High-density pig counting net hased on multi-scale aware, Transactions of the Chinese Society for Agricultural Machinery, 52, 9, pp. 172-178, (2021)