AI-powered optical quality control of yogurt: Detecting melamine adulteration and monitoring shelf-life
• AI detects yogurt quality non-destructively under variable lighting • Shelf-life monitoring achieves 96.95% accuracy under variable lighting • Deep learning enables fast, scalable food safety and quality monitoring • Rapid melamine detection using deep learning with >94% accuracy This study aimed to develop and validate an AI-based optical methodology for yogurt quality control, focusing on melamine adulteration detection and shelf-life monitoring. Three types of yogurts (natural, sweetened, and lemon-flavored) from the same brand were analyzed using photographs processed with convolutional neural networks (CNNs). Experiments were carried out under two lighting conditions by varying the camera shutter speed (1/30 and 1/250 s). A ResNet34 residual neural network was employed, and four CNNs were trained (two per study) with 2,100 images per lighting condition for melamine detection and 5,700 per shutter speed for quality control. Blind validation results showed 94.30% and 91.74% accuracy for melamine adulteration detection at 1/30 s and 1/250 s, respectively, and 96.95% and 96.86% for freshness classification under the same conditions. These findings demonstrate that AI-driven image analysis can serve as a rapid, non-invasive, and cost-effective tool to support food safety and quality assurance in the dairy sector, complementing traditional laboratory methods by enabling efficient preliminary screening of samples. All results are expressed as mean ± standard deviation, and model robustness was confirmed by per-class evaluation metrics (precision, recall, F1-score) exceeding 0.90 in more than 85% of the classes.
Authors
- Sandra Pradana‐López
- Ana M. Pérez-Calabuig (ORCID: https://orcid.org/0000-0001-9784-5699)
- John C. Cancilla (ORCID: https://orcid.org/0000-0003-3645-7224)
- José S. Torrecilla (ORCID: https://orcid.org/0000-0003-1209-203X)
- María Luz Mena
Institutions
- Universidad Complutense de Madrid (ES)
- Scintillon Institute (US)
- Universidad Politécnica de Madrid (ES)
Publication Details
- Journal
- Applied Food Research
- Published
- 2025-11-12
- DOI
- https://doi.org/10.1016/j.afres.2025.101510
- Primary Topic
- Melamine detection and toxicity
- Type
- article
- Field-Weighted Citation Impact
- 0.00