| 注册
首页|期刊导航|农业工程学报|基于改进YOLOv11n的猪舍残余饲料检测方法

基于改进YOLOv11n的猪舍残余饲料检测方法

刘易雪 曾雅琼 胡义勇 齐仁立 唐湘方 熊本海 王浩

农业工程学报2026,Vol.42Issue(11):69-78,10.
农业工程学报2026,Vol.42Issue(11):69-78,10.DOI:10.11975/j.issn.1002-6819.202601273

基于改进YOLOv11n的猪舍残余饲料检测方法

Feed residue detection on pig farms using improved YOLOv11n

刘易雪 1曾雅琼 1胡义勇 2齐仁立 1唐湘方 3熊本海 3王浩1

作者信息

  • 1. 重庆市畜牧科学院,重庆 402460||国家生猪技术创新中心,重庆 402460
  • 2. 牧原食品股份有限公司,南阳 473000
  • 3. 中国农业科学院北京畜牧兽医研究所,北京 100193
  • 折叠

摘要

Abstract

Feed residue state in troughs has been one of the key indicators to optimize feed conversion rate and reduc waste,providing for early warnings of health abnormalities.Feed costs account for 60%-70%of total expenses in commercial pig production.It is often required to accurately monitor feed residues in troughs.However,residue levels show high inter-class visual similarity,with subtle boundaries between adjacent categories.Existing deep learning models are also confined to environmental factors and mage interference,including uneven illumination,suspended feed dust,and trough reflection.It is still lacking in the fine-grained feature extraction to separate visually similar states,such as small and medium residue.In this study,an improved YOLOv11n model,SWF-YOLO(Spatial and Channel Synergistic Attention Weight Fusion YOLO),was proposed for the end-to-end classification of four residue states.Accurate residue detection was realized to integrate into the baseline.The C2f modules in the backbone were replaced with C2f-SCSA modules for fine-grained feature extraction.A weight-fusion strategy replaced neck concatenation for adaptive multi-scale fusion.A C2PSA module was added to capture long-range spatial dependencies.A dataset of 7 748 annotated samples was constructed from 308 growing pigs in 52 pens.A genetic algorithm was then used to optimize 16 hyperparameters over 300 iterations.The results show that the SWF-YOLO achieved a mean average precision at an IoU threshold of 0.5(mAP50)of 93.78%on the test set.Its precision was 84.21%,recall was 89.40%,and F1-score was 86.73%.Compared with the YOLOv11n baseline,mAP50,recall,and F1-score were improved by 2.21,4.92,and 3.96 percentage points,respectively.Parameters were reduced by 26.74%to 1.89 M,while the computational cost was 3.51 GFLOPs,and the inference speed reached 50.2 frames per second.These configurations fully met the requirements of real-time edge deployment.Ablation experiments showed that the SCSA module contributed the largest precision gain of 6.26 percentage points.The weight-fusion strategy improved the greatest efficiency,where computational cost was reduced by 16.14%.The full three-module combination yielded the best balance between accuracy and efficiency.Fine-grained discrimination also improved markedly.After genetic algorithm optimization,class-specific F1-scores reached 94.91%,88.19%,84.56%,and 80.23%for the no-,small-,medium-,and large-residue categories,respectively.Comparative experiments showed that the SWF-YOLO outperformed Faster R-CNN,YOLOv8n,YOLOv9t,YOLOv10n,and YOLOv12n.The mAP50 improvements were 2.54,2.53,1.95,2.56,and 2.80 percentage points,respectively.Favorable accuracy and efficiency were balanced,suitable for resource-constrained edge devices in commercial pig farms.Grad-CAM visualization showed that the SCSA mechanism directed attention more precisely toward critical trough regions than the SE,CBAM,ECA,SGA,and CA modules.Fine-grained classification of feed residues can be expected to integrate spatial and channel attention,adaptive weighted feature fusion,and position-sensitive attention.High accuracy can also remain lightweight,particularly for feed-waste control and early health warning in precision livestock farming.These findings can provide a practical reference to develop intelligent monitoring equipment in commercial pig production.

关键词

/饲喂/目标检测/深度学习/注意力机制/特征融合

Key words

pigs/feeding/object detection/deep learning/attention mechanism/feature fusion

分类

农业科技

引用本文复制引用

刘易雪,曾雅琼,胡义勇,齐仁立,唐湘方,熊本海,王浩..基于改进YOLOv11n的猪舍残余饲料检测方法[J].农业工程学报,2026,42(11):69-78,10.

基金项目

重庆市技术创新与应用发展专项(CSTB2025TIAD-qykjggX0263) (CSTB2025TIAD-qykjggX0263)

国家生猪技术创新中心先导科技项目(NCTIP-XD/B16) (NCTIP-XD/B16)

农业工程学报

1002-6819

访问量0
|
下载量0
段落导航相关论文