摘要
为实现在奶牛养殖场复杂环境下,非接触且实时检测奶牛面部个体身份,提出一种基于YOLOv8s目标检测网络的性能优良且轻量化的识别模型。以17头荷斯坦奶牛作为研究对象,在奶牛进食通道旁安装摄像机,定时、自动获取奶牛视频,用视频帧分解技术得到奶牛面部图像,并用结构相似性指数方法对图像间的相似性进行度量,剔除相似性过高的图像,再通过人工标注奶牛个体编号。以YOLOv8s模型为基础在主干网络中加入注意力机制CBAM,提升算法精度,引入Slim—Neck设计范式,使用GSConv轻量级卷积模块替换传统卷积模块(SC),使用基于GSConv设计的VoV—GSCSP模块替换C2f模块,进而减轻模型负担,同时保持准确性。改进YOLOv8s的模型内存占用量为21.3 MB,比YOLOv8s的占用量小1.3 MB,检测速度FPS、精确率P、召回率R、平均精度均值mAP分别提升39.57%、5.68%、7.74%、3.33%。改进YOLOv8s可在保证网络模型轻量化和精度的同时对奶牛面部识别,具有较好的鲁棒性,能够实现复杂环境下养殖场的奶牛面部个体识别。
In order to realize non-contact and real-time detection of individual identity recognition of cow faces in dairy farms with complex environments,this paper proposes a high-performance and lightweight recognition model based on YOLOv8s target detection network.In this study,17 Holstein cows are taken as the research object,and a video camera is installed next to the feeding channel of the cows to obtain the video of the cows at regular intervals and automatically,and the facial images of the cows are obtained by video frame decomposition technology,and the similarity between the images is measured by the structural similarity index method,so that those images with too high similarity are rejected,and the individual numbers of the cows are then manually labeled.In this paper,the YOLOv8s model is used as the basis for adding the attention mechanism CBAM to the backbone network to improve the accuracy of the algorithm,followed by the introduction of the Slim—Neck design paradigm,which replaces the traditional convolutional module(SC)with the GSConv lightweight convolutional module,and replaces the C2f module with the VoV—GSCSP module based on the design of the GSConv to reduce the burden on the model while maintaining the accuracy.The model memory footprint of the improved YOLOv8s is 21.3 MB,which is 1.3 MB smaller than that of YOLOv8s,and the FPS,P,R and mAP are improved by 39.57%,5.68%,7.74% and 3.33%,respectively.The improved YOLOv8s can ensure the lightweight and accuracy of network model,at the same time has better robustness for the facial recognition of cows,and can realize the individual face recognition of cows in dairy farms with complex environments.
作者
邴树营
张玉玉
纪元浩
严蓓蓓
邹明
许金普
Bing Shuying;Zhang Yuyu;Ji Yuanhao;Yan Beibei;Zou Ming;Xu Jinpu(College of Animation and Media,Qingdao Agricultural University,Qingdao,266109,China;College of Veterinary Medicine,Qingdao Agricultural University,Qingdao,266109,China)
出处
《中国农机化学报》
北大核心
2025年第8期128-134,共7页
Journal of Chinese Agricultural Mechanization
基金
山东省自然科学基金面上项目(ZR2022MC152)
山东省重大科技创新工程项目(2021LZGC014—3)
青岛市产业培育计划科技惠民专项(23—1—3—6—zyyd—nsh)
山东省牛产业技术体系(SDAIT—09—11)。