Skip to Content
SensorsSensors
  • Article
  • Open Access

4 December 2026

21 Pages

Hybrid Feature-Enhanced Residual Convolutional Neural Network for Non-Destructive Classification of On-Tree Ripening Stages of ‘Fuji’ Apples Using Visible–Near-Infrared Spectroscopy

,
,
,
,
and
1
Department of Biosystems Engineering, Gorgan University of Agricultural Sciences and Natural Resources, Gorgan 49138-15739, Iran
2
Department of Biosystems Engineering, Tarbiat Modares University, Tehran 14117-13116, Iran
3
Department of Biosystems Engineering, University of Mohaghegh Ardabili, Ardabil 56199-11367, Iran
4
Department of Mechanical Engineering and Production Management, Hamburg University of Applied Science, 20099 Hamburg, Germany

Abstract

Identifying the ripening stage of apples on the tree is essential for scheduling harvest, limiting postharvest losses, and meeting market requirements, yet conventional maturity indices are destructive, slow, and partly subjective. This study evaluated whether Vis–NIR spectroscopy combined with deep learning showed promising discrimination under the present spectrum-level evaluation on-tree the ripening stage of ‘Fuji’ apples, non-destructively. Fruit was harvested in Kermanshah Province, Iran, at four stages (20 and 10 days before, at the exact date, and 10 days after, the estimated commercial harvest; 53 fruits per stage). Spectra (400–1230 nm) were acquired with a fibre-optic spectrometer and pre-processed by SNV transformation. Two architectures were compared under identical data partitioning (70% training, of which 20% was held out for validation, and 30% test), augmentation, and training settings: 1D-CNN and HF-ResCNN, which fuses the learned spectral representation with 20 handcrafted statistical, derivative-based, and frequency-domain descriptors and linear discriminant analysis components. The 1D-CNN reached a test accuracy of 92.2%, whereas HF-ResCNN reached 95.3%, reduced the test loss from 2.90 to 1.55, and narrowed the train–test gap from 4.1 to 3.7 percentage points. Macro-averaged areas under the ROC curve ranged from 0.985 to 0.996 for HF-ResCNN across subsets. All misclassifications occurred between adjacent ripening stages, mainly unripe/half-ripe and ripe/over-ripe, and none between early and advanced stages. Mean intensity and frequency-domain descriptors received the highest weights in the handcrafted branch. These results indicate that combining learned and handcrafted spectral descriptors improves ripeness discrimination, although validation across cultivars, orchards, and seasons is required before practical deployment.

1. Introduction

The apple is among the most widely produced and consumed temperate fruits, and the quality that reaches the consumer is largely decided by the physiological stage at which the fruit is picked. Apples are climacteric: once the ripening program is triggered, ethylene-driven changes in respiration, cell-wall metabolism, starch hydrolysis, acid decline, and pigment turnover proceed rapidly [1]. Fruit picked too early lack sugar and aroma, whereas fruit picked too late soften and store poorly. Establishing the ripening stage on the tree is, therefore, a practical decision with direct consequences for yield, marketability, and postharvest losses.
Harvest maturity is conventionally judged from firmness, total soluble solids (TSSs), titratable acidity (TA), the starch–iodine pattern, and ground or blush colour. These indices are informative, but have well-known drawbacks: they are destructive, so only a small subset of fruit can be tested; they require trained operators and laboratory time; and the starch–iodine test depends on subjective visual scoring. Because ripening is not uniform among fruit on a tree or across an orchard, decisions based on small destructive samples can misrepresent the real distribution of maturity [2,3]. Non-destructive tools that characterize individual fruit rapidly and objectively are, therefore, of considerable interest.
Visible–near-infrared (Vis–NIR) spectroscopy is among the most mature of these tools. The visible region carries information on pigments such as chlorophylls, carotenoids, and anthocyanins [4], while overtone and combination bands of O–H and C–H bonds in the NIR region reflect water, sugars, and other organic constituents [5]. Point-spectroscopy instruments have been used commercially for decades to estimate internal quality and harvest timing [3,6], and in-orchard measurement on the tree has been explored for apples [7,8]. Because pigment degradation and changes in sugars, water, and cell-wall structure accompany ripening, a spectrum can be regarded as an integrated fingerprint of maturity. This makes direct classification of ripening stages attractive.
Extracting this information has traditionally relied on spectral pre-processing, such as standard normal variate (SNV) transformation [9,10], followed by latent-variable or classical machine-learning models. These approaches perform well under controlled conditions, but the optimal pre-processing and wavelength selection are data-dependent [11], and calibrations often degrade when cultivar, season, or instrument changes [12,13]. Validation design and fruit sampling also strongly influence the credibility of reported accuracies [3].
Deep learning has emerged as an alternative that learns discriminative features directly from the spectrum [14]. One-dimensional convolutional neural networks (1D-CNNs) were shown early to match or exceed partial least squares models in multivariate calibration [15,16,17], and end-to-end designs such as Deep Spectra extended them to agricultural matrices [18]. Applications to fruit now include multi-trait prediction [19], dry-matter modelling in mango [20], and classification pipelines with automated hyperparameter optimizations [21,22]. At the same time, critical reviews caution that deep models are data-hungry, sensitive to hyperparameters and validation strategy, and easy to over-report when sample numbers are small [23,24].
For apple ripeness, specifically, Benmouna et al. [25] classified four ripening states of ‘Fuji’ apples from Vis–NIR spectra (450–1000 nm) with a 1D-CNN, and reported a correct classification rate of 96.5%, higher than that of ANN, SVM, and KNN classifiers. Pan et al. [12] built a 1D-CNN for apple ripeness across four seasons, showed that deep transfer learning could update the model for new seasons, and used Grad-CAM to interpret the learned spectral features. Guo et al. [7] measured apples in situ on the tree at two maturity levels and found that fruit maturity affected the quality of soluble solid calibrations. Wang et al. [26] showed that intra-fruit variability of the target attribute affects apple firmness models built from Vis–NIR point spectroscopy and hyperspectral imaging.
Recent reviews show that Vis/NIR spectroscopy has been applied to a wide range of apple quality attributes, with handheld and portable instruments as an important development trend [27], and broader overviews cover Vis/NIR spectroscopy, multispectral imaging and hyperspectral imaging for fruit quality measurement and variety discrimination [28,29]. A large part of this work addresses individual quality attributes, whereas harvest decisions require a categorical assessment of the ripening stage of each fruit [30]. Reviews of deep learning in food science and agriculture report that deep models often outperform manual feature extractors and conventional machine-learning approaches [31,32], although much of this evidence comes from image-based tasks; for spectral data, a one-dimensional residual network has been used to classify strawberry maturity [33], one-dimensional convolutional networks have been applied to Vis/NIR spectra of melon [34], and fusing the VNIR and SWIR ranges improved the classification of pesticide residues on melon [35]. Classical chemometric classifiers, in particular, support vector machines [36], and nonlinear calibration models [37] remain relevant comparators for such networks.
Despite this progress, three gaps remain, and each is directly addressed by the present study. First, many studies classify harvested or stored fruit, whereas decisions on harvest timing require classification of fruit as they ripen on the tree under natural conditions; studies that do measure on-tree fruit [7] have focused on calibration quality, rather than on stage classification, and McCormick and Biegert [8] modelled maturation as a time series, rather than discriminating discrete stages. Second, deep networks applied to spectra are usually trained on the pre-processed spectrum alone, whereas explicitly computed descriptors of spectral level, slope, and periodicity, well-established in signal analysis, are seldom combined with learned features. Fusing complementary feature types has improved classification in other fruit-quality tasks [38,39], but this strategy has received limited attention for Vis–NIR spectra of apples; notably, Benmouna et al. [25] and Pan et al. [12] both relied on a single spectral input stream. Third, with small spectral datasets, the evaluation protocol is decisive: leakage between training and test subsets can inflate accuracy [40,41], yet several apple-ripeness studies do not describe their partitioning transparently, and class-wise performance is often reported without confusion matrices or ROC analysis. Moreover, direct comparison with the closest prior work is difficult because studies differ in spectral range, instrument, orchard, sample number, and validation scheme, and the number of test samples is typically small.
Therefore, the objectives of this study were the following:
(i)
Acquire Vis–NIR spectra (400–1230 nm) of ‘Fuji’ apples sampled at four ripening stages on the tree in Kermanshah Province, Iran, thereby addressing the first gap;
(ii)
Develop a baseline one-dimensional residual CNN (1D-CNN) for four-class ripeness classification;
(iii)
Extend it into a hybrid feature-enhanced network (HF-ResCNN) that fuses learned features with 20 handcrafted statistical, derivative-based, and frequency-domain descriptors and linear discriminant analysis (LDA) components, thereby addressing the second gap;
(iv)
Compare both models under identical, explicitly reported data partitioning, augmentation, and training conditions using accuracy, precision, sensitivity, F1-score, confusion matrices, and ROC curves, and examine the contribution of the handcrafted descriptors, thereby addressing the third gap.

