浙江农业学报 ›› 2023, Vol. 35 ›› Issue (1): 215-225.DOI: 10.3969/j.issn.1004-1524.2023.01.23

• 生物系统工程 • 上一篇    下一篇

基于改进YOLOv4模型的群养生猪姿态检测

李斌1(), 刘东阳1, 时国龙1, 慕京生2, 徐浩然1, 辜丽川1, 焦俊1,*()   

  1. 1.安徽农业大学 信息与计算机学院,安徽 合肥 230036
    2.蒙城县京徽蒙农业科技发展有限公司,安徽 亳州 233524
  • 收稿日期:2021-06-29 出版日期:2023-01-25 发布日期:2023-02-21
  • 通讯作者: *焦俊,E-mail:jiaojun2000@sina.com.cn
  • 作者简介:李斌(1996—),男,安徽阜阳人,硕士研究生,研究方向为模式识别。E-mail:735438610@qq.com
  • 基金资助:
    安徽省科技重大专项(201903a06020009)

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

摘要:

为了提升猪舍环境下生猪姿态检测的速度和性能,在YOLOv4模型的基础上提出一种改进的Mini_YOLOv4模型。首先,该模型将YOLOv4的特征提取网络改为轻量级的MobileNetV3网络结构,以降低模型参数量;其次,在检测网络的CBL_block1、CBL_block2模块中使用深度可分离卷积代替传统卷积,避免了复杂模型导致的内存不足和高延迟问题;最后,将原YOLOv4网络每个尺度的最后一层3×3卷积改为Inception网络结构,以提高模型在生猪姿态检测上的准确率。应用上述模型,对生猪的站立、坐立、腹卧、趴卧和侧卧5类姿态进行识别。结果显示, Mini_YOLOv4模型较YOLOv4模型在检测精度上提升了4.01百分点,在检测速度上提升近1倍,在保证识别精度的同时提升了实时性,可为生猪行为识别提供技术参考。

关键词: YOLOv4模型, MobileNetV3网络, 生猪姿态检测

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

中图分类号: