TY - GEN
T1 - A Computer Vision Approach for Cookie Packaging Inspection
AU - Osorio, Jesús Javier Zarate
AU - Cerna, Lourdes Ramírez
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2025.
PY - 2025
Y1 - 2025
N2 - In the context of manufacturing facilities, defective cookie packages are a common occurrence, rendering automated inspection a critical component of quality control measures. This study proposes the implementation of computer vision models, namely Convolutional Neural Networks (CNNs) and Vision Transformer (ViT), to detect defective packaging. Another contribution of this study is the creation of a dataset of cooking packaging, which categorizes images into two distinct groups: “good” and “defective” packages. The dataset incorporates challenges such as lighting variations, thereby ensuring its representativeness and relevance to real-world industrial settings. The models were implemented using PyTorch, including CNN-based architectures (ResNet-50 and AlexNet) and ViT. The proposed dataset was utilized to train and evaluate these models through 5-fold cross-validation, selecting the optimal model based on validation accuracy and F1-score. The experimental findings demonstrated that ViT outperformed CNN-based models, attaining a 98% of F1-score, recall, and 100% of accuracy on the test set, whilst ResNet-50 and AlexNet achieved 98% and 92.67% of accuracy, respectively. The findings demonstrate that ViT exhibits superiority in distinguishing between defective and non-defective packages. These findings underscore the potential of transformer-based models to enhance automated quality control in the domain of food packaging inspection.
AB - In the context of manufacturing facilities, defective cookie packages are a common occurrence, rendering automated inspection a critical component of quality control measures. This study proposes the implementation of computer vision models, namely Convolutional Neural Networks (CNNs) and Vision Transformer (ViT), to detect defective packaging. Another contribution of this study is the creation of a dataset of cooking packaging, which categorizes images into two distinct groups: “good” and “defective” packages. The dataset incorporates challenges such as lighting variations, thereby ensuring its representativeness and relevance to real-world industrial settings. The models were implemented using PyTorch, including CNN-based architectures (ResNet-50 and AlexNet) and ViT. The proposed dataset was utilized to train and evaluate these models through 5-fold cross-validation, selecting the optimal model based on validation accuracy and F1-score. The experimental findings demonstrated that ViT outperformed CNN-based models, attaining a 98% of F1-score, recall, and 100% of accuracy on the test set, whilst ResNet-50 and AlexNet achieved 98% and 92.67% of accuracy, respectively. The findings demonstrate that ViT exhibits superiority in distinguishing between defective and non-defective packages. These findings underscore the potential of transformer-based models to enhance automated quality control in the domain of food packaging inspection.
UR - https://www.scopus.com/pages/publications/105018915719
U2 - 10.1007/978-3-031-97913-2_9
DO - 10.1007/978-3-031-97913-2_9
M3 - Articulo (Contribución a conferencia)
AN - SCOPUS:105018915719
SN - 9783031979125
T3 - Communications in Computer and Information Science
SP - 108
EP - 119
BT - Artificial Intelligence, COMIA 2025 - 17th Mexican Congress, Proceedings
A2 - Martínez-Villaseñor, Lourdes
A2 - Martínez-Seis, Bella
A2 - Pichardo, Obdulia
PB - Springer Science and Business Media Deutschland GmbH
T2 - 17th Mexican Conference on Artificial Intelligence, COMIA 2025
Y2 - 12 May 2025 through 16 May 2025
ER -