Abstract:Objective: To solve the problems of low detection efficiency and poor accuracy of existing automatic detection methods for egg defect images. Methods: Based on the egg detection system, an improved YOLOv5 automatic detection model was proposed. Added the lightweight network MobileNetv3 to YOLOv5 model to reduce the complexity of the model, and deleted the neck network and small target detection at the output end. Results: Compared with the traditional control method, this method can detect the surface defects of egg targets more accurately and efficiently, with the complexity of more than 35% reducing, the detection time of a single image of 14.25 ms, and the detection accuracy rate over 95%, which meet the needs of food defect detection. Conclusion: The improved YOLOv5 detection model can effectively improve the detection efficiency of egg defects.