Li Guangbo, Sun Jiayong, Guan Manyu, Sun Shuai, Shi Guolong, Zhu Changjie
College of Electronic and Information Engineering, Huaibei Institute of Technology, Huaibei 235000, China.
School of Economics and Management, Huaibei Institute of Technology, Huaibei 235000, China.
Animals (Basel). 2024 Aug 24;14(17):2464. doi: 10.3390/ani14172464.
The method proposed in this paper provides theoretical and practical support for the intelligent recognition and management of beef cattle. Accurate identification and tracking of beef cattle behaviors are essential components of beef cattle production management. Traditional beef cattle identification and tracking methods are time-consuming and labor-intensive, which hinders precise cattle farming. This paper utilizes deep learning algorithms to achieve the identification and tracking of multi-object behaviors in beef cattle, as follows: (1) The beef cattle behavior detection module is based on the YOLOv8n algorithm. Initially, a dynamic snake convolution module is introduced to enhance the ability to extract key features of beef cattle behaviors and expand the model's receptive field. Subsequently, the BiFormer attention mechanism is incorporated to integrate high-level and low-level feature information, dynamically and sparsely learning the behavioral features of beef cattle. The improved YOLOv8n_BiF_DSC algorithm achieves an identification accuracy of 93.6% for nine behaviors, including standing, lying, mounting, fighting, licking, eating, drinking, working, and searching, with average 50 and 50:95 precisions of 96.5% and 71.5%, showing an improvement of 5.3%, 5.2%, and 7.1% over the original YOLOv8n. (2) The beef cattle multi-object tracking module is based on the Deep SORT algorithm. Initially, the detector is replaced with YOLOv8n_BiF_DSC to enhance detection accuracy. Subsequently, the re-identification network model is switched to ResNet18 to enhance the tracking algorithm's capability to gather appearance information. Finally, the trajectory generation and matching process of the Deep SORT algorithm is optimized with secondary IOU matching to reduce ID mismatching errors during tracking. Experimentation with five different complexity levels of test video sequences shows improvements in IDF1, IDS, MOTA, and MOTP, among other metrics, with IDS reduced by 65.8% and MOTA increased by 2%. These enhancements address issues of tracking omission and misidentification in sparse and long-range dense environments, thereby facilitating better tracking of group-raised beef cattle and laying a foundation for intelligent detection and tracking in beef cattle farming.
本文提出的方法为肉牛的智能识别与管理提供了理论和实践支持。准确识别和跟踪肉牛行为是肉牛生产管理的重要组成部分。传统的肉牛识别和跟踪方法既耗时又费力,这阻碍了精准养殖。本文利用深度学习算法实现对肉牛多目标行为的识别与跟踪,具体如下:(1)肉牛行为检测模块基于YOLOv8n算法。首先,引入动态蛇形卷积模块,以增强提取肉牛行为关键特征的能力,并扩大模型的感受野。随后,融入BiFormer注意力机制,整合高级和低级特征信息,动态且稀疏地学习肉牛的行为特征。改进后的YOLOv8n_BiF_DSC算法对站立、躺卧、爬跨、打斗、舔舐、进食、饮水、劳作和搜寻这九种行为的识别准确率达到93.6%,平均50和50:95精度分别为96.5%和71.5%,相较于原始的YOLOv8n分别提高了5.3%、5.2%和7.1%。(2)肉牛多目标跟踪模块基于Deep SORT算法。首先,将检测器替换为YOLOv8n_BiF_DSC以提高检测精度。随后,将重识别网络模型切换为ResNet18,以增强跟踪算法收集外观信息的能力。最后,通过二次交并比匹配优化Deep SORT算法的轨迹生成和匹配过程,以减少跟踪过程中的ID错配错误。对五个不同复杂度水平的测试视频序列进行实验,结果显示在IDF1、IDS、MOTA和MOTP等指标上均有提升,其中IDS降低了65.8%,MOTA提高了2%。这些改进解决了稀疏和远距离密集环境中的跟踪遗漏和误识别问题,从而便于更好地跟踪群体饲养的肉牛,并为肉牛养殖中的智能检测和跟踪奠定基础。