Publication:
Detection of label printing defects on sdd drive using pre-trained convolutional neural networks

Thumbnail Image
Date
2024-04
Authors
Lai, Mei Yee
Journal Title
Journal ISSN
Volume Title
Publisher
Research Projects
Organizational Units
Journal Issue
Abstract
Label printing defects, such as misalignment, smudging, fading, or incomplete printing on product labels, can result in inaccurate information, mislabeled products, or failure to comply with regulations. These issues may lead to legal action, increased customer complaints, and product returns. Previous work developed a YOLOv8 model to detect label printing defects on a specific type of label and created a Python-based label printing defect detection system, including an ROI extraction algorithm, for integration into the manufacturing line of Western Digital. However, the manufacturing system is written in C++, making direct deployment of the Python-trained model incompatible. Additionally, the manufacturing process involves multiple types of label prints, requiring modifications to the ROI extraction algorithm and retraining the model with a more diverse dataset. This project aims to implement the previous developed YOLOv8 model in both deployment and retraining processes. Given that the system program is written in C++, three deployment methods are proposed, by using OpenCV DNN API, LibTorch API, and ONNX Runtime. The project compared the efficiencies of these deployment methods in terms of accuracy and inference time, considering both CPU and GPU (CUDA) utilization. To enhance system versatility, the ROI algorithm is replaced with another YOLOv8n trained model. For defect detection, the initial model is retrained with a dataset comprising six different types of label prints. Among the deployment methods, the LibTorch API emerged as the most suitable, demonstrating the highest performance with a precision of 0.984, recall of 0.910, and F1 score of 0.946. It also showed the highest efficiency, with a 230ms warm-up time, 68ms average inference time, and 126ms average analysis time in a CUDA environment, and a 911ms warm-up time, 653ms average inference time, and 746ms average analysis time in a CPU environment. The YOLOv8n trained model for ROI extraction achieved perfect scores with precision, recall, and F1 score of 1, and mAP50 and mAP50:95 scores of 0.995. The retrained model for defect detection across multiple label print types achieved a precision of 0.867, recall of 0.791, F1 score of 0.827, mAP50 of 0.804, and mAP50:95 of 0.661. This deployment aims to strengthen the robustness and reliability of manufacturing processes by bridging the gap between industrial application and academic research, thereby developing a versatile defect detection system using CNNs in an actual manufacturing line.
Description
Keywords
Citation