The group-housed pigs attacking and daily behaviors detection and tracking based on improved YOLOv5s and DeepSORT

4Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.
Get full text

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.

Cite

CITATION STYLE

APA

Cheng, T., Sun, F., Mao, L., Ou, H., Tu, S., Yuan, F., & Yang, H. (2025). The group-housed pigs attacking and daily behaviors detection and tracking based on improved YOLOv5s and DeepSORT. PLOS ONE, 20(10 October). https://doi.org/10.1371/journal.pone.0334783

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free