Abstract:[Objective] This study aims to achieve rapid detection of AFB1 contamination levels in peanuts through dual-band hyperspectral imaging and machine learning.[Method] A peanut AFB1 contamination level warning model was constructed via a dual-band hyperspectral imaging system consisting of visible near-infrared spectroscopy at 400~1 000 nm and short-wave near-infrared spectroscopy at 900~1 700 nm, combined with machine learning. Peanut samples with four contamination levels were collected, in which the mass fraction of AFB1 was determined by ultra-high performance liquid chromatography-tandem mass spectrometry. The effects of four pretreatment methods [first derivative, second derivative, multiplicative scatter correction, and standard normal variate (SNV)], two characteristic wavelength selection methods [successive projections algorithm and uninformative variables elimination (UVE)], and two machine learning methods [support vector machine (SVM) and back-propagation neural network] on classification performance were compared.[Result] The combined model SNV-UVE-SVM effectively determined AFB1 contamination levels in both bands, with optimal performance in the 900~1 700 nm band. The characteristic wavelengths were primarily concentrated in the ranges of 1 126~1 308 nm and 1 588~1 720 nm, achieving 100.00% accuracy in both the training and test sets.[Conclusion] This paper pioneered the construction of an intelligent early-warning model for AFB1 contamination levels in peanuts by using dual-band hyperspectral imaging and machine learning algorithms, providing a novel technical paradigm for non-destructive detection of mycotoxin contamination in agricultural products. This approach holds significant engineering application value for real-time online monitoring in processing stages.