•  
  •  
 

Corresponding Author(s)

田博轩(2003—), 男, 山西农业大学在读本科生。E-mail: 13111064042@163.com

Abstract

[Objective] To propose an intelligent defect detection method based on an improved YOLOv7 model for the challenges of strong polymorphism in peanut surface defects and insufficient accuracy of traditional visual inspection methods. [Methods] A cross-channel attention mechanism is integrated to enhance local feature response. Then, a bidirectional feature pyramid is constructed to improve multi-scale defect fusion. Additionally, an angle constraint loss function is introduced to optimize irregular object localization. Furthermore, the model is optimized using an industrial-grade sample library combined with data augmentation strategies. [Results] The improved model achieves a precision of 0.917, a recall of 0.903, Pt@0.5 of 0.948, and Pt@[0.5:0.95] of 0.705 on the test set, with an inference speed of 74.166 frames per second, significantly outperforming other models. Ablation experiments indicate that the MSAM module contributes most to fine-grained feature recognition. [Conclusion] The proposed method balances detection accuracy and real-time performance, effectively overcoming challenges such as complex surface textures and significant defect scale variation. The proposed method provides an efficient solution for intelligent defect inspection on peanut surfaces.

Publication Date

5-13-2026

First Page

105

Last Page

110

DOI

10.13652/j.spjx.1003.5788.2025.80344

References

[1] 张明华,黄基萍,宋巍,等.基于 UMS-YOLO v 7的面向样本不均 衡 的 水 下 生 物 多 尺 度 目 标 检 测 方 法 [J].农 业 机 械 学 报,2025,56(1):388-396,409.ZHANG M H,HUANG J P,SONG W,et al.Multi-scale object detection method for underwater organisms under unbalanced samples based on UMS-YOLO v 7[J].Transactions of the Chinese Society for Agricultural Machinery,2025,56(1):388-396,409.
[2] 杨哲宇,于航.基于改进 YOLO v 7的斜盘表面小面积缺陷检测方法 [J].南方农机,2024,55(24):129-133.YANG Z Y,YU H.Small-area defect detection method for swash plate surface based on improved YOLO v 7[J].Southern Agricultural Machinery,2024,55(24):129-133.
[3] HASAN S,JAHAN S,ISLAM M I.Disease detection of apple leaf with combination of color segmentation and modified DWT[J].Journal of King Saud University-Computer and Information Sciences,2022,34(9):7 212-7 224.
[4] 李大华,孔舒,李栋,等.基于改进 SSD 模型的柑橘叶片病害轻量化检测模型 [J].浙江农业学报,2024,36(3):662-670.LI D H,KONG S,LI D,et al.Lightweight detection model of citrus leaf disease based on improved SSD [J].Acta Agriculturae Zhejiangensis,2024,36(3):662-670.
[5] 鄢紫,陈良艳,刘卫华,等.基于 YOLO-FFD 的水果品种和新鲜度识别方法 [J].食品与机械,2024,40(1):115-121.YAN Z,CHEN L Y,LIU W H,et al.Fruit variety and freshness recognition method based on YOLO-FFD [J].Food & Machinery,2024,40(1):115-121.
[6] ZHANG T,WANG Z H,LI F W,et al.Automatic detection of surface defects based on deep random chains [J].Expert Systems with Applications,2023,229:120472.
[7] 刘 建 航,何 鉴 恒,陈 海 华,等.基 于 改 进 YOLO v 4和ICNet 的番 茄 串 检 测 模 型 [J].农 业 机 械 学 报,2023,54(10):216-224,254.LIU J H,HE J H,CHEN H H,et al.Development of detection model for tomato clusters based on improved YOLO v 4 and ICNet [J].Transactions of the Chinese Society for Agricultural Machinery,2023,54(10):216-224,254.
[8] 李天华,孙萌,丁小明,等.基于 YOLO v 4+HSV 的成熟期番茄识别方法 [J].农业工程学报,2021,37(21):183-190.LI T H,SUN M,DING X M,et al.Tomato recognition method at the ripening stage based on YOLO v 4 and HSV [J].Transactions of the Chinese Society of Agricultural Engineering,2021,37(21):183-190.
[9] 皮卫,屈喜龙,王绍成,等.基于改进 CNN 和数据扩充的苹果表面缺陷检测 [J].食品与机械,2023,39(8):122-128,226.PI W,QU X L,WANG S C,et al.Apple surface defect detection based on improved CNN and data augmentation [J].Food & Machinery,2023,39(8):122-128,226.
[10] 刘 亚 恒.基 于 改 进 Faster R-CNN 苹 果 叶 部 病 害 检 测 方 法 研究[D].汉中: 陕西理工大学,2022:7-18.LIU Y H.Study on apple leaf diseases detection method based on improved Faster R-CNN [D].Hanzhong:Shaanxi University of Technology,2022:7-18.
[11] 梁源林,黄爱清,吴健豪,等.基于改进 YOLOv 5的菌菇检测及分类模型研究 [J].仲恺农业工程学院学报,2025,38(1):20-27.LIANG Y L,HUANG A Q,WU J H,et al.Research on mushroom detection and classification model based on improved YOLOv 5[J].Journal of Zhongkai University of Agriculture and Engineering,2025,38(1):20-27.
[12] 张东彦,高玥,程涛,等.基于 YOLOv 8-FECA 的密集场景下小 麦 赤 霉 病 孢 子 目 标 检 测 [J].农 业 工 程 学 报,2024,40(21):127-136.ZHANG D Y,GAO Y,CHENG T,et al.Detection of wheat scab spores in dense scene based on YOLOv 8-FECA [J].Transactions of the Chinese Society of Agricultural Engineering,2024,40(21):127-136.

Share

COinS
 
 

To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.