Yu Wenbo, Yang Xiang, Liu Yongqi, Xuan Chuanzhong, Xie Ruoya, Wang Chuanjiu
College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Hohhot 010018, China.
Inner Mongolia Engineering Research Center for Intelligent Facilities in Prataculture and Livestock Breeding, Hohhot 010018, China.
Animals (Basel). 2024 Nov 26;14(23):3415. doi: 10.3390/ani14233415.
Sheep facial expressions are valuable indicators of their pain levels, playing a critical role in monitoring their health and welfare. In response to challenges such as missed detections, false positives, and low recognition accuracy in sheep facial expression recognition, this paper introduces an enhanced algorithm based on YOLOv8n, referred to as SimAM-MobileViTAttention-EfficiCIoU-AA2_SPPF-YOLOv8n (SMEA-YOLOv8n). Firstly, the proposed method integrates the parameter-free Similarity-Aware Attention Mechanism (SimAM) and MobileViTAttention modules into the CSP Bottleneck with 2 Convolutions(C2f) module of the neck network, aiming to enhance the model's feature representation and fusion capabilities in complex environments while mitigating the interference of irrelevant background features. Additionally, the EfficiCIoU loss function replaces the original Complete IoU(CIoU) loss function, thereby improving bounding box localization accuracy and accelerating model convergence. Furthermore, the Spatial Pyramid Pooling-Fast (SPPF) module in the backbone network is refined with the addition of two global average pooling layers, strengthening the extraction of sheep facial expression features and bolstering the model's core feature fusion capacity. Experimental results reveal that the proposed method achieves a mAP@0.5 of 92.5%, a Recall of 91%, a Precision of 86%, and an F1-score of 88.0%, reflecting improvements of 4.5%, 9.1%, 2.8%, and 6.0%, respectively, compared to the baseline model. Notably, the mAP@0.5 for normal and abnormal sheep facial expressions increased by 3.7% and 5.3%, respectively, demonstrating the method's effectiveness in enhancing recognition accuracy under complex environmental conditions.
绵羊的面部表情是其疼痛程度的重要指标,在监测它们的健康和福利方面发挥着关键作用。针对绵羊面部表情识别中存在的漏检、误报和识别准确率低等挑战,本文提出了一种基于YOLOv8n的增强算法,即SimAM-MobileViTAttention-EfficiCIoU-AA2_SPPF-YOLOv8n(SMEA-YOLOv8n)。首先,该方法将无参数的相似性感知注意力机制(SimAM)和MobileViTAttention模块集成到颈部网络的带2个卷积的CSP瓶颈(C2f)模块中,旨在增强模型在复杂环境中的特征表示和融合能力,同时减轻无关背景特征的干扰。此外,EfficiCIoU损失函数取代了原来的完整交并比(CIoU)损失函数,从而提高了边界框定位精度并加速了模型收敛。此外,主干网络中的空间金字塔池化快速(SPPF)模块通过添加两个全局平均池化层进行了优化,增强了绵羊面部表情特征的提取并提升了模型的核心特征融合能力。实验结果表明,该方法的mAP@0.5达到92.5%,召回率为91%,精确率为86%,F1分数为88.0%,与基线模型相比,分别提高了4.5%、9.1%、2.8%和6.0%。值得注意的是,正常和异常绵羊面部表情的mAP@0.5分别提高了3.7%和5.