2. Materials and Methods

2.1. Fruit-Sampling and Ripening Stages

‘Fuji’ apples (Malus × domestica Borkh.) were sampled from a commercial orchard in Kermanshah Province, western Iran (34°18′48.87″ N, 47°4′6.92″ E). The approximate optimal harvest date was first estimated directly in the orchard by several experienced assessors, on the basis of visual maturity indicators. A total of 212 fruit were then harvested at four stages, relative to this estimated date (53 fruit per stage): 20 days before (unripe), 10 days before (half-ripe), at the commercial harvest date (ripe), and 10 days after (over-ripe).
All fruit were picked by hand from the outer canopy at a height of 1.2–2 m, at positions exposed to natural light, and were selected to be free of visible defects, bruising, and disease. Fruit was sampled from several trees distributed across the orchard block, rather than from a single tree, so that tree-to-tree variability was represented. Each fruit was assigned a unique identifier linking it to its harvest stage, tree, and spectral record. The interval between harvest and spectral acquisition did not exceed 6 h, and all spectra were recorded on the day of harvest. The estimated commercial harvest date, against which the four stages were defined, was 15 October 2025, and the four sampling dates were, therefore, 25 September 2025 (20 days before), 5 October 2025 (10 days before), 15 October 2025 (at commercial harvest), and 25 October 2025 (10 days after). Because the objective was to characterise ripening as it progresses on the tree, no postharvest treatment or storage was applied. The fruit was individually wrapped in shock-absorbing foam, packed in boxes that allowed air circulation, and transported to the laboratory as quickly as possible to limit changes in physiological status, since apples are climacteric fruit with comparatively high respiration rates. Figure 1 summarizes the workflow from sampling to spectral acquisition.
Figure 1. Schematic representation of the experimental workflow used for sample preparation and NIR spectral acquisition.

2.2. Physicochemical Reference Measurements

Maturity was characterized using firmness, total soluble solids (TSSs), pH, titratable acidity (TA), starch content (%), and starch index. Firmness was measured with a digital penetrometer after removing a small area of peel on two opposite sides of each fruit. TSSs of the juice was determined with a digital refractometer and expressed as °Brix [42], and pH was measured with a calibrated digital pH meter. TA was determined by titration with NaOH and expressed as malic acid equivalents [43]. Starch degradation was evaluated by iodine staining, from which starch content (%) and the starch index were derived, following standard apple maturity procedures [44]. These measurements were used to characterise the four stages and to check the staging that had been made on the basis of harvest timing.

2.3. Spectral Data Acquisition

Spectra were recorded with a StellarNet fibre-optic spectrophotometer (StellarNet Inc., Tampa, FL, USA) equipped with a silicon-based photodetector array, using SpectraWiz® software v6 (StellarNet Inc.) on a laptop computer (Intel Core i3 CFI 330M, 2.13 GHz, 4 GB RAM, Windows 10). The instrument operates over [400–1200 nm] with a variable spectral resolution of 1–3 nm, and a resolution of 1.2 nm was selected. Illumination was provided by an SLI-CAL light source (StellarNet Inc.) with a 20 W tungsten–halogen lamp, and a bifurcated optical fibre transmitted light to the fruit and returned the reflected signal to the spectrometer. All spectra were acquired in a laboratory at room temperature (approximately 22 ± 2 °C) under constant artificial illumination, with the ambient light switched off during acquisition to avoid stray-light contamination. The probe was placed in direct contact with the fruit surface at the equator, on the blush side, and three consecutive scans were averaged into a single spectrum per fruit to reduce random noise.

2.4. Spectral Pre-Processing

Raw Vis–NIR spectra are affected by physical light scattering, surface roughness, and instrument-related baseline shifts, which can obscure chemically relevant features and impair classification. To reduce these effects, SNV transformation [9,10] was applied to the spectra within 400–1230 nm. Each spectrum was standardised individually, by subtracting its mean and dividing by its standard deviation, which reduces multiplicative scatter effects and additive baseline variation, while preserving the relative spectral shape. The SNV transformation was implemented in Python v3.15 (NumPy v2.5), as follows. For per spectrum of length n (n = 2909 interpolated points), the mean and the standard deviation were computed over the spectral vector.

2.5. Dataset Construction and Partitioning

