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
LI Bin1(
), LIU Dongyang1, SHI Guolong1, MU Jingsheng2, XU Haoran1, GU Lichuan1, JIAO Jun1,*(
)
Received:2021-06-29
Online:2023-01-25
Published:2023-02-21
CLC Number:
LI Bin, LIU Dongyang, SHI Guolong, MU Jingsheng, XU Haoran, GU Lichuan, JIAO Jun. Pig posture detection based on improved YOLOv4 model[J]. Acta Agriculturae Zhejiangensis, 2023, 35(1): 215-225.
Add to citation manager EndNote|Ris|BibTeX
URL: http://www.zjnyxb.cn/EN/10.3969/j.issn.1004-1524.2023.01.23
| 类型 Type | 滤波器 Filters | Exp size | SE | 激活函数 Activation function | 步长 Stride | 输出 Output |
|---|---|---|---|---|---|---|
| Conv2D | 16 | — | 否No | HS | 2 | 208×208 |
| Bneck,3×3 | 16 | 16 | 否No | HS | 1 | 208×208 |
| Bneck,3×3 | 24 | 64 | 否No | RE | 2 | 104×104 |
| Bneck,3×3 | 24 | 72 | 否No | HS | 1 | 104×104 |
| Bneck,5×5 | 40 | 72 | 是Yes | RE | 2 | 52×52 |
| Bneck,5×5 | 40 | 120 | 是Yes | RE | 1 | 52×52 |
| Bneck,5×5 | 40 | 120 | 是Yes | RE | 1 | 52×52 |
| Bneck,3×3 | 80 | 240 | 否No | HS | 2 | 26×26 |
| Bneck,3×3 | 80 | 200 | 否No | HS | 1 | 26×26 |
| Bneck,3×3 | 80 | 184 | 否No | HS | 1 | 26×26 |
| Bneck,3×3 | 80 | 184 | 是Yes | HS | 1 | 26×26 |
| Bneck,3×3 | 112 | 480 | 是Yes | HS | 1 | 26×26 |
| Bneck,3×3 | 112 | 672 | 是Yes | HS | 1 | 26×26 |
| Bneck,5×5 | 160 | 672 | 是Yes | HS | 2 | 13×13 |
| Bneck,5×5 | 160 | 960 | 是Yes | HS | 1 | 13×13 |
| Bneck,5×5 | 160 | 960 | 否No | HS | 1 | 13×13 |
Table 1 Structure of MobileNetV3 network
| 类型 Type | 滤波器 Filters | Exp size | SE | 激活函数 Activation function | 步长 Stride | 输出 Output |
|---|---|---|---|---|---|---|
| Conv2D | 16 | — | 否No | HS | 2 | 208×208 |
| Bneck,3×3 | 16 | 16 | 否No | HS | 1 | 208×208 |
| Bneck,3×3 | 24 | 64 | 否No | RE | 2 | 104×104 |
| Bneck,3×3 | 24 | 72 | 否No | HS | 1 | 104×104 |
| Bneck,5×5 | 40 | 72 | 是Yes | RE | 2 | 52×52 |
| Bneck,5×5 | 40 | 120 | 是Yes | RE | 1 | 52×52 |
| Bneck,5×5 | 40 | 120 | 是Yes | RE | 1 | 52×52 |
| Bneck,3×3 | 80 | 240 | 否No | HS | 2 | 26×26 |
| Bneck,3×3 | 80 | 200 | 否No | HS | 1 | 26×26 |
| Bneck,3×3 | 80 | 184 | 否No | HS | 1 | 26×26 |
| Bneck,3×3 | 80 | 184 | 是Yes | HS | 1 | 26×26 |
| Bneck,3×3 | 112 | 480 | 是Yes | HS | 1 | 26×26 |
| Bneck,3×3 | 112 | 672 | 是Yes | HS | 1 | 26×26 |
| Bneck,5×5 | 160 | 672 | 是Yes | HS | 2 | 13×13 |
| Bneck,5×5 | 160 | 960 | 是Yes | HS | 1 | 13×13 |
| Bneck,5×5 | 160 | 960 | 否No | HS | 1 | 13×13 |
| 模型 Model | 不同IoU阈值下的mAP mAP under different IoU thresholds | |||
|---|---|---|---|---|
| 0.5 | 0.6 | 0.7 | 0.75 | |
| YOLOv4 | 69.66 | 66.71 | 58.34 | 52.94 |
| Mini_YOLOv4 | 73.67 | 73.67 | 73.00 | 71.35 |
Table 2 Mean average precision (mAP) of different models under different IoU thresholds %
| 模型 Model | 不同IoU阈值下的mAP mAP under different IoU thresholds | |||
|---|---|---|---|---|
| 0.5 | 0.6 | 0.7 | 0.75 | |
| YOLOv4 | 69.66 | 66.71 | 58.34 | 52.94 |
| Mini_YOLOv4 | 73.67 | 73.67 | 73.00 | 71.35 |
| 模型 Model | 不同姿态下的检测精度Precision under different postures/% | 检测速度 Speed/(frame·s-1) | ||||
|---|---|---|---|---|---|---|
| 站立Stand | 趴卧Lie | 坐立Sit | 腹卧Ventral | 侧卧Lateral | ||
| YOLOv4 | 66.17 | 69.25 | 71.15 | 64.82 | 76.89 | 33.98 |
| Mini_YOLOv4 | 68.59 | 70.87 | 74.10 | 71.27 | 83.51 | 65.62 |
Table 3 Detection accuracy and speed of different models
| 模型 Model | 不同姿态下的检测精度Precision under different postures/% | 检测速度 Speed/(frame·s-1) | ||||
|---|---|---|---|---|---|---|
| 站立Stand | 趴卧Lie | 坐立Sit | 腹卧Ventral | 侧卧Lateral | ||
| YOLOv4 | 66.17 | 69.25 | 71.15 | 64.82 | 76.89 | 33.98 |
| Mini_YOLOv4 | 68.59 | 70.87 | 74.10 | 71.27 | 83.51 | 65.62 |
| 模型 Model | 不同姿态下的召回率Recall under different postures/% | 不同姿态下的F1值F1 under different postures/% | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 站立 Stand | 趴卧 Lie | 坐立 Sit | 腹卧 Ventral | 侧卧 Lateral | 站立 Stand | 趴卧 Lie | 坐立 Sit | 腹卧 Ventral | 侧卧 Lateral | |
| YOLOv4 | 66.67 | 70.26 | 73.78 | 71.22 | 84.54 | 0.78 | 0.78 | 0.79 | 0.75 | 0.78 |
| Mini_YOLOv4 | 69.57 | 71.28 | 74.22 | 72.20 | 83.51 | 0.80 | 0.81 | 0.85 | 0.82 | 0.91 |
Table 4 Recall and F1 values of different models
| 模型 Model | 不同姿态下的召回率Recall under different postures/% | 不同姿态下的F1值F1 under different postures/% | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 站立 Stand | 趴卧 Lie | 坐立 Sit | 腹卧 Ventral | 侧卧 Lateral | 站立 Stand | 趴卧 Lie | 坐立 Sit | 腹卧 Ventral | 侧卧 Lateral | |
| YOLOv4 | 66.67 | 70.26 | 73.78 | 71.22 | 84.54 | 0.78 | 0.78 | 0.79 | 0.75 | 0.78 |
| Mini_YOLOv4 | 69.57 | 71.28 | 74.22 | 72.20 | 83.51 | 0.80 | 0.81 | 0.85 | 0.82 | 0.91 |
| [1] | 党亚男, 王芳, 田建艳, 等. 面向猪的姿态识别的特征优选方法研究[J]. 江苏农业科学, 2016, 44(3): 448-451. |
| DANG Y N, WANG F, TIAN J Y, et al. Research on feature optimization method for pig pose recognition[J]. Jiangsu Agricultural Sciences, 2016, 44(3): 448-451. (in Chinese) | |
| [2] | 杨秋妹, 肖德琴, 张根兴. 猪只饮水行为机器视觉自动识别[J]. 农业机械学报, 2018, 49(6): 232-238. |
| YANG Q M, XIAO D Q, ZHANG G X. Automatic pig drinking behavior recognition with machine vision[J]. Transactions of the Chinese Society for Agricultural Machinery, 2018, 49(6): 232-238. (in Chinese with English abstract) | |
| [3] | 嵇杨培, 杨颖, 刘刚. 基于可见光光谱和YOLOv2的生猪饮食行为识别[J]. 光谱学与光谱分析, 2020, 40(5): 1588-1594. |
| JI Y P, YANG Y, LIU G. Recognition of pig eating and drinking behavior based on visible spectrum and YOLOv2[J]. Spectroscopy and Spectral Analysis, 2020, 40(5): 1588-1594. (in Chinese with English abstract) | |
| [4] |
TRAULSEN I, SCHEEL C, AUER W, et al. Using acceleration data to automatically detect the onset of farrowing in sows[J]. Sensors (Basel, Switzerland), 2018, 18(1): 170.
DOI URL |
| [5] | 王凯, 刘春红, 段青玲. 基于MFO-LSTM的母猪发情行为识别[J]. 农业工程学报, 2020, 36(14): 211-219. |
| WANG K, LIU C H, DUAN Q L. Identification of sow oestrus behavior based on MFO-LSTM[J]. Transactions of the Chinese Society of Agricultural Engineering, 2020, 36(14): 211-219. (in Chinese with English abstract) | |
| [6] | 何屿彤, 李斌, 张锋, 等. 基于改进YOLOv3的猪脸识别[J]. 中国农业大学学报, 2021, 26(3): 53-62. |
| HE Y T, LI B, ZHANG F, et al. Pig face recognition based on improved YOLOv3[J]. Journal of China Agricultural University, 2021, 26(3): 53-62. (in Chinese with English abstract) | |
| [7] | 焦俊, 王文周, 侯金波, 等. 基于改进残差网络的黑毛猪肉新鲜度识别方法[J]. 农业机械学报, 2019, 50(8): 364-371. |
| JIAO J, WANG W Z, HOU J B, et al. Freshness identification of iberico pork based on improved residual network[J]. Transactions of the Chinese Society for Agricultural Machinery, 2019, 50(8): 364-371. (in Chinese with English abstract) | |
| [8] | 邱洪涛, 孙裴, 侯金波, 等. 基于Caffe的猪肉新鲜度分级的设计与实现[J]. 江苏农业学报, 2019, 35(2): 461-468. |
| QIU H T, SUN P, HOU J B, et al. Design and implementation of pork freshness grading based on Caffe[J]. Jiangsu Journal of Agricultural Sciences, 2019, 35(2): 461-468. (in Chinese with English abstract) | |
| [9] |
MARSOT M, MEI J Q, SHAN X C, et al. An adaptive pig face recognition approach using convolutional neural networks[J]. Computers and Electronics in Agriculture, 2020, 173: 105386.
DOI URL |
| [10] | 甘海明, 薛月菊, 李诗梅, 等. 基于时空信息融合的母猪哺乳行为识别[J]. 农业机械学报, 2020, 51(S1): 357-363. |
| GAN H M, XUE Y J, LI S M, et al. Automatic sow nursing behaviour recognition based on spatio-temporal information fusion[J]. Transactions of the Chinese Society for Agricultural Machinery, 2020, 51(S1): 357-363. (in Chinese with English abstract) | |
| [11] | 燕红文, 刘振宇, 崔清亮, 等. 基于改进Tiny-YOLO模型的群养生猪脸部姿态检测[J]. 农业工程学报, 2019, 35(18): 169-179. |
| YAN H W, LIU Z Y, CUI Q L, et al. Detection of facial gestures of group pigs based on improved Tiny-YOLO[J]. Transactions of the Chinese Society of Agricultural Engineering, 2019, 35(18): 169-179. (in Chinese with English abstract) | |
| [12] |
PSOTA E T, MITTEK M, PÉREZ L C, et al. Multi-pig part detection and association with a fully-convolutional network[J]. Sensors (Basel, Switzerland), 2019, 19(4): 852.
DOI URL |
| [13] | GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]// 2014 IEEE Conference on Computer Vision and Pattern Recognition.Columbus, OH, USA: IEEE, 2014: 580-587. |
| [14] |
REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
DOI PMID |
| [15] | LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot MultiBox detector[J]. Lecture Notes in Computer Science, 2016, 9905: 21-37. |
| [16] | REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, NV, USA: IEEE, 2016: 779-788. |
| [17] | REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, HI, USA: IEEE, 2017: 6517-6525. |
| [18] | REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB/OL]. (2018-04-08) [2021-06-29]. https://arxiv.org/abs/1804.02767 |
| [19] | BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: optimal speed and accuracy of object detection[EB/OL]. (2020-04-23) [2021-06-29]. https://arxiv.org/abs/2004.10934 |
| [20] | HOWARD A, SANDLER M, CHEN B, et al. Searching for MobileNetV3[C]// 2019 IEEE/CVF International Conference on Computer Vision (ICCV). October 27-November 2, 2019. Seoul:IEEE, 2019: 1314-1324. |
| [21] | CHOLLET F. Xception: deep learning with depthwise separable convolutions[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, HI, USA: IEEE, 2017: 1800-1807. |
| [22] | SZEGEDY C, VANHOUCKE V, IOFFE S, et al. Rethinking the inception architecture for computer vision[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, NV, USA: IEEE, 2016: 2818-2826. |
| [23] | WANG C Y, MARK LIAO H Y, WU Y H, et al. CSPNet: a new backbone that can enhance learning capability of CNN[C]// 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW). Seattle, WA, USA: IEEE, 2020: 1571-1580. |
| [24] | LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, UT, USA: IEEE, 2018: 8759-8768. |
| [25] | HOWARD A G, ZHU M L, CHEN B, et al. MobileNets: efficient convolutional neural networks for mobile vision applications[EB/OL]. (2017-04-17) [2021-06-29]. https://arxiv.org/abs/1704.04861 |
| [26] | SANDLER M, HOWARD A, ZHU M L, et al. MobileNetV2: inverted residuals and linear bottlenecks[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, UT, USA. IEEE, 2018: 4510-4520. |
| [27] | TAN M X, CHEN B, PANG R M, et al. MnasNet: platform-aware neural architecture search for mobile[C]// 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach, CA, USA: IEEE, 2019: 2815-2823. |
| [28] | 薛月菊, 朱勋沐, 郑婵, 等. 基于改进Faster R-CNN识别深度视频图像哺乳母猪姿态[J]. 农业工程学报, 2018, 34(9): 189-196. |
| XUE Y J, ZHU X M, ZHENG C, et al. Lactating sow postures recognition from depth image of videos based on improved Faster R-CNN[J]. Transactions of the Chinese Society of Agricultural Engineering, 2018, 34(9): 189-196. (in Chinese with English abstract) |
| [1] | GUO Xiuming, WANG Dawei, LIU Shengping, ZHU Yeping, LIU Xiaohui, LIN Kejian, WANG Jiayu, LI Fei. Study on key problems for rat hole recognition and count near ground based on deep learning and its application [J]. Acta Agriculturae Zhejiangensis, 2024, 36(9): 2146-2154. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||