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,
Fang Yuan and
Hairan Yang
PLOS ONE, 2025, vol. 20, issue 10, 1-17
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.
Date: 2025
References: View complete reference list from CitEc
Citations:
Downloads: (external link)
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0334783 (text/html)
https://journals.plos.org/plosone/article/file?id= ... 34783&type=printable (application/pdf)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:plo:pone00:0334783
DOI: 10.1371/journal.pone.0334783
Access Statistics for this article
More articles in PLOS ONE from Public Library of Science
Bibliographic data for series maintained by plosone ().