Abstract:Objective To address the low speed and efficiency as well as missed and false detection in manual inspection of defective products in pre-fried potato chip production, enhance the accuracy and speed of product defect identification, and ensure safe production.Methods An improved recognition algorithm, EISW-YOLOv8n, based on YOLOv8n is proposed. Firstly, the efficient multiscale channel attention (EMCA) mechanism is introduced into the network to highlight important channel information. Secondly, to improve the model ability to extract features and capture long-distance dependencies within features, the iRMBS module, optimized by SWC convolution, is introduced into the C2f module. Finally, the loss function WIOU is introduced to enhance the localization accuracy of the prediction box and the convergence speed of the model.Results The proposed model achieves the average precision of 94.3% for defect detection in pre-fried potato chips. Compared with the original YOLOv8n model and common object detection algorithms, this network demonstrates superior performance.Conclusion EISW-YOLOv8n can meet the requirements for identifying appearance defects in pre-fried potato chips.