Feasibility of Hyperspectral Imaging and Machine Learning for Rapid Prescreening of Aflatoxin B1 in Maize Kernels
Yongping Jiang1,2, Bowen Tai1, Yufan Yang1
1Institute of Food Science and Technology, Chinese Academy of Agricultural Sciences, Beijing 100193, China.
Abstract:
Aflatoxin B1 (AFB1) contamination in maize poses serious risks to food and feed safety; however, conventional laboratory-based assays are often constrained by time and throughput for large-scale screening. This study proposes a hyperspectral imaging (HSI) workflow for rapid, non-destructive prediction of AFB1. A total of 236 hyperspectral images were acquired in the 400-1000 nm range (256 bands) from maize samples covering a broad gradient of AFB1 contamination, and spectral features were extracted from regions of interest (ROI) for model development. The results demonstrate that appropriate spectral preprocessing and wavelength selection play a critical role in improving model robustness, with the SNV-CARS-KNN model achieving the best prediction performance (test R2 = 0.9341, RMSE = 4.8938). Based on the predicted AFB1 values, contamination grading was further explored to enable rapid screening and risk management in agricultural applications. Aflatoxin B1 (AFB1) contamination in maize poses substantial risks to food and feed safety, creating a need for rapid screening tools that can support high-throughput prescreening. In this study, hyperspectral imaging (HSI) was explored as a non-destructive approach for the preliminary assessment of AFB1 contamination in maize kernels. A total of 236 hyperspectral images were collected in the 400-1000 nm range, and region-of-interest spectra were extracted for model development. Spectral preprocessing and wavelength selection strategies were compared in combination with several conventional regression models to examine their influence on predictive performance using the current dataset. Among the tested combinations, the SNV-CARS-KNN model showed the most favorable performance on the held-out test set (R2 = 0.9341; RMSE = 4.8938). In addition, a grade-based classification derived from predicted values was explored as an application-oriented extension for rapid risk sorting. However, the study was conducted on artificially contaminated samples and relied on rapid-test-derived reference values, so the findings should be interpreted as a proof of concept rather than a fully validated quantitative method. Overall, the results support the potential of HSI for rapid prescreening of AFB1 in maize and provide a basis for further validation using more rigorous reference analysis and independent sample sets.

