Non-destructive identification of closely related japonica rice seeds using hyperspectral imaging combined with HHO-optimized XGBoost
Abstract
Genetically closely-related japonica rice seed varieties are difficult to distinguish using conventional identification techniques. These traditional methods generally require time-consuming operations, complex experimental workflows, and seed destruction for sample testing. Hyperspectral imaging offers a feasible non-destructive way to screen crop germplasm resources. Nevertheless, raw hyperspectral signals are easily disturbed by instrument noise and external environmental interference; the dataset also suffers high dimensionality and redundant spectral features, which hinders model performance. Standard XGBoost models rely on manual hyperparameter adjustment, which frequently falls into local optimal solutions. Besides, poor model interpretability makes it hard to reduce classification errors between genetically similar rice materials. To address these practical problems, this work constructed an improved XGBoost framework combined with multi-step spectral preprocessing and Harris Hawks Optimization (HHO). SHAP analysis was further introduced to reveal classification rules of critical spectral bands and realize accurate, non-destructive identification of rice seeds. Five pixel statistical calculation strategies were compared, and mean spectral curves were chosen as model input data. Savitzky-Golay smoothing and Min-Max normalization were implemented to suppress spectral noise. The Successive Projections Algorithm (SPA) was then adopted to pick out 22 sensitive bands with low multicollinearity. This step preserved effective discriminative information while lowering feature dimensions. SHAP values were applied to quantify feature contributions from both global importance and single-sample perspectives, alleviating the black-box limitation of machine-learning classifiers. Nine different swarm intelligence algorithms were tested for automatic hyperparameter searching of XGBoost. The final HHO-XGBoost approach achieved 94.72% overall accuracy and a Kappa coefficient of 0.9389. Per-class F1-score results demonstrated that the established method could obviously decrease misclassification among nine japonica rice varieties. This technical workflow integrates spectral preprocessing, feature screening, interpretive analysis and intelligent parameter optimization. It can serve as a practical reference for non-destructive identification of crop germplasm with close genetic relationships.