Acta Agriculturae Zhejiangensis ›› 2023, Vol. 35 ›› Issue (1): 215-225.DOI: 10.3969/j.issn.1004-1524.2023.01.23

• Biosystems Engineering • Previous Articles     Next Articles

Pig posture detection based on improved YOLOv4 model

LI Bin1(), LIU Dongyang1, SHI Guolong1, MU Jingsheng2, XU Haoran1, GU Lichuan1, JIAO Jun1,*()   

  1. 1. School of Information and Computer, Anhui Agricultural University, Hefei 230036, China
    2. Mengcheng Jinghuimeng Agricultural Science and Technology Development Co., Ltd., Bozhou 233524, Anhui, China
  • Received:2021-06-29 Online:2023-01-25 Published:2023-02-21

Abstract:

In order to improve the speed and performance of pig posture detection in piggery environment, an improved Mini_YOLOv4 model was proposed in the present assay based on YOLOv4 model. Firstly, the feature extraction network of YOLOv4 was changed into lightweight MobileNetV3 network structure to reduce the amount of model parameters. Secondly, the deep separable convolution was used to replace the traditional convolution in the CBL_block1 and CBL_block2 modules of the detection network to avoid the memory shortage and high delay problems caused by the complex model. Finally, the 3×3 convolution at each scale of the original YOLOv4 network was changed into the Inception network structure to improve the accuracy of the model. The performance of the above models was evaluated in the detection of five types of postures of pigs, i.e. stand, sit, lie, ventral and lateral. It was shown that, compared with the YOLOv4 model, the detection accuracy of the proposed Mini_YOLOv4 model was improved by 4.01 percentage points, and its detection speed was almost doubled. In summary, the proposed model could improve the real-time performance and ensure the accuracy of pig posture detection, which could provide technical references for pig behavior identification.

Key words: YOLOv4 model, MobileNetV3 network, pig posture detection

CLC Number: