Flaw-YOLOv5s: A Lightweight Potato Surface Defect Detection Algorithm Based on Multi-Scale Feature Fusion
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Collection
2.2. Dataset Construction
2.3. Depthwise Separable Convolution Module
2.4. Principle of SPPELAN Module
2.5. Principle of SCPC Module
2.6. Algorithm Improvement
2.6.1. YOLOv5s Detection Algorithm
2.6.2. Flaw-YOLOv5s Detection Algorithm
3. Experimental Results and Analysis
3.1. Experimental Settings
3.2. Evaluation Metrics
3.3. Generalization Analysis Between Algorithms Before and After Enhancement
3.4. Ablation Experiments
3.5. Experimental Results Among Different Surface Defect Detection Models
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Li, Y.; Feng, Q.; Li, T.; Xie, F.; Liu, C.; Xiong, Z. Advance of Target Visual Information Acquisition Technology for Fresh Fruit Robotic Harvesting: A Review. Agronomy 2022, 12, 1336. [Google Scholar] [CrossRef]
- Li, Y.; Tang, J.Z.; Wang, J.; Zhao, G.; Yu, Q.; Wang, Y.; Hu, Q.; Zhang, J.; Pan, Z.; Pan, X.; et al. Diverging water-saving potential across China’s potato planting regions. Eur. J. Agron. 2022, 134, 126450. [Google Scholar] [CrossRef]
- Dorokhov, A.; Aksenov, A.; Sibirev, A.; Hort, D.; Mosyakov, M.; Sazonov, N.; Godyaeva, M. Development of an Optical System with an Orientation Module to Detect Surface Damage to Potato Tubers. Agriculture 2023, 13, 1188. [Google Scholar] [CrossRef]
- Su, W.-H.; Xue, H. Imaging Spectroscopy and Machine Learning for Intelligent Determination of Potato and Sweet Potato Quality. Foods 2021, 10, 2146. [Google Scholar] [CrossRef] [PubMed]
- Zheng, Z.; Zhao, H.; Liu, Z.; He, J.; Liu, W. Research Progress and Development of Mechanized Potato Planters: A Review. Agriculture 2021, 11, 521. [Google Scholar] [CrossRef]
- Sanchez, P.D.C.; Hashim, N.; Shamsudin, R.; Nor, M.Z.M. Applications of imaging and spectroscopy techniques for non-destructive quality evaluation of potatoes and sweet potatoes: A review. Trends Food Sci. Technol. 2020, 96, 208–221. [Google Scholar] [CrossRef]
- Su, W.; Liu, G.; He, J.; Wang, S.; He, X.; Wang, W.; Wu, L. Detection of external defects on potatoes by hyperspectral imaging technology and image processing method. J. Zhejiang Univ. Agric. Life Sci. 2014, 40, 188–196. Available online: https://www.zjujournals.com/agr/CN/10.3785/j.issn.1008-9209.2013.08.241 (accessed on 9 February 2025).
- Su, W.-H.; Sun, D.-W. Potential of hyperspectral imaging for visual authentication of sliced organic potatoes from potato and sweet potato tubers and rapid grading of the tubers according to moisture proportion. Comput. Electron. Agric. 2016, 125, 113–124. [Google Scholar] [CrossRef]
- Zhang, W.; Zhu, Q.; Huang, M.; Guo, Y.; Qin, J. Detection and classification of potato defects using multispectral imaging system based on single shot method. Food Anal. Methods 2019, 12, 2920–2929. [Google Scholar] [CrossRef]
- Ji, Y.; Sun, L.; Li, Y.; Li, J.; Liu, S.; Xie, X.; Xu, Y. Non-destructive classification of defective potatoes based on hyperspectral imaging and support vector machine. Infrared Phys. Technol. 2019, 99, 71–79. [Google Scholar] [CrossRef]
- Su, W.-H.; Bakalis, S.; Sun, D.-W. NIR/MIR Spectroscopy in Tandem with Chemometrics for Rapid Identification and Evaluation of Potato Variety and Doneness Degree. In Proceedings of the 2019 ASABE Annual International Meeting, Boston, MA, USA, 7–10 July 2019; American Society of Agricultural and Biological Engineers: St. Joseph, MI, USA, 2019; p. 1900120. [Google Scholar] [CrossRef]
- Kjær, A.; Nielsen, G.; Stærke, S.; Clausen, M.R.; Edelenbos, M.; Jørgensen, B. Prediction of starch, soluble sugars and amino acids in potatoes (Solanum tuberosum L.) using hyperspectral imaging, dielectric and LF-NMR methodologies. Potato Res. 2016, 59, 357–374. [Google Scholar] [CrossRef]
- Hu, J.; Gong, H.; Li, S.; Mu, Y.; Guo, Y.; Sun, Y.; Hu, T.; Bao, Y. Cotton Weed-YOLO: A Lightweight and Highly Accurate Cotton Weed Identification Model for Precision Agriculture. Agronomy 2024, 14, 2911. [Google Scholar] [CrossRef]
- Li, K.; Wang, J.; Jalil, H.; Wang, H. A fast and lightweight detection algorithm for passion fruit pests based on improved YOLOv5. Comput. Electron. Agric. 2023, 204, 107534. [Google Scholar] [CrossRef]
- Sun, Y.; Zhang, D.; Guo, X.; Yang, H. Lightweight Algorithm for Apple Detection Based on an Improved YOLOv5 Model. Plants 2023, 12, 3032. [Google Scholar] [CrossRef]
- Noordam, J.C.; Otten, G.W.; Timmermans, T.J.; van Zwol, B.H. High-speed potato grading and quality inspection based on a color vision system. In Proceedings of the Machine Vision Applications in Industrial Inspection VIII, San Jose, CA, USA, 24–26 January 2000; Volume 3966, pp. 206–217. [Google Scholar] [CrossRef]
- Hassankhani, R. Potato surface defect detection in machine vision system. Afr. J. Agric. Res. 2012, 7, 844–850. [Google Scholar]
- Wang, C.; Xiao, Z. Potato Surface Defect Detection Based on Deep Transfer Learning. Agriculture 2021, 11, 863. [Google Scholar] [CrossRef]
- Tian, Y.; Yang, G.; Wang, Z.; Wang, H.; Li, E.; Liang, Z. Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Comput. Electron. Agric. 2019, 157, 417–426. [Google Scholar] [CrossRef]
- Li, X.; Wang, F.; Guo, Y.; Liu, Y.; Lv, H.; Zeng, F.; Lv, C. Improved YOLO v5s-Based Detection Method for External Defects in Potato. Front. Plant Sci. 2025, 16, 1527508. [Google Scholar] [CrossRef]
- Zhang, W.; Zeng, X.; Liu, S.; Mu, G.; Zhang, H.; Guo, Z. Detection Method of Potato Seed Bud Eye Based on Improved YOLO v5s. Trans. Chin. Soc. Agric. Mach. 2023, 54, 260–269. [Google Scholar]
- Zhang, X.; Cui, J.; Liu, H.; Han, Y.; Ai, H.; Dong, C.; Zhang, J.; Chu, Y. Weed Identification in Soybean Seedling Stage Based on Optimized Faster R-CNN Algorithm. Agriculture 2023, 13, 175. [Google Scholar] [CrossRef]
- Zhang, K.; Wang, S.; Hu, Y.; Yang, H.; Guo, T.; Yi, X. Evaluation Method of Potato Storage External Defects Based on Improved U-Net. Agronomy 2023, 13, 2503. [Google Scholar] [CrossRef]
- Xiang, Y.; Yao, J.; Yang, Y.; Yao, K.; Wu, C.; Yue, X.; Li, Z.; Ma, M.; Zhang, J.; Gong, G. Real-Time Detection Algorithm for Kiwifruit Canker Based on a Lightweight and Efficient Generative Adversarial Network. Plants 2023, 12, 3053. [Google Scholar] [CrossRef]
- Song, P.; Zhao, L.; Li, H.; Xue, X.; Liu, H. RSE-YOLOv8: An Algorithm for Underwater Biological Target Detection. Sensors 2024, 24, 6030. [Google Scholar] [CrossRef] [PubMed]
- Zhang, W.; Huang, H.; Sun, Y.; Wu, X. AgriPest-YOLO: A Rapid Light-Trap Agricultural Pest Detection Method Based on Deep Learning. Front. Plant Sci. 2022, 13, 1079384. [Google Scholar] [CrossRef]
- Jing, J.; Zhai, M.; Dou, S.; Wang, L.; Lou, B.; Yan, J.; Yuan, S. Optimizing the YOLOv7-Tiny Model with Multiple Strategies for Citrus Fruit Yield Estimation in Complex Scenarios. Agriculture 2024, 14, 303. [Google Scholar] [CrossRef]
- Qiu, Z.; Wang, W.; Jin, X.; Wang, F.; He, Z.; Ji, J.; Jin, S. DCS-YOLOv5s: A Lightweight Algorithm for Multi-Target Recognition of Potato Seed Potatoes Based on YOLOv5s. Agronomy 2024, 14, 2558. [Google Scholar] [CrossRef]
- Li, Y.; Xu, S.; Zhu, Z.; Wang, P.; Li, K.; He, Q.; Zheng, Q. EFC-YOLO: An Efficient Surface-Defect-Detection Algorithm for Steel Strips. Sensors 2023, 23, 7619. [Google Scholar] [CrossRef]
- Dang, F.; Chen, D.; Lu, Y.; Li, Z. YOLOWeeds: A novel benchmark of YOLO object detectors for multi-class weed detection in cotton production systems. Comput. Electron. Agric. 2023, 205, 107655. [Google Scholar] [CrossRef]
- Chen, J.; Kao, S.-H.; He, H.; Zhuo, W.; Wen, S.; Lee, C.-H.; Chan, S.-H.G. Run, Don’t Walk: Chasing Higher FLOPS for Faster Neural Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 18–22 June 2023; pp. 12021–12031. [Google Scholar] [CrossRef]
- Zhang, J.; Tian, M.; Yang, Z.; Li, J.; Zhao, L. An improved target detection method based on YOLOv5 in natural orchard environments. Comput. Electron. Agric. 2024, 219, 108780. [Google Scholar] [CrossRef]
- Lyu, S.; Li, R.; Zhao, Y.; Li, Z.; Fan, R.; Liu, S. Green Citrus Detection and Counting in Orchards Based on YOLOv5-CS and AI Edge System. Sensors 2022, 22, 576. [Google Scholar] [CrossRef]
- Zheng, L.; Long, L.; Zhu, C.; Jia, M.; Chen, P.; Tie, J. A Lightweight Cotton Field Weed Detection Model Enhanced with EfficientNet and Attention Mechanisms. Agronomy 2024, 14, 2649. [Google Scholar] [CrossRef]
- Dai, G.; Hu, L.; Fan, J.; Yan, S.; Li, R. A deep learning-based object detection scheme by improving YOLOv5 for sprouted potatoes datasets. IEEE Access 2022, 10, 85416–85428. Available online: https://ieeexplore.ieee.org/document/9832885 (accessed on 16 January 2025).
- Huang, J.; Wang, X.; Jin, C.; Cheein, F.A.; Yang, X. Estimation of the Orientation of Potatoes and Detection Bud Eye Position Using Potato Orientation Detection You Only Look Once with Fast and Accurate Features for the Movement Strategy of Intelligent Cutting Robots. Eng. Appl. Artif. Intell. 2024, 142, 109922. [Google Scholar] [CrossRef]
- Liu, W.; Li, Z.; Zhang, S.; Qin, T.; Zhao, J. Bud-YOLOv8s: A Potato Bud-Eye-Detection Algorithm Based on Improved YOLOv8s. Electronics 2024, 13, 2541. [Google Scholar] [CrossRef]
- Zhang, D.Y.; Luo, H.S.; Wang, D.Y.; Zhou, X.-G.; Li, W.-F.; Gu, C.-Y.; Zhang, G.; He, F.-M. Assessment of the levels of damage caused by Fusarium head blight in wheat using an improved YOLOV5 method. Comput. Electron. Agric. 2022, 198, 107086. [Google Scholar] [CrossRef]
Model | P/% | R/% | mAP/% | Params (M) | FLOPs (G) | Weights/MB |
---|---|---|---|---|---|---|
YOLOv5s | 92.8 | 88.3 | 94.0 | 7.02 | 15.8 | 13.7 |
YOLOv5s-C | 93.5 | 90.8 | 95.2 | 6.13 | 14.6 | 12.4 |
YOLOv5s-DC | 93.0 | 91.3 | 95.5 | 4.98 | 14.8 | 10.2 |
YOLOv5s-DS | 94.5 | 91.0 | 95.0 | 6.02 | 15.3 | 12.3 |
Flaw-YOLOv5s | 94.6 | 91.1 | 95.6 | 4.33 | 13.8 | 8.9 |
Model | P/% | R/% | mAP/% | Params (M) | FLOPs (G) | Weights/MB |
---|---|---|---|---|---|---|
YOLOv3s | 92.3 | 84.5 | 91.6 | 61.51 | 154.6 | 123.4 |
YOLOv3-tiny | 92.0 | 82.9 | 88.4 | 8.08 | 18.4 | 16.3 |
YOLOv5s | 92.8 | 88.3 | 94.0 | 7.02 | 15.8 | 13.7 |
YOLOv6s | 94.3 | 88.1 | 94.1 | 16.31 | 44.2 | 32.9 |
YOLOv8s | 94.9 | 91.3 | 95.5 | 11.14 | 28.6 | 22.5 |
Flaw-YOLOv5s | 94.6 | 91.1 | 95.6 | 4.33 | 13.8 | 8.9 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wu, H.; Zhu, R.; Wang, H.; Wang, X.; Huang, J.; Liu, S. Flaw-YOLOv5s: A Lightweight Potato Surface Defect Detection Algorithm Based on Multi-Scale Feature Fusion. Agronomy 2025, 15, 875. https://doi.org/10.3390/agronomy15040875
Wu H, Zhu R, Wang H, Wang X, Huang J, Liu S. Flaw-YOLOv5s: A Lightweight Potato Surface Defect Detection Algorithm Based on Multi-Scale Feature Fusion. Agronomy. 2025; 15(4):875. https://doi.org/10.3390/agronomy15040875
Chicago/Turabian StyleWu, Haitao, Ranhui Zhu, Hengren Wang, Xiangyou Wang, Jie Huang, and Shuwei Liu. 2025. "Flaw-YOLOv5s: A Lightweight Potato Surface Defect Detection Algorithm Based on Multi-Scale Feature Fusion" Agronomy 15, no. 4: 875. https://doi.org/10.3390/agronomy15040875
APA StyleWu, H., Zhu, R., Wang, H., Wang, X., Huang, J., & Liu, S. (2025). Flaw-YOLOv5s: A Lightweight Potato Surface Defect Detection Algorithm Based on Multi-Scale Feature Fusion. Agronomy, 15(4), 875. https://doi.org/10.3390/agronomy15040875