Abstract:Objective To address the high missed detection rate and low sorting efficiency of existing food sorting system.Methods For an automated food sorting system based on visual inspection, a method integrating an improved YOLOv11 model and a dynamic sorting strategy was proposed. The improved YOLOv11 object detection model enhances the ability to identify and locate food defects. Combined with the dynamic sorting strategy, the system achieves dynamic target sorting by the robot. The improved model introduces a lightweight cross-scale feature fusion module, which enhances network efficiency by simplifying the structure and strengthening information exchange. The C3k2 module is replaced by the C3k2_Faster_EMA module, significantly improving computational efficiency while maintaining high accuracy. The Inner_DIoU loss replaces the CIoU loss to enhance detection and localization accuracy. The superiority of this approach was verified by experiments.Results The experimental method can detect food defects faster and more accurately, achieving better sorting success rates and efficiency. It can accurately and efficiently sort different defective foods to their corresponding positions. The improved model achieves an average precision of 99.67% in food defect detection, which is 7.93% higher than the original model, and the system inference speed reaches 120 frames per second. When the conveyor speed is 100~200 mm/s, the sorting success rate of the experimental method exceeds 99.00%, and the average sorting time is less than 0.75 seconds.Conclusion By integrating deep learning and dynamic sorting strategies, the intelligence level and production efficiency of food sorting can be significantly improved.