Tu Shuqin, Du Jiaying, Liang Yun, Cao Yuefei, Chen Weidian, Xiao Deqin, Huang Qiong
College of Mathematics and Informatics, South China Agricultural University, Guangzhou 510642, China.
Guangzhou Key Laboratory of Intelligent Agriculture, Guangzhou 510000, China.
Animals (Basel). 2024 Sep 30;14(19):2828. doi: 10.3390/ani14192828.
Smart farming technologies to track and analyze pig behaviors in natural environments are critical for monitoring the health status and welfare of pigs. This study aimed to develop a robust multi-object tracking (MOT) approach named YOLOv8 + OC-SORT(V8-Sort) for the automatic monitoring of the different behaviors of group-housed pigs. We addressed common challenges such as variable lighting, occlusion, and clustering between pigs, which often lead to significant errors in long-term behavioral monitoring. Our approach offers a reliable solution for real-time behavior tracking, contributing to improved health and welfare management in smart farming systems. First, the YOLOv8 is employed for the real-time detection and behavior classification of pigs under variable light and occlusion scenes. Second, the OC-SORT is utilized to track each pig to reduce the impact of pigs clustering together and occlusion on tracking. And, when a target is lost during tracking, the OC-SORT can recover the lost trajectory and re-track the target. Finally, to implement the automatic long-time monitoring of behaviors for each pig, we created an automatic behavior analysis algorithm that integrates the behavioral information from detection and the tracking results from OC-SORT. On the one-minute video datasets for pig tracking, the proposed MOT method outperforms JDE, Trackformer, and TransTrack, achieving the highest HOTA, MOTA, and IDF1 scores of 82.0%, 96.3%, and 96.8%, respectively. And, it achieved scores of 69.0% for HOTA, 99.7% for MOTA, and 75.1% for IDF1 on sixty-minute video datasets. In terms of pig behavior analysis, the proposed automatic behavior analysis algorithm can record the duration of four types of behaviors for each pig in each pen based on behavior classification and ID information to represent the pigs' health status and welfare. These results demonstrate that the proposed method exhibits excellent performance in behavior recognition and tracking, providing technical support for prompt anomaly detection and health status monitoring for pig farming managers.
在自然环境中跟踪和分析猪行为的智能养殖技术对于监测猪的健康状况和福利至关重要。本研究旨在开发一种强大的多目标跟踪(MOT)方法,即YOLOv8 + OC-SORT(V8-Sort),用于自动监测群养猪的不同行为。我们解决了诸如光照变化、遮挡以及猪之间的聚集等常见挑战,这些挑战通常会在长期行为监测中导致重大误差。我们的方法为实时行为跟踪提供了可靠的解决方案,有助于改善智能养殖系统中的健康和福利管理。首先,YOLOv8用于在光照变化和遮挡场景下对猪进行实时检测和行为分类。其次,OC-SORT用于跟踪每头猪,以减少猪聚集在一起和遮挡对跟踪的影响。并且,当跟踪过程中目标丢失时,OC-SORT可以恢复丢失的轨迹并重新跟踪目标。最后,为了实现对每头猪行为的自动长期监测,我们创建了一种自动行为分析算法,该算法整合了检测到的行为信息和OC-SORT的跟踪结果。在用于猪跟踪的一分钟视频数据集上,所提出的MOT方法优于JDE、Trackformer和TransTrack,分别获得了最高的HOTA、MOTA和IDF1分数,分别为82.0%、96.3%和96.8%。并且,在六十分钟视频数据集上,它的HOTA分数为69.0%,MOTA分数为99.7%,IDF1分数为75.1%。在猪行为分析方面,所提出的自动行为分析算法可以根据行为分类和ID信息记录每栏中每头猪四种行为的持续时间,以表示猪的健康状况和福利。这些结果表明,所提出的方法在行为识别和跟踪方面表现出色,为养猪场管理人员进行及时的异常检测和健康状况监测提供了技术支持。