DOI: 10.3390/app16167947 ISSN: 2076-3417

Rapid Non-Destructive Mango Variety Identification Using Multi-Scale Global Context Network with NIR Spectroscopy

Shankui Ding, Kun Tan, Ying He

Accurate identification of mango varieties holds substantial significance for the elevation of product added value and the facilitation of market differentiation through quality-based pricing. Near-infrared (NIR) spectral analysis offers a rapid, non-destructive solution for mango variety identification. To address the challenges in fine-grained classification of NIR spectra, namely, high spectral similarity and severe overlap of absorption peaks, which make it difficult to extract nonlinear features using chemometrics, as well as the excessive complexity of existing deep learning models, a lightweight multi-scale spatial global context network is proposed. One-dimensional NIR spectra are converted into two-dimensional images through the Gramian angular difference field. Multi-scale partial convolution, coordinate-aware global context, efficient multi-scale attention, and structural re-parameterization are integrated to capture local spectral features and long-range band correlations effectively. Evaluated on two mango spectral datasets with different distributions, the proposed model achieves variety identification accuracies of 99.46% and 97.83%, with only 19.08 M parameters. Computational complexity, throughput, and latency reach 120.29 M FLOPs, 2848.5 FPS, and 0.351 ms, respectively, realizing a balance between classification accuracy and computational speed. Ablation and robustness experiments demonstrate that the accuracy of the model is improved by 5.91% and 2.15% compared with one-dimensional convolutional neural network and FasterNet, respectively. Important wavelengths obtained by threshold screening of activation maps exhibit consistency with the majority of conclusions from analysis of variance and VIP methods, while the remainder represent newly identified important bands. Validation across different temperature and batch scenarios reveals strong generalization capability. Future refinement will be pursued through increased sample diversity. Overall, high-precision identification is attained by the model at comparatively low computational overhead, indicating potential for advancing the practical application of NIR spectroscopy in agricultural quality inspection.

More from our Archive