Detecting herd pigs using multi-scale fusion attention mechanism

被引:0
作者
Lin H. [1 ]
Zhang K. [1 ]
Li H. [1 ]
Liu Y. [1 ]
Chen Z. [1 ]
Ma Q. [1 ]
机构
[1] College of Information and ELectrical Engineering, China Agricultural University, Beijing
来源
Nongye Gongcheng Xuebao/Transactions of the Chinese Society of Agricultural Engineering | 2023年 / 39卷 / 21期
关键词
attention mechanism; image recognition; machine vision; multi-target tracking; pig counting; small object detection; YOLOv7;
D O I
10.11975/j.issn.1002-6819.202306166
中图分类号
学科分类号
摘要
Target detection has been widely applied to many scenarios in daily life, including people flow management, items counting, and object searching. Deep learning has also effectively improved the accuracy of target detection in recent years. Therefore, target detection can be expected to improve the efficiency of intelligent management in the livestock industry, such as pig farms. Daily population counting has been one of the most important steps in modern pig farms, such as target tracking and behavior recognition. However, the small targets or occluded pigs are difficult to accurately detect during counting. In this study, an accurate and rapid detection of the pig population was proposed to treat the small targets and occlusion in the dataset using a multi-scale fusion attention mechanism. YOLOpig network was constructed to detect the individual pig target using YOLOv7. Then, the scale network structure was proposed to enhance the detection of small targets. The residual thought of network structure was used to improve the convolution module for the high accuracy of the experiments. A parameter-free attention mechanism was also added to reduce the network weights while accelerating the detection speed. GradCAM was used for the feature visualization to verify the effectiveness of the experimental feature extraction. Finally, target tracking (StrongSORT) was adopted to accurately track the individual IDs of the pigs that were detected by the improved model, providing the identity information required for pig detection tasks. Experiments were conducted to verify the accuracy and real-time performance of the improved model on Large White pigs in the fattening stage. A series of experiments were conducted, including model ablation, model comparison, pig feature information extraction, and tracking. The effectiveness and feasibility of the models were verified to detect the pig groups. The great potential was obtained to solve the difficulties and challenges in pig population counting, providing important support in the agricultural breeding field. The experimental results show that the accuracy, recall, and average accuracy of the counting were 90.4%, 85.5%, and 92.4%, respectively. Furthermore, the average accuracy and the detection speed were improved by 5.1 percentage points and 7.14%, respectively, compared with the basic YOLOv7 model. The average accuracies of the YOLOv5, YOLOv7tiny, and YOLOv8n models were also improved by 12.1, 16.8, and 5.7 percentage points, respectively. Specifically, the pig population counting with a multi-scale fusion attention mechanism can be expected to rapidly and accurately complete the counting task, and then effectively deal with small targets and occlusion. The widespread application of the improved model can greatly contribute to the operational efficiency of pig farms for labor cost-saving, in order to promote the development of intelligent technology in the field of agricultural breeding. The more accurate and efficient counting of pigs can provide strong technical support for the field of agricultural breeding and intelligent farming. © 2023 Chinese Society of Agricultural Engineering. All rights reserved.
引用
收藏
页码:188 / 195
页数:7
相关论文
共 31 条
[1]  
BAO J, XIE Q., Artificial intelligence in animal farming: A systematic literature review, Journal of Cleaner Production, 331, (2022)
[2]  
TENG Guanghui, JI Hengyi, ZHUANG Yanrong, Et al., Research progress of deep learning in the process of pig feeding, Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 38, 14, pp. 235-249, (2022)
[3]  
HE Dongjian, MENG Fanchang, ZHAO Kaixuan, Et al., Recognition of calf basic behaviors based on video analysis, Transactions of the Chinese Society for Agricultural Machinery, 47, 9, pp. 294-300, (2016)
[4]  
FANG C, ZHANG T, ZHENG H, Et al., Pose estimation and behavior classification of broiler chickens based on deep neural networks, Computers and Electronics in Agriculture, 180, (2021)
[5]  
WEN Changji, ZHANG Xiaoran, WU Jianshuang, Et al., Pig facial expression recognition using multi-attention cascaded LSTM model, Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 37, 12, pp. 181-190, (2021)
[6]  
YANG Q, XIAO D, LIN S., Feeding behavior recognition for group-housed pigs with the Faster R-CNN, Computers and Electronics in Agriculture, 155, pp. 453-460, (2018)
[7]  
LIU R, WANG J, ZHAO L, Et al., Internet of things: Application and prospect, Matec Web of Conferences, 100, (2017)
[8]  
CHEN C, ZHU W, NORTON T., Behaviour recognition of pigs and cattle: Journey from computer vision to deep learning, Computers and Electronics in Agriculture, 187, (2021)
[9]  
SUN L, CHEN S, LIU T, Et al., Pig target tracking algorithm based on multi-channel color feature fusion, International Journal of Agricultural and Biological Engineering, 13, 3, pp. 180-185, (2020)
[10]  
LI B, LIU L, SHEN M, Et al., Group-housed pig detection in video surveillance of overhead views using multi-feature template matching, Biosystems Engineering, 181, pp. 28-39, (2019)