The original and the SNV-transformed spectrum of each fruit were retained as separate input samples, giving 2 × 212 = 424 spectra (106 per class; Table 1). For model development, class labels were encoded numerically with the LabelEncoder algorithm, and all spectra were interpolated onto a uniform wavelength grid of 2909 points, so that every input had the same dimensionality. The spectra were arranged as one-dimensional sequences with a single channel. The dataset was first divided, with stratification by class, into a training portion (70%, 296 spectra, 74 per class) and a test set (30%, 128 spectra, 32 per class) using a fixed random seed of 42. Then 20% of the training portion (60 spectra, 15 per class). The training subset was used to optimise model parameters, the validation subset to monitor generalisation, and the test subset for final evaluation.
Table 1. Summary of the final spectral dataset used for apple ripeness classification.
A mild spectral augmentation was applied to the training subset only. About 50% of the training spectra were selected at random, without replacement, which expanded the training set about 1.5-fold. To each selected spectrum, one transformation was assigned at random: additive Gaussian noise (standard deviation 0.03; probability 20%), circular spectral shift within ±3 sampling points (20%), multiplicative scaling by a random factor between 0.99 and 1.01 (20%), or no change (40%). Class labels were preserved for augmented samples, and the validation and test subsets were never augmented. The random split was performed on the 424 spectra, rather than on the 212 apples, so the original and SNV-transformed spectra of the same fruit could be assigned to different subsets. The reported accuracies should, therefore, be interpreted as spectrum-level performance, under this protocol.

2.6. One-Dimensional Residual Convolutional Neural Network (1D-CNN)

The 1D-CNN extracts discriminative features directly from the spectral vector, without a separate feature-extraction or feature-selection step (Figure 2). The input passes through an initial one-dimensional convolutional layer (64 filters, kernel size 11, stride 2) followed by batch normalization [45], rectified linear unit (ReLU) activation, and dropout (rate 0.05) [46]. Three residual blocks [47] with 64, 128, and 256 filters and kernel sizes of 7, 5, and 3 then extract hierarchical features. Each block contains two convolutional layers with batch normalization and a shortcut connection that adds the block input to the transformed features; a 1 × 1 convolution matches the dimensions of the two branches where necessary. ReLU is applied after the addition, and dropout rates of 0.05, 0.10, and 0.15 are used in the three blocks. Max-pooling (pool size 2) follows the first and second blocks to reduce the spectral dimension, progressively.
Figure 2. Architecture of the one-dimensional residual convolutional neural network (1D-CNN) used for four-class ripeness classification.
After the last residual block, global average pooling converts the feature maps to a compact vector, which passes through three fully connected layers of 256, 128, and 64 neurons. ReLU activation and L2 weight regularization (coefficient 0.01) are used in the convolutional and hidden dense layers; batch normalizations and dropout (0.25 and 0.15) follow the first two dense layers. A SoftMax output layer estimates the probability of each of the four classes.

2.7. Hybrid Feature-Enhanced Residual CNN (HF-ResCNN)

To add complementary information, the 1D-CNN was extended, with a parallel branch that processes handcrafted descriptors (Figure 3). Twenty descriptors were computed from each pre-processed spectrum: maximum, minimum, mean, standard deviation, skewness, kurtosis, peak-to-peak amplitude, and area under the curve; the maximum, minimum, standard deviation, and sum of absolute values of the first derivative; the maximum and standard deviation of the second derivative; the maximum magnitude, the mean magnitude of selected low-frequency components, and the standard deviation of the magnitude spectrum obtained by the fast Fourier transform (FFT); and the 25th and 75th percentiles and the normalized interquartile range. Derivatives were calculated numerically.
Figure 3. Architecture of the hybrid feature-enhanced residual CNN (HF-ResCNN), combining a deep spectral branch with a handcrafted-feature branch.
The descriptors were standardized with StandardScaler, whose parameters were estimated on the training subset only, and applied unchanged to the validation and test subsets. Linear discriminant analysis (LDA) was then fitted on the standardised training descriptors, and the fitted transformation was applied without re-estimation to the validation and test descriptors. For four classes, LDA yields, at most, three discriminant components (the number of classes minus one), so each sample was described by an enriched vector of 20 standardised descriptors plus three LDA components. This vector was processed by a dedicated branch of three dense layers (128, 64, and 32 neurons; ReLU), with batch normalizations after the first two layers, dropout of 0.15 and 0.10, and L2 regularizations of 0.01.
In parallel, the spectrum passed through the residual convolutional branch described in Section 2.6 up to global average pooling. The two outputs were concatenated and passed through three fully connected layers (256, 128, and 64 neurons; batch normalizations and dropout of 0.25 and 0.15 after the first two) and a SoftMax output layer. The network was trained end-to-end, with the spectral vector and the enriched descriptor vector as simultaneous inputs. Data partitioning, augmentation, optimization, learning-rate schedule, and evaluation criteria were identical to those of the 1D-CNN, so that the contribution of the handcrafted branch could be examined under comparable conditions.

2.8. Model Training

Both networks were implemented in Python v3.15 with TensorFlow v2/Keras v3 [48] and scikit-learn [49]. Parameters were optimized with the Adam optimizer [50] using categorical cross-entropy loss, an initial learning rate of 0.003, a mini-batch size of 16, and 101 epochs. The learning rate was decreased over training with a cosine-annealing schedule [51]. Balanced class weights, computed from the augmented training subset, were included in the loss. Network weights were checkpointed whenever validation accuracy improved; however, all performance metrics reported here refer to the model obtained at the end of epoch 101. Test-subset predictions were tracked after each epoch only to draw the training histories and were not used for model selection. A reference line at 95% accuracy is shown in the training curves for visual comparison only.

2.9. Evaluation

Model performance was evaluated on the training, validation, and test subsets using accuracy, loss, precision, sensitivity (recall), and F1-score, together with row-normalized confusion matrices and one-vs-rest ROC curves with the area under the curve (AUC) for each class and its macro-average. The relative importance of the 20 handcrafted descriptors in the HF-ResCNN was estimated from the mean absolute connection weights of the handcrafted-feature branch.

3. Results

3.1. Spectral Characteristics of the Ripening Stages

The mean Vis–NIR spectra of the four ripening classes are shown in Figure 4. Class profiles are vertically offset for clarity, so the comparison rests on spectral shape, band position, and within-class variability, rather than on absolute intensity. The classes differed most clearly in three regions: 550–720 nm, 950–1100 nm, and above 1100 nm. In the visible region, the unripe and half-ripe classes remained essentially flat from 400 to 700 nm. The ripe and over-ripe classes, instead, rose steeply from about 580 nm and showed a distinct feature near 680 nm, which was most pronounced in the over-ripe samples. In the 700–950 nm region, the ripe and over-ripe classes showed broad, stable plateaus, and the two classes began to separate around 950–1100 nm. The largest divergence occurred above 1100 nm: the unripe and half-ripe spectra rose sharply, with the unripe class reaching the highest values in the dataset, the ripe spectra declined steeply, to a low plateau, and the over-ripe spectra declined, with irregular, high-frequency fluctuations.
Figure 4. Mean Vis–NIR reflectance spectra (±1 standard deviation, shaded) of ‘Fuji’ apples at four ripening stages. Profiles are vertically offset for clarity.
The shaded bands in Figure 4 represent the standard deviation within each class. The ripe and over-ripe samples showed considerably greater variability than the unripe and half-ripe samples, particularly between 500 and 1100 nm, whereas the unripe and half-ripe classes showed narrow bands and thus more uniform spectra.

