Detection of Herd Pigs Based on Improved YOLOv5s Model

Authors:
  • JLJianquan Li
    Jianquan Li
  • XWXiao Wu
    Xiao Wu
  • YNYuanlin Ning
    Yuanlin Ning

Abstract
Fast and accurate detection technology for individual pigs raised in herds is crucial for subsequent research on counting and disease surveillance. In this paper, we propose an improved lightweight object detection method based on YOLOv5s to improve the speed and accuracy of detection of herd-raised pigs in real-world and complex environments. Specifically, we first introduce a lightweight feature extraction module called C3S, then replace the original large object detection layer with a small object detection layer at the output (head) of YOLOv5s. Finally, we propose a dual adaptive weighted PAN structure to compensate for the information loss of feature map at the neck of YOLOv5s caused by down sampling. Experiments show that our method has an accuracy rate of 95.2%, a recall rate of 89.1%, a mean Average Precision (mAP) of 95.3%, a model parameter number of 3.64M, a detection speed of 154 frames per second, and a model layer count of 183 layers. Comparing with the original YOLOv5s model and the current state-of-the-art object detection models, our proposed method achieves the best results in terms of mAP and detection speed.

This publication has 9 references indexed in Scilit: