基于特征金字塔注意力与深度卷积网络的多目标生猪检测

    Multi-target detection based on feature pyramid attention and deep convolution network for pigs

    • 摘要: 在生猪饲养环境中,猪只黏连、杂物遮挡等给生猪个体多目标检测带来很大困难。该研究以猪圈群养生猪为研究对象,以视频帧为数据源,提出一种适用于生猪形体检测的特征金字塔注意力(Feature Pyramid Attention,FPA)与Tiny-YOLO相结合的模型FPA-Tiny-YOLO。该模型将注意力信息融入到特征提取过程,在不大幅增加计算量的前提下即可提升特征提取能力、提高检测精度。对8栏日龄20~105 d的45头生猪视频截取图像进行图像处理,获得标注图片4 102张,构建了4种深度FPA模块分别加入YOLOV3与Tiny-YOLO模型中。试验表明,深度为3的FPA模块(即FPA-3)的Tiny-YOLO模型在测试集上对群养生猪多目标检测的召回率Recall、F1与平均检测精度mAP指标值最佳,分别达到86.09%、91.47%和85.85%,比未引入FPA模块的Tiny-YOLO模型均有不同程度的提高。选用不同的IOU(Intersection Over Union)和score阈值超参数值对模型预测结果均有不同程度影响;将测试集图像按照是否黏连与遮挡划分4种场景来探究该模型的鲁棒性。试验表明,加入FPA-3模块后Tiny-YOLO的Recall、F1与mAP比Tiny-YOLO分别提升6.73、4.34和7.33个百分点,说明特征金字塔注意力信息有利于精确、有效地对不同场景群养生猪进行多目标检测。研究结果可为后续开展生猪身份识别和行为分析移动端应用提供参考。

       

      Abstract: Abstract: In the pig breeding environment, pig adhesion and debris shielding made it difficult to detect multiple targets of pig individuals. In this paper, pigs in the pen were used as the research object, and the video frame was used as the data source to propose a model FPA-Tiny-YOLO that combines Feature Pyramid Attention (FPA) and Tiny-YOLO. In this model, attention information was integrated into feature extraction, semantic content of different regions was aggregated hierarchically, and global context information was mined. Image processing (include randomly change the brightness, adding Gaussian noise and flipping 180°) was performed on video clips of 45 pigs in 8 bars with age of 20 to 105 days, and 4 102 labeled pictures were obtained. Four kinds of deep FPA modules were constructed and added to YOLOV3 and Tiny-YOLO models. Experiments show that adding a variety of feature pyramid attention information could improve the accuracy of Tiny-YOLO and YOLOV3 models to some extent. Compared with the YOLOV3 models, before adding the FPA module, the Tiny-YOLO model had higher detection accuracy, and the detection real-time performance was better than that of the YOLOV3 model with the same module added. After adding the FPA module, the detection performance of the Tiny-YOLO model was better than that of the YOLOV3 models, the mAP, Precision ratio, Recall rate and F1 value of the Tiny-YOLO model with the FPA-3 module increased by 8.4, 1.04, 7.93, and 5.09 percentage points compared to the YOLOV3 model with the same FPA module. The Recall rate, F1 value and mAP of Tiny-YOLO model with FPA-3 module for multi-target detection of group pigs on the test set reached 86.09%, 91.47% and 85.85% respectively, which improved by 3.75, 2.59 and 4.11 percentage points respectively compared with Tiny-YOLO model without FPA module, The the Recall rate, F1 value and mAP decrease as the score threshold increases when the score and IOU value fixed, but the Precision ratio gradually decreases, whicb indicating that the depth of the FPA module had no regular effects on the detecting effect. The test set pictures were divided into four scenes according to whether adhesion or shielding to explore the robustness of the Tiny-YOLO series models. The experiments showed that compared with Tiny-YOLO model, the Recall rate, F1 value and mAP of the Tiny-YOLO model adding FPA-3 module were improved by 6.73, 4.34 and 7.33 percentage points respectively, the Tiny-YOLO model adding FPA module could extract more complete edges of pigs and had higher prediction reliability and had better detection effects for the pigs far away from the camera and with occlusion, the feature pyramid attention information was beneficial to precisely and effectively conduct multi-target detection of live pigs in different scenes. The research results can provide a reference for the subsequent mobile application of pig identification and behavior analysis.

       

    /

    返回文章
    返回