3.2. Structure of the Final Dataset

Each of the four classes contributed 53 original spectra (212 in total). Each original spectrum was complemented by its SNV-transformed counterpart, so every class contained 106 spectra and the final dataset comprised 424 spectra (Table 1). Because the number of spectra was identical across classes, the dataset was perfectly balanced, and no class was able to dominate the training signal.

3.3. Physicochemical Characteristics of the Ripening Stages

The physicochemical indices measured as references (Section 2.2) are summarized in Table 2. Starch content decreased monotonically across the four harvest-date classes (from 79.8% to 14.9%), and the starch index and TSS increased monotonically (starch index from 2.75 to 7.25; TSS from 9.93 to 12.7 °Brix). This ordered progression is consistent with the harvest-date-based labels at the class level. The TSS difference between the ripe and over-ripe classes was small (0.42 °Brix), so TSS alone does not clearly separate these two stages. Firmness increased from the unripe to the ripe stage and decreased in the over-ripe stage, TA remained nearly constant up to the ripe stage and then increased in the over-ripe stage, and pH showed no consistent trend. These indices, therefore, did not change monotonically, and overlap between adjacent stages is possible. The reference data are thus used only to check the ordering of the classes at the group level, and the labels are not interpreted as an exact physiological classification of each individual fruit.
Table 2. Physicochemical attributes of ‘Fuji’ apples at the four ripening stages (mean ± SD, n = 53 per stage). Firmness in [unit, N or kgf]; TA in [unit, % malic acid].

3.4. Overall Classification Performance

The overall performance of the two models, based on Vis–NIR spectra in the range 400–1230 nm, is summarised in Table 3. The baseline 1D-CNN reached a test accuracy of 92.2% (118/128) with a test loss of 2.9, while its validation accuracy and loss were 88.3% (53/60) and 3.3. On the test subset, it attained a macro precision of 92.4%, a sensitivity of 92.2%, and an F1-score of 92.2%. The final training accuracy was 96.3% (285/296), corresponding to a train–test gap of 4.1 percentage points. The HF-ResCNN reached a test accuracy of 95.3% (122/128) with a test loss of 1.55, a validation accuracy of 91.7% (55/60) and a validation loss of 2.1, and a macro precision, sensitivity, and F1-score of 95.5%, 95.3%, and 95.3%, respectively. Its final training accuracy was 99.0% (293/296), and the train–test gap was 3.7 percentage points. Relative to the 1D-CNN, the HF-ResCNN, therefore, improved test accuracy by 3.1 percentage points (four additional correctly classified spectra out of 128) and the F1-score by 3.1 percentage points, and reduced the test loss by about 47%. With only 128 test spectra, this difference corresponds to spectra.
Table 3. Classification performance of the 1D-CNN and HF-ResCNN for apple ripeness (400–1230 nm).

3.5. Training Behaviour

The evolution of accuracy and loss during training is shown in Figure 5 for the 1D-CNN and in Figure 6 for the HF-ResCNN. For the 1D-CNN, training accuracy rose rapidly and reached the 95% reference line at about epoch 13–19, then increased slightly, to about 0.96 by the end of training. Validation and test accuracies increased more slowly, and fluctuated considerably between epochs 20 and 80, before converging to approximately 0.86–0.88 and 0.92, respectively (Figure 5a). The training loss decreased smoothly, from about 3.0 to 2.2, whereas the validation and test losses fell from initial peaks of about 16.7 and 13.0 (epoch 1) to approximately 3.7 and 3.0, with noticeable oscillations in the intermediate epochs (Figure 5b).
Figure 5. Training history of the 1D-CNN: (a) accuracy and (b) loss for the training, validation, and test subsets.
Figure 6. Training history of the HF-ResCNN: (a) accuracy and (b) loss for the training, validation, and test subsets.
For the HF-ResCNN, training accuracy increased steadily, exceeded the 95% reference line at about epoch 20–45, and reached about 0.99. Validation and test accuracies fluctuated strongly during the first 60 epochs, and stabilised at approximately 0.91 and 0.93, respectively, from about epoch 82 (Figure 6a). The training loss decreased from about 1.0 to 0.2, and the validation and test losses declined from initial values of about 25 and 21 to approximately 2.1 and 1.4, with the transient spikes gradually vanishing towards the end of training (Figure 6b).

3.6. Importance of the Handcrafted Descriptors

The importance of the 20 handcrafted descriptors in the HF-ResCNN, estimated from the mean absolute weights of the handcrafted branch, is shown in Figure 7. The mean descriptor had the highest weight (0.079), followed by the standard deviation of the FFT magnitude spectrum (0.074). The 75th percentile (Q3) and the minimum of the first derivative ranked next (0.07). Intermediate weights (0.068–0.069) were found for the mean FFT magnitude, the 25th percentile (Q1), kurtosis, and the maximum FFT magnitude, and (0.066–0.067) for the sum of absolute first-derivative values, the standard deviation of the second derivative, the maximum, the standard deviation, the maximum of the second derivative, and the area under the curve. The lowest weights (0.057–0.065) were observed for the minimum, skewness, maximum of the first derivative, range, interquartile range, and standard deviation of the first derivative. All weights lay within a narrow range (0.057–0.079).
Figure 7. Mean absolute weights of the 20 handcrafted spectral descriptors in the HF-ResCNN.

3.7. Class-Wise Performance of the 1D-CNN

