Handheld Spectroscopy for Dairy Quality Control: Towards a Real Time Milk Spoilage Classification Model
摘要
In response to efforts to reduce food waste, some leading UK supermarkets have removed expiration dates from a variety of dairy products, such as milk, encouraging consumers to rely on the subjective ‘sniff test’ for assessing freshness. While this approach aims to extend the shelf life of dairy items, it inadvertently creates uncertainty among consumers about the freshness of their products in the absence of quantifiable information from producers. To address this issue, this work explores a proof of principle experiment leveraging machine learning techniques on spectral data recorded by the consumer-friendly FreshDetect BFD-100 3D Fluorescence spectrometer to perform quantitative, on-the-fly assessment of milk quality. A spectral dataset of twelve milk samples deteriorating over 48 h was collected and correlated with an increase in acidity, an indicator of milk spoilage. Seven classification algorithms were tested to classify the milk samples as fresh or spoiled based on a defined pH cut-off. Among these, a Naïve Bayes classifier was the best performing model, achieving an average accuracy of 92.2% using 10-fold cross-validation for training and 95.4% on an independent test set. These findings highlight the potential of using machine learning and spectral data to provide consumers with reliable, real-time assessments of milk freshness.