## 5 Conclusions  
Considering the stability, real-time, and high-efficiency requirements of apple grading, the non-destructive detection of diseased fruits of apple adopts a lightweight detection approach to prevent grading loss. Consequently, this paper introduces the VEW-YOLOv8n apple grading detection algorithm. This algorithm involves a structural reparameterization of the VanillaC2f module, which lightens the backbone network and integrates an extended activation function to enhance the model's nonlinear expression capability. Additionally, the paper describes the development of an Efficient-Neck thin-neck structure, incorporating the lightweight GSConv module and VoVGSCSP module. This structure lightens the neck network, reduces the parameter count, and applies a channel mixing and washing strategy to efficiently extract feature information while elevating model detection accuracy. Furthermore, the implementation of the WIoU bounding-box loss function, combined with a strategy that diminishes the quality assessment index of outlier degree by using the competitiveness of high-quality frames, suppresses the adverse effects of low-quality frames. This approach effectively addresses the deviation issue of traditional IoU anchor frames and dynamically updates the gradient gain allocation strategy; thus, enhancing the model's robustness and generalization capability. The paper substantiates the efficacy of these algorithmic enhancements through ablation experiments and comparative experiments with prevalent target detection algorithms. The results demonstrate that the VEW-YOLOv8n model, compared to the YOLOv8n model, increases the average accuracy by 2.7%, reduces parameter count by 24.3%, decreases computation volume by 28.0%, shrinks model size by 23.3%, and boosts inference speed by 8.5%. Under the premise of maintaining accuracy, the VEW-YOLOv8n model achieves reductions in parameters and computation volume to various extents, markedly enhancing the model's lightweight effect, and more time can be set aside for the grading process. This offers a more advantageous identification method for the detection of diseased apples in apple grading. Further research will be carried out on the apple grading task and deployed and applied in the apple grading assembly line at a later stage.  
B.H.: Data collection, algorithm design, experiments, and writing; J.Z.: Supervision and writing review; Z.L.: Data collection and data organization; L.D.: investigation and validation. All authors have read and agreed to the published version of the manuscript.  
This work was supported by the Natural Science Foundation of Xinjiang Uygur Autonomous Region [2022D01A202]; Xinjiang Uygur Autonomous Region Colleges and Universities Research Program Project [XJEDU2020Y020]; Special Program for Central-Guided Local Science and Technology Development \"Construction of Smart Agricultural Innovation Platform\" [ZYYD2022B12].  
Not applicable.  
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.  
The authors are very grateful to the editor and reviewers for their valuable comments and suggestions to improve the paper.  
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.