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.