Agriculture (Oct 2024)

PDC-YOLO: A Network for Pig Detection under Complex Conditions for Counting Purposes

  • Peitong He,
  • Sijian Zhao,
  • Pan Pan,
  • Guomin Zhou,
  • Jianhua Zhang

DOI
https://doi.org/10.3390/agriculture14101807
Journal volume & issue
Vol. 14, no. 10
p. 1807

Abstract

Read online

Pigs play vital roles in the food supply, economic development, agricultural recycling, bioenergy, and social culture. Pork serves as a primary meat source and holds extensive applications in various dietary cultures, making pigs indispensable to human dietary structures. Manual pig counting, a crucial aspect of pig farming, suffers from high costs and time-consuming processes. In this paper, we propose the PDC-YOLO network to address these challenges, dedicated to detecting pigs in complex farming environments for counting purposes. Built upon YOLOv7, our model incorporates the SPD-Conv structure into the YOLOv7 backbone to enhance detection under varying lighting conditions and for small-scale pigs. Additionally, we replace the neck of YOLOv7 with AFPN to efficiently fuse features of different scales. Furthermore, the model utilizes rotated bounding boxes for improved accuracy. Achieving a mAP of 91.97%, precision of 95.11%, and recall of 89.94% on our collected pig dataset, our model outperforms others. Regarding technical performance, PDC-YOLO exhibits an error rate of 0.002 and surpasses manual counting significantly in speed.

Keywords