基于改进YOLOv8n-seg的群猪分割方法研究

打开文本图片集
中图分类号:S126;TP183 文献标志码:A 文章编号:1008-0864(2025)11-0120-11
Abstract:Aiming attheproblems oflowaccuracyof pig image segmentationand insuffcientreal-time segmentation in complex scenes,analgorithm 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 collaborativeatention wereaddedatdifferentlocationsofthe network structure for enhancingthe model'sfor feature extraction and fusion.Finaly,wise IoU(WIoU)was chosenasanewloss function to speedup theconvergence of the model and improve the overall performance of thedetector.The results showed that,comparedtotheoriginalmodel,theimproved modelreducedthenumberof parametersbyO.39M.Intermsof detection accuracy,the precision was improved by 3.7 percentage point,the recall by4.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 by5.2,which showed good performance.A large improvement in both accuracyand speed wereachieved byimproving theYOLOv8n-seg,especiallyfor theproblem of reduced segmentationaccuracy due to pig adhesion and mild oclusion 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.
Keywords:intelligent farming;YOLO v8 ;pigs;instance segmentation;attention mechanism
随着智慧养殖业的不断发展,自动化、智能化的生猪识别监测已成为工厂化养殖的核心需求[1-3]。(剩余15462字)