高级检索+

基于改进Cascade Mask R-CNN与协同注意力机制的群猪姿态识别

Posture recognition of group-housed pigs using improved Cascade Mask R-CNN and cooperative attention mechanism

  • 摘要: 猪体姿态识别有助于实现猪只健康状况预警、预防猪病爆发,是当前研究热点。针对复杂场景下群猪容易相互遮挡、粘连,姿态识别困难的问题,该研究提出一种实例分割与协同注意力机制相结合的两阶段群猪姿态识别方法。首先,以Cascade Mask R-CNN作为基准网络,结合HrNetV2和FPN模块构建猪体检测与分割模型,解决猪体相互遮挡、粘连等问题,实现复杂环境下群猪图像的高精度检测与分割;在上述提取单只猪基础上,构建了基于协同注意力机制(coordinate attention,CA)的轻量级猪体姿态识别模型(CA?MobileNetV3),实现猪体姿态的精准快速识别。最后,在自标注数据集上的试验结果表明,在猪体分割与检测环节,该研究所提模型与Mask R-CNN、MS R-CNN模型相比,在AP0.50、AP0.75、AP0.50:0.95和AP0.5:0.95-large 指标上最多提升了1.3、1.5、6.9和8.8个百分点,表现出最优的分割与检测性能。而在猪体姿态识别环节,所提CA?MobileNetV3模型在跪立、站立、躺卧、坐立4种姿态类上的准确率分别为96.5%、99.3%、98.5%和98.7%,其性能优于主流的MobileNetV3、ResNet50、DenseNet121和VGG16模型,由此可知,该研究模型在复杂环境下群猪姿态识别具有良好的准确性和有效性,为实现猪体姿态的精准快速识别提供方法支撑。

     

    Abstract: Abstract: Pig posture recognition can greatly contribute to the early warning of pig health under the complex scenes in swine farms, even to reduce economic loss. However, it is still challenging in posture recognition, due to the mutual occlusion and adhesion of group-housed pigs in the group house. In this study, a two-stage group-housed pigs pose recognition was proposed using the combination of Instance Segmentation and Classification identification. Firstly, the instance segmentation data set was used as the input, Cascade Mask R-CNN was used as the reference network, and the HrNetV2 network was as the feature extraction network of Cascade Mask R-CNN. High-precision segmentation was carried out on the pig images in different scenes. The multi-resolution image processing in the HrNetV2 was realized to reduce the loss of spatial details of the images, in order to improve the representation of the segmentation target by the model. The FPN module was also introduced to construct the HrNetV2+FPN composite structure. The pig bodies of different sizes were mapped to the feature maps of different levels, and then to achieve the effective fusion of features of different scales. The overlapping and adhesion between pig bodies were reduced for the subsequent recognition of pig body posture. Secondly, the CA coordinate attention mechanism was introduced to design the CA-MobilenetV3 lightweight pig body pose recognition network. The pig individual pose was extracted to build the data set after the segmentation. The interference of the background region was reduced to enhance the feature learning in the key parts of the pig body. CAM visualization was used to display the extracted part of the pig body pose feature, in order to realize the accurate and rapid recognition of individual pig posture. Finally, the improved model was effectively segmented and detected the pig body, indicating the more accurate segmentation edge of the pig body. There was a rough segmentation of the conventional MS R-CNN and Mask R-CNN. By contrast, the improved Cascade Mask R-CNN model was achieved 96.9%, 96.3%, 85.2%, and 89.4% for the AP0.50, AP0.75, AP0.50:0.95, and AP0.50:0.95-large, respectively. Therefore, the improved model performed better than the Mask R-CNN and MS R-CNN networks, in terms of detection and segmentation. In terms of pig posture recognition, the recall and F1 value of the CA-MobileNetV3 model increased by 10.8%, 13.1%, respectively, compared with the rest. Furthermore, the performance of the CA-MobileNetV3 network was significantly improved to identify the sitting and lying posture class. All evaluation indexes achieved an accuracy rate of 96.5%, 99.3%, 98.5%, and 98.7%, respectively, in the kneeling, standing, lying, and sitting posture class. The performance was much better than the MobileNetV3, ResNet50, DenseNet121, and VGG16 networks of the same type. In conclusion, the improved model was superior to the current popular networks, in the aspects of pig individual segmentation and pig pose recognition. The non-contact and low-cost recognition can be expected to realize the pig attitude under different scenarios, such as deep separation, mutual adhesion, and debris shielding. The finding can also provide the model support for the practical management of pig-intensive farming.

     

/

返回文章
返回