中国农业科技导报2025,Vol.27Issue(11):120-130,11.DOI:10.13304/j.nykjdb.2024.0393
基于改进YOLO v8n-seg的群猪分割方法研究
Research on Group Pig Segmentation Method Based on Improved YOLO v8n-seg
摘要
Abstract
Aiming at the problems of low accuracy of pig image segmentation and insufficient real-time segmentation in complex scenes,an algorithm for segmentation modeling of group pig instances based on improved YOLO v8n-seg was proposed.Based on YOLO v8n-seg,GhostConv was firstly introduced into the C2f module to reduce the computational complexity of the model.Secondly,attention mechanisms such as spatial group-wise enhancement,involution,and multidimensional collaborative attention were added at different locations of the network structure for enhancing the model's for feature extraction and fusion.Finally,wise IoU(WIoU)was chosen as a new loss function to speed up the convergence of the model and improve the overall performance of the detector.The results showed that,compared to the original model,the improved model reduced the number of parameters by 0.39 M.In terms of detection accuracy,the precision was improved by 3.7 percentage point,the recall by 4.8 percent point,the mean average precision of intersection over union threshold value 50%and 50%to 95%by 4.6 and 7.6 percent point,respectively,and the frames-per-second by 5.2,which showed good performance.A large improvement in both accuracy and speed were achieved by improving the YOLO v8n-seg,especially for the problem of reduced segmentation accuracy due to pig adhesion and mild occlusion in group rearing scenarios,the model showed excellent performance and was able to accurately segment individual pigs in a group,which provided a strong support for practical production applications.关键词
智慧养殖/YOLO v8/猪/实例分割/注意力机制Key words
intelligent farming/YOLO v8/pigs/instance segmentation/attention mechanism分类
农业科学引用本文复制引用
王兴家,郑纪业,盛清凯,杨亮,张霞..基于改进YOLO v8n-seg的群猪分割方法研究[J].中国农业科技导报,2025,27(11):120-130,11.基金项目
山东省重点研发计划项目(2022TZXD0016). (2022TZXD0016)