Abstract
The early detection of internal damage caused by Elasmopalpus lignosellus in fresh asparagus constitutes a challenge for the agro-export industry due to the limited sensitivity of traditional visual inspection. This study evaluated the potential of VIS-NIR hyperspectral imaging (390-1036 nm) combined with machine-learning models to discriminate between infested (PB) and sound (SB) asparagus spears. A balanced dataset of 900 samples was acquired, and preprocessing was performed using Savitzky-Golay and SNV. Four classifiers (SVM, MLP, Elastic Net, and XGBoost) were compared. The optimized SVM model achieved the best results (CV Accuracy = 0.9889; AUC = 0.9997). The spectrum was reduced to 60 bands while LOBO and RFE were used to maintain high performance. In external validation (n = 3000), the model achieved an accuracy of 97.9% and an AUC of 0.9976. The results demonstrate the viability of implementing non-destructive systems based on VIS-NIR to improve the quality control of asparagus destined for export.