Hyperspectral Imaging-Based Adulteration Detection of Edible Oil using Optimized Machine Learning Models
Abstract
Oil adulteration poses a significant risk to public health and compromises food quality and authenticity, necessitating reliable and rapid detection methods. This study proposes a non-destructive method for detecting edible oil adulteration using hyperspectral imaging integrated with spectral feature optimization and machine learning techniques. A total of 480 samples, comprising pure oils (tea tree, rose, turmeric, and rosehip oil) and adulterated variants (orange, vitamin E, lemon, and garlic oil), were analyzed using a Specim FX10 camera system. The Savitzky–Golay filter was used to preprocess spectral data, remove noise, and improve spectral smoothness. The spectral features were then optimized and used to train and test various machine learning models, such as Linear Discriminant Analysis, CatBoost, Gradient Boosting Machine, and Extreme Gradient Boosting Machine. The best-performing model among the evaluated models was the Extreme Gradient Boosting Machine, with 99.98% training accuracy, 98.2% testing and validation accuracy, high precision, recall, F1-score, and balanced accuracy (98.3%), Jaccard Index (96.7%), and low log loss (5%) and Hamming loss (2%). The experimental results point to the usefulness of the proposed method in providing accurate, fast, and non-invasive oil adulteration detection. This study indicates the possibility of using hyperspectral imaging with optimized machine learning algorithms to achieve high food quality measurements and real-time applications in the industrial sector of food safety and quality control.