Spectral detection of SSC and pH in grapes and cherry tomatoes by fusing two-dimensional domain and frequency features
Abstract
Accurate and rapid detection of soluble solids content (SSC) and pH is important for fruits and vegetables. This study achieves this objective by developing advanced modeling techniques. Initially, a Partial Least Squares Regression (PLSR) model was established using one-dimensional (1D) spectra (wavelength: 350–2500 nm) to assess the feasibility of predicting SSC and pH in grapes and cherry tomatoes. Subsequently, various regression models were developed based on 1D spectra, including Back-Propagation Neural Network (BPNN), Radial Basis Function Neural Network (RBFNN), and Convolutional Neural Network (1D-CNN). Comparative analysis revealed that the 1D-CNN model exhibited the best performance. To further enhance model accuracy and generalization, the 1D spectra were transformed into two-dimensional (2D) domain feature matrices, representing the relative relationships between different spectral bands. These 2D matrices were then used as input for a 2D Convolutional Neural Network (2D-CNN) regression model, which demonstrated superior prediction accuracy and generalization capabilities compared to the 1D-CNN. Additionally, a frequency feature matrix was extracted by applying a sliding window technique combined with wavelet transform to the spectral data, capturing the amplitude–frequency characteristics. By integrating both the 2D domain feature matrices and the 2D frequency feature matrices, a dual-channel convolutional neural network (Dual-CNN) was constructed. The Dual-CNN model exhibited improved precision, stability, and generalization performance compared to previous models. The efficacy of the proposed approach was validated through the detection of SSC and pH in grapes and cherry tomatoes. The determination coefficients of prediction (RP2) reached 0.958 and 0.929 for SSC and pH, respectively, across five grape cultivars. Similarly, for cherry tomatoes, RP2 values of 0.936 and 0.925 were achieved for SSC and pH predictions across five cultivars. Furthermore, small-scale model transfer validation between grapes and cherry tomatoes demonstrated robust performance, with RP2 values ranging from 0.892 to 0.915 for SSC and pH predictions. These findings highlight the potential of the proposed method in enhancing the accuracy and reliability of spectral detection for assessing the quality attributes of fruits and vegetables.

Please wait while we load your content...