Class-wise results for the 1D-CNN are shown in Figure 8 and summarised in Table 4. On the training subset (Figure 8a,b), all 74 ripe and 74 unripe spectra, 71 of 74 half-ripe spectra (95.9%), and 66 of 74 over-ripe spectra (89.2%) were classified correctly (overall accuracy 96.3%, 285/296). The 11 errors involved neighbouring stages: three half-ripe spectra were assigned to unripe and eight over-ripe spectra to ripe. The AUC values were 0.999 for half-ripe and 1.000 for the other classes (macro-average ≈ 1.000).
Figure 8. Confusion matrices (counts and row-normalised %) and one-vs-rest ROC curves of the 1D-CNN: (a,b) training, (c,d) test, and (e,f) validation subsets.
Table 4. Class-wise correct classification rate (%), diagonal of the confusion matrices and macro-averaged AUC for each subset.
On the test subset (Figure 8c,d), all 32 ripe spectra, 29 of 32 unripe (90.6%), 29 of 32 over-ripe (90.6%), and 28 of 32 half-ripe spectra (87.5%) were classified correctly (overall accuracy 92.2%, 118/128). Of the ten errors, six were between adjacent stages (three over-ripe predicted as ripe; three unripe predicted as half-ripe), whereas four half-ripe spectra were predicted as over-ripe, a confusion across two stages that skips the ripe class. The AUC values were 0.992, 0.993, 1.000, and 0.993 for half-ripe, over-ripe, ripe, and unripe (macro-average ≈ 0.994).
On the validation subset (Figure 8e,f), all 15 over-ripe and 15 ripe spectra, 13 of 15 unripe (86.7%), and 10 of 15 half-ripe spectra (66.7%) were classified correctly (overall accuracy 88.3%, 53/60). The main source of error was confusion between half-ripe and unripe: five of 15 half-ripe spectra (33.3%) were predicted as unripe and two of 15 unripe spectra (13.3%) as half-ripe. The AUC values were 0.973, 1.000, 1.000, and 0.957 for half-ripe, over-ripe, ripe, and unripe (macro-average ≈ 0.983).

3.8. Class-Wise Performance of the HF-ResCNN

On the training subset (Figure 9a,b), all 74 ripe and 74 unripe spectra were recognised without error, 73 of 74 half-ripe (98.6%) and 72 of 74 over-ripe spectra (97.3%) were classified correctly (overall accuracy 99.0%, 293/296), and only two off-diagonal entries were non-zero: one half-ripe spectrum labelled as unripe and two over-ripe spectra labelled as ripe. The over-ripe error on this subset was therefore lower than the eight errors (10.8%) of the 1D-CNN. The AUC values were 0.995 (half-ripe), 0.99 (over-ripe), and 1.0 (ripe and unripe), a macro-average of about 0.996.
Figure 9. Confusion matrices (row-normalised, %) and one-vs-rest ROC curves of the HF-ResCNN: (a,b) training, (c,d) test, and (e,f) validation subsets.
On the test subset (Figure 9c,d), all 32 ripe spectra were identified correctly, together with 31 of 32 half-ripe (96.9%), 30 of 32 unripe (93.8%), and 29 of 32 over-ripe spectra (90.6%) (overall accuracy 95.3%, 122/128). All six errors were exchanges between adjacent stages (one half-ripe predicted as unripe; two unripe predicted as half-ripe; three over-ripe predicted as ripe). The AUC values were 0.997, 0.99, 1, and 0.991 for half-ripe, over-ripe, ripe, and unripe (macro-average ≈ 0.995).
On the validation subset (Figure 9e,f), all 15 over-ripe and 15 ripe spectra were classified correctly, and the half-ripe and unripe classes reached 12 of 15 (80.0%) and 13 of 15 (86.7%), with errors again between neighbouring stages (three half-ripe predicted as unripe; two unripe predicted as half-ripe). The AUC values were 0.96 for half-ripe, 1.000 for over-ripe, 1.0 for ripe, and 0.980 for unripe (macro-average ≈ 0.985). Across the three subsets, the macro-averaged AUC of the HF-ResCNN ranged from 0.985 to 0.996.

3.9. Comparison of the Two Models

Under identical data partitioning, augmentation, and training settings, adding the handcrafted-feature branch increased test accuracy from 92.2% to 95.3% and the F1-score from 0.922 to 0.953, reduced the test loss from 2.9 to 1.55, and narrowed the train–test gap from 4.1 to 3.7 percentage points (Table 3). In the class-wise analysis, the largest test-subset change was for the half-ripe class (87.5% to 96.9%, four errors reduced to one), and, on the training subset, the over-ripe errors fell from eight to two. For the HF-ResCNN, all errors in all three subsets were confined to neighbouring stages. The 1D-CNN made the same kind of errors, except for four half-ripe test spectra predicted as over-ripe. These results show that the dual representation of the HF-ResCNN improved the four-class, on-tree ripeness discrimination, relative to the spectral-only baseline, with the gain concentrated in the half-ripe class (87.5% to 96.9%) and in the over-ripe class on the training subset, exactly in the two classes closest to a neighbouring stage.

4. Discussion

4.1. Spectral Basis of Ripeness Discrimination

The class-mean spectra (Figure 4) show that ripening leaves a measurable signature in three regions. The rise of the ripe and over-ripe spectra from about 580 nm and the feature near 680 nm lie in the region governed by pigments. The 680 nm band coincides with chlorophyll-a absorption, and chlorophyll content declines as apples mature, a trend that has been used to track maturation on the tree [8]. The visible reflectance of blushed cultivars such as ‘Fuji’ is, however, also shaped by anthocyanin and carotenoid accumulation [4], so the observed shapes most likely reflect the combined turnover of several pigments, rather than chlorophyll alone.
Differences around 950–1100 nm are in the region of the second overtone of O–H stretching and neighbouring bands associated with water and carbohydrates [5], which change with moisture status, sugar accumulation, and cell-wall softening during ripening. Silicon-based detectors, such as the one used here, lose sensitivity towards the upper limit of their range, which lies at approximately 1100 nm, and the irregular high-frequency fluctuations of the over-ripe class in this region may partly reflect low signal-to-noise ratio, rather than chemistry. Because a deep network may use any consistent difference between classes, including instrument-edge artefacts, future work should test the models after restricting the input to a region of reliable sensitivity (e.g., 400–1000 nm) and report whether performance is retained. The wider variability of the ripe and over-ripe classes is consistent with the heterogeneous physiological changes among individual fruit at advanced stages, a known obstacle for apple calibrations [2].

4.2. Why the Hybrid Architecture Performed Better

The comparison between the two networks isolates the effect of the handcrafted branch, because both share the same residual backbone, data partitioning, augmentation, and training schedule. The improvement observed in Table 3 should therefore be attributed to the added descriptors and LDA components, and not to the residual design itself, which both models have in common. Three mechanisms may explain the benefit. First, global statistics such as the mean and quantiles, derivative-based measures of band edges, and FFT-based measures of periodicity summarise whole-spectrum properties that a stack of small convolutional kernels followed by global average pooling captures only indirectly. Second, the LDA components introduce class-discriminative information derived from the training labels, which may help the network separate the closely related stages. Third, the smaller train–test gap and lower test loss of the hybrid model suggest that the compact descriptor vector provides a more stable signal than the 2909-point spectrum alone when only a few hundred spectra are available. These interpretations remain hypotheses until ablation experiments (handcrafted descriptors without LDA, LDA without descriptors, and each descriptor-family separately) are performed. A related point is that LDA was fitted on the training subset, so the LDA components are optimistically separated for training samples; this can inflate training accuracy, and should be considered when interpreting the 99% training accuracy.
The results are in line with, but cannot be compared directly with, earlier deep-learning studies on apple ripeness. Benmouna et al. [25] reported a correct classification rate of 96.5% for four ripening states of ‘Fuji’ apples using a 1D-CNN on 172 spectra between 450 and 1000 nm, and the test accuracy of the HF-ResCNN (95.3%) is of a similar magnitude. The studies differ in spectral range, instrument, orchard, number of samples, and validation scheme, and the number of test samples in both studies is small. Pan et al. [12] showed that single-season models degrade across seasons and that transfer learning can partly restore performance, which indicates that accuracies obtained within a single season are an upper bound for field use. Likewise, the finding of Guo et al. [7], that maturity itself alters the quality of NIR calibrations on the tree, underlines the fact that ripeness-aware models are necessary for in-orchard sensing (Table 5).
Table 5. Comparison of the proposed HF-ResCNN with previous Vis–NIR studies on apple ripeness classification.

