Skip to main navigation Skip to search Skip to main content

A Computer Vision Approach for Cookie Packaging Inspection

Research output: Chapter in Book/Report/Conference proceedingPaper (Conference contribution)peer-review

Abstract

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.

Original languageEnglish
Title of host publicationArtificial Intelligence, COMIA 2025 - 17th Mexican Congress, Proceedings
EditorsLourdes Martínez-Villaseñor, Bella Martínez-Seis, Obdulia Pichardo
PublisherSpringer Science and Business Media Deutschland GmbH
Pages108-119
Number of pages12
ISBN (Print)9783031979125
DOIs
StatePublished - 2025
Event17th Mexican Conference on Artificial Intelligence, COMIA 2025 - Mexico City, Mexico
Duration: 12 May 202516 May 2025

Publication series

NameCommunications in Computer and Information Science
Volume2554 CCIS
ISSN (Print)1865-0929
ISSN (Electronic)1865-0937

Conference

Conference17th Mexican Conference on Artificial Intelligence, COMIA 2025
Country/TerritoryMexico
CityMexico City
Period12/05/2516/05/25

Fingerprint

Dive into the research topics of 'A Computer Vision Approach for Cookie Packaging Inspection'. Together they form a unique fingerprint.

Cite this