FOOD SCIENCE ›› 2025, Vol. 46 ›› Issue (22): 1-12.doi: 10.7506/spkx1002-6630-20250415-117

• Food Inspection Technology Based on Computer Vision and Deep Learning • Previous Articles     Next Articles

Improved YOLOv8 Model with Multi-scale Lightweight for Surface Defect Detection in Online Apple Grading

GUO Zhiming, XIAO Haidi, WANG Chen, SUN Chanjun, JIANG Shuiquan, ZOU Xiaobo   

  1. (1. School of Food and Biological Engineering, Jiangsu University, Zhenjiang 212013, China; 2. Key Laboratory of Intelligent Detection and Processing of Food in China Light Industry, Zhenjiang 212013, China; 3. National R&D Center for Fruit and Vegetable Processing Equipment, Jiangsu Kaiyi Intelligent Technology Co., Ltd., Wuxi 214174, China)
  • Published:2025-11-10

Abstract: To address the problems of limited computational resources and large-scale variations in surface defects encountered in apple grading in orchards, an improved machine vision-based model for apple surface defect recognition was developed using You Only Look Once version 8 (YOLOv8), increasing the detection efficiency of apple surface defects and simultaneously ensuring the accuracy of the detection. A machine vision system was built in our laboratory to capture 5 500 images of Fuji apples, showing pedicel and calyx characteristics, six common surface defects (black spots, rot, mechanical damage, sunburn, brown spots, and cracks), and one type of environmental debris, which were annotated on the images. The replicated ghost next (RepGhostNeXt) and efficient quality-aware feature pyramid network (EffQAFPN) algorithm structures were introduced to improve the backbone feature extraction network and feature pyramid of the YOLOv8 model. Subsequently, five models were trained and compared: YOLOv8, YOLOv8n, YOLOv8 + EffQAFPN, YOLOv8 + RepGhostNeXt, and YOLOv8 + EffQAFPN + RepGhostNeXt. The focus was placed on comparing the accuracy and efficiency of the models in apple surface defect detection. Experimental results indicated that the YOLOv8 + EffQAFPN + RepGhostNeXt model exhibited the best overall detection performance with an overall recognition accuracy of 94.9% and an average frame rate of 7.81 frames per second (FPS). The model demonstrated efficient apple surface defect detection under limited computational resources, providing technical support for efficient and convenient apple grading in orchards.

Key words: machine vision; apple surface defects; You Only Look Once version 8; defect detection

CLC Number: