High-precision apple classification and traceability based on enhanced CBAM for near-infrared spectroscopy.
Journal:
Spectrochimica acta. Part A, Molecular and biomolecular spectroscopy
Published Date:
Mar 20, 2026
Abstract
Apple origin traceability is crucial in modern agriculture and the food industry for ensuring food safety, protecting consumer rights, and enhancing brand value. However, traditional spectral analysis methods often exhibit low recognition accuracy due to limited feature extraction and class imbalance. To address these challenges, this study proposes a one-dimensional convolutional neural network (1D-CNN) enhanced with a Convolutional Block Attention Module (CBAM). We collected 2400 near-infrared spectral signatures from 200 apple samples covering four varieties: Gala, Red Marshal, Luochuan, and Jonagold, to construct the experimental dataset. We apply the Multiplicative Scatter Correction (MSC) to preprocess spectral data, effectively eliminating scattering effects and baseline inconsistencies, providing high-quality input data. We design an enhanced CBAM module by introducing standard deviation pooling into channel attention to form a triple pooling strategy, and employ multi-scale convolution to adaptively select spectral features. The dense residual connection architecture ensures the full transmission of deep feature information. Meanwhile, the Balance Softmax Cross-Entropy loss function addresses class imbalance in the dataset, thereby enhancing the model's robustness and generalization. Experimental results demonstrate the model's superior performance, achieving 97.12% ± 0.74% accuracy in apple origin classification.
Authors
Keywords
No keywords available for this article.