The group-housed pigs attacking and daily behaviors detection and tracking based on improved YOLOv5s and DeepSORT
Tianyu Cheng, Fujie Sun, Liang Mao, Haoxuan Ou, Shuqin Tu, Yuan Fang, Hairan Yang
Jiangxi College of Applied Technology · South China Agricultural University
Key points
From the paper's conclusion- These experiments demonstrate that the improved YOLOv5s and DeepSORT achieves high accuracy for both pig detection and behavior tracking.
Abstract
Automatic detection and tracking of pig behaviors through video surveillance remain challenges due to farm demanding conditions, e.g., illumination conditions and occlusion of one pig from another. The main goal of this study is to develop a deep learning method based on the improved YOLOv5s and DeepSORT to detect and track the behaviors of pigs, which has the advantages of stability and high accuracy. Firstly, YOLOv5s with the attention mechanism is used for pig detection and behavior recognition. To deal with the missed detection and false detection due to occlusion and overlapping between pigs and pigs, the improved YOLOv5s adopts the Shape-IoU to optimize the bounding box regression loss function, which improves the robustness of the model. Then, the improved DeepSORT model is proposed to track each pig behaviors including eat, stand, lie and attack four behavior types. Finally, we conduct a comparison test under different lighting and density conditions for pig detection and behavior tracking on special dataset. Experimental results show that the mAP@0.5% of improved YOLOv5s algorithm increases from 92.7% to 99.3%, which means 6.6% accuracy improvement compared with the YOLOv5s model. In terms of tracking, the values of MOTA and MOTP in all test videos are 94.5% and 94.9% respectively. These experiments demonstrate that the improved YOLOv5s and DeepSORT achieves high accuracy for both pig detection and behavior tracking. The proposed approach provides scalable technical support for contactless automatic pig monitoring.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- DWEC-YOLO: A Multi-Behavior Detection Model for Group-Housed Pigs.Animals : an open access journal from MDPI · 2026
- A Multi-Object Tracking Method for Pigs Based on Oriented Bounding Box Detection.Animals : an open access journal from MDPI · 2026
- A Fine-Grained Pig Behavior Recognition Method Based on an Improved YOLOv8n Network.Animals : an open access journal from MDPI · 2026
- Benchmarking pig detection and tracking under diverse and challenging conditionsComputers and Electronics in Agriculture · 2025
- PigTracker: Sequential-vertices-based tracking framework for intelligent pig farmingComputers and Electronics in Agriculture · 2026
- Deep learning for visual animal monitoring (detection, tracking, pose estimation, and behavior classification): A comprehensive reviewSmart Agricultural Technology · 2025