Nondestructive hyperspectral spectroscopic analysis of coconut oil using transformer-enhanced machine learning for advanced food processing applications
The adulteration of coconut oil is a major concern because of its effects on the food, food authenticity and consumer safety. In this study, a novel noninvasive hyperspectral imaging framework (Swin-KRnt) is proposed to detect the coconut oil adulteration and predict the thermal degradation. The proposed model is a combination of Swin Transformer based feature enhancement, SelectKBest based feature optimization and Random Forest learning for improved spectral representation and predictive performance. Nine hyperspectral wavelengths were obtained and used to obtain the meaningful information from coconut oil samples by applying spectral indices and statistical feature engineering. The results of the experiments confirmed the ability of the proposed framework to outperform the traditional machine learning models, attaining an R2 value exceeding 99% and minimal RMSE and MAE values. Ablation studies and feature engineering analyses also underscored the benefits of transformer-based learning and optimal feature selection for enhancing model robustness and accuracy. The results showed that the proposed Swin-KRnt framework is a fast, environmentally friendly and highly accurate approach for intelligent food authentication and precision food quality monitoring applications.
Authors
- Yonis Gulzar (ORCID: https://orcid.org/0000-0002-6515-1569)
- Xinpeng Bai (ORCID: https://orcid.org/0000-0001-9297-2496)
- Anum Mehmood
- Hayitov Abdulla Nurmatovich (ORCID: https://orcid.org/0000-0003-1319-6578)
- Uzair Aslam Bhatti
- Egambergan Xudaynazarov
Institutions
- Urgench State University (UZ)
- Hainan University (CN)
Publication Details
- Journal
- Spectroscopy Letters
- Published
- 2026-09-30
- DOI
- https://doi.org/10.1080/00387010.2026.2737374
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00