4.3. Error Structure and the Relation Between AUC and Accuracy

For both models, errors occurred only between neighbouring classes, mostly unripe/half-ripe and ripe/over-ripe. This is the expected behaviour for a continuous process that has been discretised into four classes: fruit sampled near a class boundary are physiologically intermediate and spectrally similar to the adjacent class. A second contributor is label uncertainty. The stages were defined by harvest dates relative to an estimated optimum, and individual fruit on the same tree ripen at different rates, so some fruit may belong physiologically to a neighbouring stage. The physicochemical reference data (Table 2) are the proper tool to quantify this effect: by reporting the overlap of firmness, TSS, and starch index between adjacent stages and by checking whether misclassified fruit are those with intermediate reference values. Ordinal approaches, or regression of a continuous index such as the starch index, would also respect the ordered nature of the classes.
The macro-averaged AUC values (0.985–0.996) are higher than the accuracies, which indicates that the predicted probabilities rank the samples well, and that part of the error arises from the fixed decision threshold at the class boundaries. At the same time, with validation and test subsets containing only a few samples per class, one misclassified spectrum shifts a class-wise rate by 10–20 percentage points, and the AUC of a class with few samples is correspondingly uncertain. The fluctuations of the validation and test curves during training (Figure 5 and Figure 6) reflect the same sensitivity. The absolute loss values (Table 3) are inflated by the L2 penalty of 0.01, which is added to the loss in all convolutional and dense layers, and should be compared between models but not read as the cross-entropy alone.

4.4. Interpretation of the Handcrafted-Feature Weights

The mean and the FFT standard deviation received the highest weights, which fits the observation that the classes differ in overall spectral level and in the irregularity of the signal at long wavelengths (Figure 4). However, the weights lay in a narrow band (0.057–0.079), and mean absolute weights of a dense layer are an indirect and unstable measure of importance, because they ignore correlations among descriptors, downstream layers, and the LDA components. The statement that the network used all descriptors in a distributed manner is therefore better read as an absence of a dominant feature, than as evidence that every descriptor is necessary. Permutation importance or SHAP values computed on held-out data, and the ablations mentioned above, would give more reliable rankings.

4.5. Practical Implications

Spectra were recorded with a portable fibre-optic system and a low-specification laptop, and classification with a trained network requires a single forward pass, so the approach is compatible with in-orchard use. A reliable on-tree classifier could support selective picking by maturity, harvest-window forecasting, and sorting of fruit for storage regimes. The ability to separate early from advanced stages without a single gross error is the most useful property for such decisions, because confusion between adjacent stages has a smaller operational cost than confusion between unripe and over-ripe fruit.

4.6. Limitations and Future Work

Several limitations should be acknowledged.
(i)
All fruit came from one cultivar, one orchard region, and, as far as we understand, one season, so the models have not been tested for generalisation across cultivars, growing conditions, years, or instruments; multi-season model updating and transfer learning [12] and calibration-transfer strategies [13] are logical next steps.
(ii)
The dataset consists of 212 fruit (424 spectra), and the validation and test subsets are small (60 and 128 spectra; 15 and 32 per class). A single random split with one seed provides no estimate of uncertainty; repeated, stratified cross-validation grouped by fruit, with confidence intervals and a statistical comparison of the two models, should be used.
(iii)
In the present analysis, the data were partitioned at the spectrum level, and the original and SNV-transformed copies of one fruit were not constrained to the same subset. This may have inflated the reported accuracies [40,41]. Both models were evaluated under the same partition, so their comparison is controlled, but the absolute values and the size of the difference require confirmation by a fruit-level split.
(iv)
The study lacks classical benchmarks such as PLS-DA, SVM, or regularized LDA on the same spectra and under the same evaluation protocol, which are needed to show the added value of deep learning [23,24]. It also lacks an ablation of the fusion branch (descriptor-only model, fusion without LDA, and fusion with LDA) and a capacity-matched control, which are needed to distinguish useful feature fusion from increased model capacity. Only the spectral-only network and the full hybrid network were compared, so the contribution of the individual components of the hybrid branch remains to be established.
(v)
The reference data (Table 2) are available only as class means, without standard deviations or fruit-level values. The overlap of the reference indices between adjacent stages could therefore not be quantified, and the harvest-date labels are supported only at the class level. Future work should record and report fruit-level reference values and relate them to the classifier outputs.
(vi)
Augmentation was mild and generic; physically motivated spectral augmentation [52] and automated hyperparameter optimization [22] could be explored.
(vii)
Explainability was limited to descriptor weights; gradient-based attribution such as Grad-CAM [53], as used by Pan et al. [12], would reveal which wavelengths drive the decision. Finally, fusing spectral information with other sensing modalities, as has benefited fruit classification elsewhere [38], may further improve the discrimination of boundary classes.

5. Conclusions

  • This study showed that Vis–NIR spectra (400–1230 nm), combined with deep learning, can discriminate four on-tree ripening stages of ‘Fuji’ apples, non-destructively. A one-dimensional residual CNN reached a test accuracy of 92.2%, and a hybrid feature-enhanced network that fuses learned spectral features with 20 handcrafted statistical, derivative-based, and frequency-domain descriptors and LDA components improved this to 95.3%, with a lower test loss (1.55 versus 2.9) and a smaller train–test gap. Macro-averaged AUC values between 0.985 and 0.996 confirmed strong class separability.
  • All errors occurred between adjacent ripening stages, mainly unripe/half-ripe and ripe/over-ripe, and none between early and advanced stages, which is the most relevant property for harvest decisions. The handcrafted branch contributed through overall intensity and frequency-domain descriptors, although the narrow range of weights calls for confirmation by ablation and permutation-based analyses.
  • The findings are limited to one cultivar, one region, and a small number of fruits. Validation on independent cultivars, orchards, and seasons, partitioning at the level of individual fruit, comparison with classical chemometric classifiers, and testing with portable instruments in the orchard are the priorities, before practical adoption. If confirmed, hybrid deep-learning models based on low-cost Vis–NIR sensors could provide growers with objective, fruit-level information for scheduling harvest and reducing postharvest losses.

