Research on the Identification of Composite Spices Based on Terahertz Spectroscopy and Machine Learning Algorithms
The similar appearance and composition of pungent spices frequently give rise to adulteration, which not only causes market confusion but also results in inconsistent product quality. This study employed terahertz time-domain spectra and absorption spectra coupled with three machine learning algorithms-Random Forest (RF), Support Vector Machine (SVM), and Deep Neural Network (DNN)-for the classification and identification of five spices (garlic, green pepper, Zanthoxylum bungeanum, Toona sinensis, and Qin pepper) as well as their binary mixtures. For single-component spices, all three models achieved classification accuracies exceeding 95% for both time-domain and absorption spectra. Among these models, the SVM model exhibited the best performance, with accuracies of 96.82% for time-domain spectra and 98.75% for absorption spectra. When classifying binary mixtures, models based on time-domain spectra significantly outperformed those based on absorption spectra. Notably, the DNN model demonstrated superior capability in this context, achieving an accuracy of 94.97% for the green pepper-Zanthoxylum bungeanum mixture. To further improve classification accuracy, an innovative multimodal classification model integrating time-domain and absorption spectra was developed. This multimodal model achieved an outstanding accuracy of 98.85%. Collectively, these results confirmed the effectiveness of terahertz spectroscopy combined with machine learning for spice identification, thereby providing robust technical support for nondestructive testing and quality monitoring in the global spice industry.
Authors
- Zhaogai Wang (ORCID: https://orcid.org/0000-0001-8808-9211)
- Pengfei Jiang (ORCID: https://orcid.org/0009-0001-3969-5490)
- Bin Ma (ORCID: https://orcid.org/0000-0002-2642-582X)
- Yi Ding (ORCID: https://orcid.org/0009-0000-5975-7495)
- Ling Feng (ORCID: https://orcid.org/0000-0001-7378-4342)
Institutions
- North China University of Water Resources and Electric Power (CN)
Publication Details
- Journal
- Journal of Food Protection
- Published
- 2025-11-17
- DOI
- https://doi.org/10.1016/j.jfp.2025.100668
- Citations
- 1
- Primary Topic
- Terahertz technology and applications
- Type
- article
- Field-Weighted Citation Impact
- 0.73