Non-destructive classification of milk types using visible–near infrared spectroscopy and machine learning
5 affiliations
- 1Department of Animal Science, Bangladesh Agricultural University, Mymensingh 2202, Bangladesh
- 2Division of Applied Life Science (BK21 Four), Gyeongsang National University, 501 Jinju-daero, Jinju-si, Gyeongsangnam-do 52828, Republic of Korea
- 3Faculty of Animal Husbandry, Bangladesh Agricultural University, Mymensingh 2202, Bangladesh
- 4Institute of Agriculture and Life Science Gyeongsang National University, 501 Jinju-daero, Jinju-si, Gyeongsangnam-do 52828, Republic of Korea
- 5Department of Environmental Science and Disaster Management, Noakhali Science and Technology University, Noakhali-384, Bangladesh
Abstract
Milk authentication is important for ensuring product quality, consumer confidence, and regulatory compliance in the dairy industry. This study developed a non-destructive milk classification framework by integrating Visible–Near Infrared (Vis–NIR) spectroscopy with machine learning to differentiate cow milk, goat milk, and reconstituted milk. A total of 3000 spectra (1000 per class) were collected and divided into training (n = 2400) and independent test (n = 600) datasets using stratified sampling. Four preprocessing pipelines and ten machine learning models were systematically evaluated. Spectral analysis revealed clear class-dependent differences, particularly within the 600–1000 nm region, corresponding to absorption features associated with water, lipids, and proteins. Principal Component Analysis (PCA) demonstrated distinct clustering among milk classes, indicating strong spectral separability. Cross-validation performed on the training dataset showed excellent performance, with XGBoost achieving the highest mean accuracy (99.35%), followed by LightGBM (99.20%) and Gradient Boosting (99.00%). Independent test evaluation further confirmed strong generalization capability, where XGBoost achieved the highest accuracy (99.17%). Overall, the results demonstrate the potential of Vis–NIR spectroscopy combined with machine learning for rapid and reliable milk authentication.
Related
- Non-Destructive Quantitative Analysis of Grape Components Based on Visible–Near-Infrared/Shortwave–Near-Infrared Spectroscopy and Chemometrics
- Rapid and non-destructive estimation of chemical properties of date syrup using visible-near infrared hyperspectral imaging combined with machine learning predictive models
- Near-infrared spectroscopy for rapid and non-destructive assessment of PFAS effects in blue mussels (Mytilus spp.): a proof-of-concept study
- Rapid and Non-Destructive Prediction of Major Milk Fatty Acid Classes Using Handheld Near-Infrared Reflectance Spectroscopy Coupled with Chemometric Analysis
- Visible and Near Infrared (VNIR) Spectroscopy to Decipher Glass and Crystal Content of Lab‐Made Martian Volcanic Analogs
BibTeX
@article{mia2026nondestructive,
title = {{Non-destructive classification of milk types using visible–near infrared spectroscopy and machine learning}},
author = {Nurkanti Mia and MA Hashem and Md. Mukhlesur Rahman and Mohammad Ismail},
journal = {Journal of Food Composition and Analysis},
year = {2026},
month = jun,
doi = {10.1016/j.jfca.2026.109313},
url = {https://doi.org/10.1016/j.jfca.2026.109313},
note = {CC BY-NC-ND},
}
RIS
TY - JOUR
TI - Non-destructive classification of milk types using visible–near infrared spectroscopy and machine learning
AU - Nurkanti Mia
AU - MA Hashem
AU - Md. Mukhlesur Rahman
AU - Mohammad Ismail
PY - 2026
DA - 2026/06/12
JO - Journal of Food Composition and Analysis
DO - 10.1016/j.jfca.2026.109313
UR - https://doi.org/10.1016/j.jfca.2026.109313
AB - Milk authentication is important for ensuring product quality, consumer confidence, and regulatory compliance in the dairy industry. This study developed a non-destructive milk classification framework by integrating Visible–Near Infrared (Vis–NIR) spectroscopy with machine learning to differentiate cow milk, goat milk, and reconstituted milk. A total of 3000 spectra (1000 per class) were collected and divided into training (n = 2400) and independent test (n = 600) datasets using stratified sampling. Four preprocessing pipelines and ten machine learning models were systematically evaluated. Spectral analysis revealed clear class-dependent differences, particularly within the 600–1000 nm region, corresponding to absorption features associated with water, lipids, and proteins. Principal Component Analysis (PCA) demonstrated distinct clustering among milk classes, indicating strong spectral separability. Cross-validation performed on the training dataset showed excellent performance, with XGBoost achieving the highest mean accuracy (99.35%), followed by LightGBM (99.20%) and Gradient Boosting (99.00%). Independent test evaluation further confirmed strong generalization capability, where XGBoost achieved the highest accuracy (99.17%). Overall, the results demonstrate the potential of Vis–NIR spectroscopy combined with machine learning for rapid and reliable milk authentication.
SN - 0889-1575
SN - 1096-0481
ER -