Author Contributions

Conceptualization, S.S., M.V.T. and R.P.; methodology, S.S., M.V.T., R.P. and E.S.; software, E.G. and M.V.T.; validation, S.S., M.V.T., R.P. and E.S.; formal analysis, M.V.T., R.P. and E.S.; investigation, M.V.T. and R.P.; data curation, M.V.T., R.P. and E.S.; visualization, M.V.T. and P.B.; supervision, S.S., R.P. and E.S.; project administration, S.S.; writing—original draft, M.V.T.; writing—review and editing, S.S., E.G., R.P., E.S. and P.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data is available on request.

Acknowledgments

We would like to express our sincere gratitude to Hamburg University of Applied Science and Pourya Bazyar for generously funding the publication charges of this article.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. The authors declare no conflicts of interest.

References

  1. Barry, C.S.; Giovannoni, J.J. Ethylene and fruit ripening. J. Plant Growth Regul. 2007, 26, 143–159. [Google Scholar] [CrossRef] [Scilit]
  2. Peirs, A.; Schenk, A.; Nicolaï, B.M. Effect of natural variability among apples on the accuracy of VIS-NIR calibration models for optimal harvest date predictions. Postharvest Biol. Technol. 2005, 35, 1–13. [Google Scholar] [CrossRef] [Scilit]
  3. Walsh, K.B.; Blasco, J.; Zude-Sasse, M.; Sun, X. Visible-NIR ‘point’ spectroscopy in postharvest fruit and vegetable assessment: The science behind three decades of commercial use. Postharvest Biol. Technol. 2020, 168, 111246. [Google Scholar] [CrossRef] [Scilit]
  4. Merzlyak, M.N.; Solovchenko, A.E.; Gitelson, A.A. Reflectance spectral features and non-destructive estimation of chlorophyll, carotenoid and anthocyanin content in apple fruit. Postharvest Biol. Technol. 2003, 27, 197–211. [Google Scholar] [CrossRef] [Scilit]
  5. Workman, J., Jr.; Weyer, L. Practical Guide and Spectral Atlas for Interpretive Near-Infrared Spectroscopy, 2nd ed.; CRC Press: Boca Raton, FL, USA, 2012. [Google Scholar] [CrossRef] [Scilit]
  6. Nicolaï, B.M.; Beullens, K.; Bobelyn, E.; Peirs, A.; Saeys, W.; Theron, K.I.; Lammertyn, J. Nondestructive measurement of fruit and vegetable quality by means of NIR spectroscopy: A review. Postharvest Biol. Technol. 2007, 46, 99–118. [Google Scholar] [CrossRef] [Scilit]
  7. Guo, Z.; Chen, X.; Zhang, Y.; Sun, C.; Jayan, H.; Majeed, U.; Watson, N.J.; Zou, X. Dynamic nondestructive detection models of apple quality in critical harvest period based on near-infrared spectroscopy and intelligent algorithms. Foods 2024, 13, 1698. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. McCormick, R.; Biegert, K. Non-destructive Vis/NIR time-series to model apple fruit maturation on the tree. Acta Hortic. 2021, 1311, 131–140. [Google Scholar] [CrossRef] [Scilit]
  9. Barnes, R.J.; Dhanoa, M.S.; Lister, S.J. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra. Appl. Spectrosc. 1989, 43, 772–777. [Google Scholar] [CrossRef] [Scilit]
  10. Rinnan, Å.; van den Berg, F.; Engelsen, S.B. Review of the most common pre-processing techniques for near-infrared spectra. TrAC Trends Anal. Chem. 2009, 28, 1201–1222. [Google Scholar] [CrossRef] [Scilit]
  11. Mishra, P.; Biancolillo, A.; Roger, J.M.; Marini, F.; Rutledge, D.N. New data preprocessing trends based on ensemble of multiple preprocessing techniques. TrAC Trends Anal. Chem. 2020, 132, 116045. [Google Scholar] [CrossRef] [Scilit]
  12. Pan, L.; Wu, W.; Hu, Z.; Li, H.; Zhang, M.; Zhao, J. Updating apple Vis-NIR spectral ripeness classification model based on deep learning and multi-seasonal database. Biosyst. Eng. 2024, 245, 164–176. [Google Scholar] [CrossRef] [Scilit]
  13. Saeys, W.; Do Trong, N.N.; Van Beers, R.; Nicolaï, B.M. Multivariate calibration of spectroscopic sensors for post-harvest quality evaluation: A review. Postharvest Biol. Technol. 2019, 158, 110981. [Google Scholar] [CrossRef] [Scilit]
  14. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. Acquarelli, J.; van Laarhoven, T.; Gerretzen, J.; Tran, T.N.; Buydens, L.M.C.; Marchiori, E. Convolutional neural networks for vibrational spectroscopic data analysis. Anal. Chim. Acta 2017, 954, 22–31. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Cui, C.; Fearn, T. Modern practical convolutional neural networks for multivariate regression: Applications to NIR calibration. Chemom. Intell. Lab. Syst. 2018, 182, 9–20. [Google Scholar] [CrossRef] [Scilit]
  17. Malek, S.; Melgani, F.; Bazi, Y. One-dimensional convolutional neural networks for spectroscopic signal regression. J. Chemom. 2018, 32, e2977. [Google Scholar] [CrossRef] [Scilit]
  18. Zhang, X.; Lin, T.; Xu, J.; Luo, X.; Ying, Y. DeepSpectra: An end-to-end deep learning approach for quantitative spectral analysis. Anal. Chim. Acta 2019, 1058, 48–57. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Mishra, P.; Passos, D. Multi-output 1-dimensional convolutional neural networks for simultaneous prediction of different traits of fruit based on near-infrared spectroscopy. Postharvest Biol. Technol. 2022, 183, 111741. [Google Scholar] [CrossRef] [Scilit]
  20. Mishra, P.; Passos, D. A synergistic use of chemometrics and deep learning improved the predictive performance of near-infrared spectroscopy models for dry matter prediction in mango fruit. Chemom. Intell. Lab. Syst. 2021, 212, 104287. [Google Scholar] [CrossRef] [Scilit]
  21. Passos, D.; Mishra, P. An automated deep learning pipeline based on advanced optimisations for leveraging spectral classification modelling. Chemom. Intell. Lab. Syst. 2021, 215, 104354. [Google Scholar] [CrossRef] [Scilit]
  22. Passos, D.; Mishra, P. A tutorial on automatic hyperparameter tuning of deep spectral modelling for regression and classification tasks. Chemom. Intell. Lab. Syst. 2022, 223, 104520. [Google Scholar] [CrossRef] [Scilit]
  23. Mishra, P.; Passos, D.; Marini, F.; Xu, J.; Amigo, J.M.; Gowen, A.A.; Jansen, J.J.; Biancolillo, A.; Roger, J.M.; Rutledge, D.N.; et al. Deep learning for near-infrared spectral data modelling: Hypes and benefits. TrAC Trends Anal. Chem. 2022, 157, 116804. [Google Scholar] [CrossRef] [Scilit]
  24. Zhang, W.; Kasun, L.C.; Wang, Q.J.; Zheng, Y.; Lin, Z. A review of machine learning for near-infrared spectroscopy. Sensors 2022, 22, 9764. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Benmouna, B.; García-Mateos, G.; Sabzi, S.; Fernandez-Beltran, R.; Parras-Burgos, D.; Molina-Martínez, J.M. Convolutional neural networks for estimating the ripening state of Fuji apples using visible and near-infrared spectroscopy. Food Bioprocess Technol. 2022, 15, 2226–2236. [Google Scholar] [CrossRef] [Scilit]
  26. Wang, Z.; Ding, F.; Ge, Y.; Wang, M.; Zuo, C.; Song, J.; Tu, K.; Lan, W.; Pan, L. Comparing visible and near infrared ‘point’ spectroscopy and hyperspectral imaging techniques to visualize the variability of apple firmness. Spectrochim. Acta A Mol. Biomol. Spectrosc. 2024, 316, 124344. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  27. Grabska, J.; Beć, K.B.; Ueno, N.; Huck, C.W. Analyzing the Quality Parameters of Apples by Spectroscopy from Vis/NIR to NIR Region: A Comprehensive Review. Foods 2023, 12, 1946. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  28. Wang, H.; Peng, J.; Xie, C.; Bao, Y.; He, Y. Fruit Quality Evaluation Using Spectroscopy Technology: A Review. Sensors 2015, 15, 11889–11927. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  29. Li, H. Spectroscopic sensor-based machine learning framework for in situ evaluation of fruit internal quality. Emir. J. Food Agric. 2026, 38, e184494. [Google Scholar] [CrossRef] [Scilit]
  30. Ghosh, D.; Singh, J.P. A hybrid CNN-LSTM model for accurate fruit freshness classification using deep learning. Discov. Artif. Intell. 2026, 6, 134. [Google Scholar] [CrossRef] [Scilit]
  31. Zhou, L.; Zhang, C.; Liu, F.; Qiu, Z.; He, Y. Application of Deep Learning in Food: A Review. Compr. Rev. Food Sci. Food Saf. 2019, 18, 1793–1811. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  32. Kamilaris, A.; Prenafeta-Boldú, F.X. Deep learning in agriculture: A survey. Comput. Electron. Agric. 2018, 147, 70–90. [Google Scholar] [CrossRef] [Scilit]
  33. Su, Z.; Zhang, C.; Yan, T.; Zhu, J.; Zeng, Y.; Lu, X.; Gao, P.; Feng, L.; He, L.; Fan, L. Application of Hyperspectral Imaging for Maturity and Soluble Solids Content Determination of Strawberry With Deep Learning Approaches. Front. Plant Sci. 2021, 12, 736334. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  34. Yu, G.; Ma, B.; Li, H.; Hu, Y.; Li, Y. Discrimination of Pesticide Residue Levels on the Hami Melon Surface Using Multiscale Convolution. Foods 2022, 11, 3881. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  35. Hu, Y.; Ma, B.; Wang, H.; Zhang, Y.; Li, Y.; Yu, G. Detecting different pesticide residues on Hami melon surface using hyperspectral imaging combined with 1D-CNN and information fusion. Front. Plant Sci. 2023, 14, 1105601. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  36. Luts, J.; Ojeda, F.; Van de Plas, R.; De Moor, B.; Van Huffel, S.; Suykens, J.A.K. A tutorial on support vector machine-based methods for classification problems in chemometrics. Anal. Chim. Acta 2010, 665, 129–145. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  37. Ni, W.; Nørgaard, L.; Mørup, M. Non-linear calibration models for near infrared spectroscopy. Anal. Chim. Acta 2014, 813, 1–14. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  38. Nafees, S.; Iqbal, M.J.; Ahmad, I.; Alassafi, M.O.; Noreen, N. Fruit quality classification through feature fusion and deep learning. Foods 2026, 15, 3624. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  39. Zhu, H.; Gowen, A.; Feng, H.; Yu, K.; Xu, J.-L. Deep spectral-spatial features of near infrared hyperspectral images for pixel-wise classification of food products. Sensors 2020, 20, 5322. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  40. Kapoor, S.; Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns 2023, 4, 100804. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  41. Raschka, S. Model evaluation, model selection, and algorithm selection in machine learning. arXiv 2018, arXiv:1811.12808. [Google Scholar] [CrossRef] [Scilit]
  42. Azadbakht, M.; Torshizi, M.V.; Khatunabadi, A.S.; Tajari, M. Synergistic mitigation of bruising in red delicious: A non-destructive evaluation of polyamine (spermidine), chitosan coatings, and optimized packaging using CT-scan imaging and principal component analysis. Postharvest Biol. Technol. 2026, 236, 114241. [Google Scholar] [CrossRef] [Scilit]
  43. Aboutalebi, F.; Azadbakht, M.; Torshizi, M.V.; Akbarpour, F.V. Maintaining postharvest quality and extending the shelf life of bananas through integrated LED light exposure and packaging strategies. Food Chem. 2026, 506, 148101. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  44. Sabzi, S.; Azadbakht, M.; Torshizi, M.V.; Pourdarbani, R. Ripeness Assessment of ‘Fuji’ Apples Using Multivariate Analysis of Physicochemical and Color Properties. Food Humanit. 2026, 7, 101474. [Google Scholar] [CrossRef] [Scilit]
  45. Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 7–9 July 2015; Volume 37, pp. 448–456. [Google Scholar]
  46. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
  47. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Scilit]
  48. Abadi, M.; Barham, P.; Chen, J.; Chen, Z.; Davis, A.; Dean, J.; Devin, M.; Ghemawat, S.; Irving, G.; Isard, M.; et al. TensorFlow: A system for large-scale machine learning. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’16), Savannah, GA, USA, 2–4 November 2016; pp. 265–283. [Google Scholar]
  49. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  50. Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
  51. Loshchilov, I.; Hutter, F. SGDR: Stochastic gradient descent with warm restarts. In Proceedings of the 5th International Conference on Learning Representations (ICLR 2017), Toulon, France, 24–26 April 2017. [Google Scholar]
  52. Bjerrum, E.J.; Glahder, M.; Skov, T. Data augmentation of spectral data for convolutional neural network (CNN) based deep chemometrics. arXiv 2017, arXiv:1710.01927. [Google Scholar] [CrossRef] [Scilit]
  53. Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual explanations from deep networks via gradient-based localization. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.