Mango Moisture Content Prediction via a Lightweight Transformer Using Near-Infrared Spectroscopy
Rapid and accurate prediction of mango moisture content using near-infrared spectroscopy (NIRS) is crucial for assessing fruit maturity and processing. Existing convolutional neural network (CNN)-based NIRS analysis methods require manual design of convolution kernels and network architectures, resulting in insufficient adaptability in feature extraction. To address this, a lightweight Transformer model is proposed in this paper. The model directly maps NIRS spectral data into pseudo-sequences and leverages the self-attention mechanism to automatically capture global features. To validate its performance, comparisons were made between Multilayer Perceptron (MLP), CNN, and the proposed model on four datasets. Experimental results show that the lightweight Transformer achieves the best performance after first derivative (FD) preprocessing (highest R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> =0.94), with average R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> improvements of 0.20 and 0.03 over CNN and MLP models, respectively. This study not only confirms the efficiency of NIRS technology in nondestructive mango detection but also provides a new method for lightweight monitoring of the physicochemical properties of agricultural products.
Authors
- Lingzhen Kong (ORCID: https://orcid.org/0000-0002-9189-8228)
- Huawei He (ORCID: https://orcid.org/0000-0002-3805-8940)
- Jiong Hu (ORCID: https://orcid.org/0000-0003-3362-3899)
- Mengmeng Hu (ORCID: https://orcid.org/0000-0002-9625-0295)
Institutions
- Chongqing Technology and Business University (CN)
- Chongqing University of Technology (CN)
Publication Details
- Published
- 2025-08-22
- DOI
- https://doi.org/10.1109/ccris65764.2025.11192867
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00