Next Article in Journal
Leaf to Root Morphological and Anatomical Indicators of Drought Resistance in Coffea canephora After Two Stress Cycles
Previous Article in Journal
Toxic Baits as a Strategy for Controlling Invasive Wild Pigs: Acceptability Among Crop Producers
Previous Article in Special Issue
A Neural Network with Multiscale Convolution and Feature Attention Based on an Electronic Nose for Rapid Detection of Common Bunt Disease in Wheat Plants
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Non-Destructive Detection of External Defects in Potatoes Using Hyperspectral Imaging and Machine Learning

College of Engineering, Shenyang Agricultural University, Shenyang 110866, China
*
Author to whom correspondence should be addressed.
Agriculture 2025, 15(6), 573; https://doi.org/10.3390/agriculture15060573
Submission received: 28 January 2025 / Revised: 26 February 2025 / Accepted: 6 March 2025 / Published: 7 March 2025
(This article belongs to the Special Issue Agricultural Products Processing and Quality Detection)

Abstract

:
For potato external defect detection, ordinary spectral technology has limitations in detail detection and processing accuracy, while the machine vision method has the limitation of a long feedback time. To realize accurate and rapid external defect detection for red-skin potatoes, a non-destructive detection method using hyperspectral imaging and a machine learning model was explored in this study. Firstly, Savitzky–Golay (SG), standard normal variate transformation (SNV), multiplicative scatter correction (MSC), the normalization algorithm, and different preprocessing algorithms combined with SG were used to preprocess the hyperspectral data. Then, principal component regression (PCR), support vector machine (SVM), partial least squares regression (PLSR), and least squares support vector machine (LSSVM) algorithms were used to establish quantitative models to find the most suitable preprocessing algorithm. The successive projections algorithm (SPA) was used to obtain various characteristic wavelengths. Finally, the qualitative models were established to detect the external defects of potatoes using the machine learning algorithms of backpropagation neural network (BPNN), k-nearest neighbors (KNN), classification and regression tree (CART), and linear discriminant analysis (LDA). The experimental results showed that the SG–SNV fusion hyperspectral data preprocessing algorithm and the KNN machine learning model were the most suitable for the detection of external defects in red-skin potatoes. Moreover, multiple external defects can be detected without multiple models. For healthy potatoes, black/green-skin potatoes, and scab/mechanical-damage/broken-skin potatoes, the detection accuracy was 93%,93%, and 83%, which basically meets the production requirements. However, enhancing the prediction accuracy of the scab/mechanical-damage/broken-skin potatoes is still a challenge. The results also demonstrated the feasibility of using hyperspectral imaging technology and machine learning technology to detect potato external defects and provided new insights for potato external defect detection.

1. Introduction

Potatoes have several advantages, including cold tolerance, drought tolerance, barren tolerance, strong adaptability, high and stable yield, and comprehensive nutrition; therefore, they are cultivated worldwide. Potatoes have been identified as the fourth major staple crop after rice, corn, and wheat, as well as the main food crop in more than 75% of national-level poverty-stricken counties [1]. In 2015, China proposed the strategy for promoting potatoes as a staple food. This strategy is an important step toward ensuring food security and alleviating poverty. Identifying and sorting defective potatoes are indispensable steps for their deep processing and storage. Defective potatoes must be sorted out before storing in the cellar; otherwise, large-scale decay will occur, which will lead to economic losses and waste of resources. With the development and demand for intelligent sorting, it is crucial to accurately and quickly identify defective potatoes. Therefore, exploring rapid, efficient, and feasible methods for detecting defective potatoes is of great significance.
At present, the detection methods for potato external defects mainly include near-infrared spectroscopy and visual detection technology. Dimas Firmanda Al Riza et al. [2] successfully detected scab disease and mechanical damage in potatoes by using single and multi-spectral imaging techniques in the near-infrared region and enhancing the contrast between defective and normal areas through image preprocessing and false color conversion techniques. Al-Riza [3] adopted a dual CCD camera system, combined with principal component analysis (PCA) and principal component false-color image segmentation strategy, accurately identified the external defects of potatoes, and the segmentation accuracy reached 64%. Yu Yang et al. [4] proposed a multi-type defect detection network (MDDNet) based on multi-spectral imaging (MSI) and an improved YOLOv3-tiny model, which was used to identify 428 samples of potatoes as either defect-free or defective (sprouting, common scab, worm eye, dry rot, and bruising), with an average accuracy of 90.26%. Li Xiaoyu [5] established potato scab disease detection models using a support vector machine detection method based on machine vision technology and near-infrared spectroscopy technology, and the detection rates for potatoes in the test set were 89.17% and 91.67%, respectively. These research results have some significance for further research, but there are some limitations in practical application. Ordinary spectrum technology has only spectral information but no image information. This limitation results in lower collection efficiency and identification accuracy [6], which makes it applicable to local measurement, but it is difficult to apply to complex actual scenes of multiple external defects in potatoes. Visual detection technology is more easily affected by illumination conditions and usually requires a large amount of sample data for training and experimentation, which results in complex algorithms and a long feedback time. Thus, accuracy is not easy to guarantee in actual production, and it is difficult to achieve real-time detection.
Additionally, most existing studies have focused on yellow-skin potatoes. The external defects of red-skin potatoes (especially black and green skin) are significantly different in optical properties. Therefore, it is a challenge to detect these defects using existing detection methods.
In recent years, because of the advantages of hyperspectral imaging technology combined with spectral analysis and image detection, a number of studies have been performed on non-destructive experiments for assessing fruit and vegetable quality. Yuanyuan Shao [7] used hyperspectral imaging technology combined with PLS-DA and LDA models to classify healthy, frostbitten, and diseased sweet potatoes. Through characteristic wavelength extraction and optimization, the SPA-LDA model achieved 99.52% accuracy on the prediction set. Mohammad Akbar Faqeerzada et al. [8] developed a polarizing hyperspectral imaging (HSI) system, which combined PLS-DA, the continuous projection algorithm (SPA), and the improved watershed segmentation algorithm (IWSA) to achieve rapid detection of pepper powder fruit defects, with a multi-defect detection accuracy of 91.3%. Tanjima Akter [9] used the HSI system in the range of 400–2500 nm, combined with the PLS-DA model, to achieve defect detection of apples and pears in visible near-infrared (VNIR) and short-wave-infrared (SWIR) bands, with classification accuracies of 97.5% and 100%, respectively. K. S. Shanthini et al. [10] used Vis-NIR hyperspectral imaging technology combined with support vector machine (SVM) and linear discriminant analysis (LDA) to achieve early detection and classification of strawberry bruises with an accuracy of 99.99%. In addition, Keresztes [11], Wang Hailong [12], Kaitlin M. Gold [13], and others also used hyperspectral technology to carry out research in the field of fruit and vegetable detection.
In hyperspectral imaging, machine learning models significantly improve the accuracy of distinguishing objects through automatic characteristic extraction, nonlinear modeling, data enhancement, ensemble learning, and transfer learning [14]. Compared to traditional methods, machine learning can automatically capture complex spectral and spatial characteristics, process high-dimensional data, optimize pre-processing steps, and improve classification performance by integrating multiple models and leveraging pre-trained models for more accurate and efficient target identification and classification [15].
Hyperspectral imaging technology, which combines traditional digital imaging technology with spectral analysis technology, has the advantages of high resolution and multiple bands and has higher sensitivity and accuracy in detecting potato external defects [16]. Image information of surface defects can be obtained through hyperspectral imaging [17], especially in distinguishing defect types of potatoes with different colors.
Hyperspectral imaging has been used to analyze the most relevant compounds, diseases, and stress factors in potatoes [18]. This study used hyperspectral imaging technology combined with machine learning models to detect five different external defects of potatoes: scab, black skin, broken skin, green skin, and mechanical damage. This study aims to explore an efficient and feasible method for detecting external defects in potatoes. The work presented here provides a foundation for the development of intelligent defect detection systems.

2. Materials and Methods

2.1. Experimental Samples and Their Characteristics

The experimental material, “Qingshu No. 9”, was taken from a potato planting base located in Jianping Town, Jianping County, Liaoning Province, China (119.73° E, 41.91° N). The external defects of potatoes have a significant impact on their quality and storage and require rapid and accurate detection and sorting to separate them from healthy potatoes. Six types of potatoes were selected, including healthy potatoes and potatoes with five external defects: scab disease, black skin, broken skin, green skin, and mechanical damage. Each of the six types of potatoes had 30 samples collected, totaling 180. Potato samples are shown in Figure 1.

2.2. Main Instrument and Equipment

Hyperspectral images were obtained using a hyperspectral imaging system that mainly consisted of a hyperspectral imager, camera, optical fiber halogen lights, black case, precise displacement controller, and data processor (PDP). The black case (120 × 50 × 140 cm) ensured that the sample was not affected by external light during collection. The spectral wavelength range of the spectrometer was 400 nm to 1100 nm, the number of spectral bands was 472, the spectral resolution (30 µm slit) was 2.8 nm, the spectrometer adopted transmission grating splitting, the dispersion was 97.5 nm/mm, the spatial resolution spot diameter was less than 9 µm, and the stable output halogen light source was 21 V/200 W. In addition, a double-branch linear light guide pipeline was used. The acquisition mode of the hyperspectral spectrometer was push-sweep (line scan), and the hyperspectral image was acquired by moving the displacement platform under the condition of a fixed light source. HSI Analyzer 1.0 software was used for spectrum acquisition.
Before acquiring hyperspectral image data, the hyperspectral imaging system was preheated for 30 min. In addition, to ensure the stability of the sampling system and the quality of the obtained images, the intensity of the light source, the exposure time of the hyperspectral camera, and the object distance were adjusted to ensure a sharp image. The speed of the transmission device was also set to avoid distortion of the spatial resolution of the image. To avoid the impact of parameters such as sample moisture content on the results, the sealed samples were collected for half a day. Hyperspectral images were corrected with black-and-white negatives and a sample blackboard, and after several fine-tunings, the intensity of the light source was set to 1. The camera exposure time was set to 29 ms, the transmission device X-Speed was set to 1.32 mm·s−1, and the displacement platform moving speed was set to 0.9 mm·s−1. Potato sample images were then collected, and hyperspectral images were obtained by moving the displacement platform and collecting data from the hyperspectral imager.
Hyperspectral images collected by the hyperspectral image acquisition system often contain large amounts of noise. Therefore, black-and-white plate correction must be performed on the original hyperspectral images collected to eliminate part of the noise and ensure that the information from the corrected image was closer to that from the sample [19]. In the collection of potato samples, the calibration image W was first acquired under full white (an image with spectral reflectance of 100% was obtained by scanning a standard white correction plate), and then the calibration image B was acquired under full black (an image with spectral reflectance of 0% in a full dark environment with a lens cover). Finally, hyperspectral images of the potato samples were collected. The original spectral image I was obtained. The black-and-white plate correction of the spectrum was completed according to Formula (1), and the absolute spectral image I acquired was transformed into the relative spectral image R (i.e., the calibrated spectral image) [20].
R = I B W B × D N
where W is the calibrated image of the whiteboard, B is the calibrated image of the blackboard, I is the original hyperspectral image, R is the calibrated hyperspectral image, and DN is the highest brightness value (1700).

2.3. Hyperspectral Image Correction and Data Extraction

Hyperspectral data were extracted using ENVI 5.6 in this study. Before extracting hyperspectral data, the region of interest (ROI) of the sample hyperspectral image should be determined. The potato original image were devided into grayval images of different wave length. Then, the grayval image with defect characteristics and the grayval image without defect characteristics were picked out. And the ROI region result would be calculted out by conducting image subtraction. In image subtraction process, the difference between images was obtained by calculating the difference between the image with and without defect characteristics at the pixel level. Taking the potato black skin defect in Figure 2 as an example, the images were decomposed and subtracted and the ROI region was extracted, where the white regions represent these regions contain defects.
In this experiment, 30 samples of healthy and defective potato samples were taken from each sample, and 5 sampling points were collected on each sample, totaling 150 sampling points, i.e., 150 repeated tests. The sampling area of each sampling point has an important impact on the quality of the hyperspectral data; too large an area may bring too much noise, whereas too small an area will cause statistical bias. Through repeated experiments, this study finally determined the sampling area of 25 pixels × 25 pixels (the red square in Figure 3) for each sampling point to ensure the reliability of statistical analysis. The potato hyperspectral data extracted within the ROI are shown in Figure 3. Then, by calculating the average value of all pixels, the average hyperspectral data for each sample were obtained [21]. The hyperspectral data were saved in ASCII format, and the noisy bands at the beginning and end of the hyperspectral data were eliminated, leaving 288 bands (550 nm to 920 nm). In the initial phase and near the end of the scanning process of the hyperspectrometer, significant stray light and noise interference were inevitably generated due to the influence of the test equipment (such as thermal noise and current noise). This interference led to the degradation of hyperspectral data quality, which was evident in the instability of spectral curves. Therefore, to ensure the reliability of the analysis results, the band interval data with relatively stable spectral curves were selected for further analysis.

2.4. Data Analysis Method

In order to detect the external defects in potatoes, this study first preprocessed the original hyperspectral data using a variety of algorithms. Next, by comparing the results of different preprocessing algorithms combined with four quantitative models, the optimal preprocessing algorithm for hyperspectral data was determined. Then, the characteristic bands were extracted from the hyperspectral data obtained by a better preprocessing algorithm, and the qualitative model of defect detection was established by using the hyperspectral data of the characteristic bands. Finally, a universal method for the detection of external defects in potatoes was obtained through experiments.

2.4.1. Hyperspectral Data Preprocessing

Before establishing a hyperspectral data model, the hyperspectral data must be preprocessed [22]. Hyperspectral data preprocessing is indispensable in the field of spectroscopy and essential for extracting useful information from complex spectral signals. In the study of a hyperspectral system for detecting external defects in potatoes, SG [23] was used to eliminate random noise in hyperspectral data, and MSC was used to correct baseline drift caused by sample surface inhomogeneity or particle scattering. SNV was used to eliminate spectral intensity differences caused by changes in light intensity or uneven sample surfaces, while the normalization algorithm [24] was used to eliminate spectral intensity differences caused by instrument response or environmental changes, making the data more suitable for comparison and analysis [25]. These methods are not only suitable for traditional spectroscopy research but also have broad application prospects in remote sensing, medical spectroscopy, and other fields [26]. When the particle distribution is not uniform or the particle size difference is large, the propagation path and scattering intensity of light in the sample change, resulting in spectral reflectance fluctuations, especially in the short-wave region. This scattering effect can mask the true spectral characteristics of the sample, increasing noise and uncertainty. Such processing was performed to remove noise, background interference, and other interference factors from hyperspectral data to improve the signal-to-noise ratio, accuracy, quality, and availability. The “availability” here refers to the higher quality of the pre-processed hyperspectral data, which is more suitable for subsequent modeling and analysis, thus improving the reliability and consistency of the experimental results.

2.4.2. Quantitative Model Establishing

In order to determine the optimal hyperspectral data preprocessing algorithm, SVM, PLSR, PCR, and LSSVM data prediction models were used to study the quantitative model of potato external defect detection. By comparing the reliability of hyperspectral data prediction after different preprocessing methods under four quantitative prediction models, this study aimed to find the optimal model and preprocessing algorithm for potato defect detection.
  • Dataset splitting
Before establishing a quantitative model for the raw hyperspectral data, the sample set needed to be divided into training and prediction sets in proper proportions. When analyzing the sample dataset, selecting suitable and effective samples for chemical modeling not only improves the accuracy of the model but also provides a more convenient method for the subsequent maintenance and updating of the model. Commonly used sample set partitioning methods include random sampling (RS), conventional selection (CS) [27], Kennard–Stone (KS) [28], and sample set partitioning by X–Y joint distance (SPXY) [29]. In this study, the KS method was used to calculate the difference between samples according to the Euclidean distance between samples. The KS algorithm not only reduces the calculation cost and accelerates the learning speed but also avoids overfitting. In the first step of the KS algorithm, all samples were treated as training sets, the Euclidean distance of the entire sample set was calculated, and the two samples with the largest Euclidean distance were selected as the training set. In the second step, the distance between the remaining and selected samples was calculated. Samples with the shortest distance were selected as the training set. After all the remaining samples were calculated, the sample corresponding to the longest distance among the shortest distances was selected as the training set. In the third step, the second step was repeated until the number of samples selected was equal to the number determined in advance. The Euclidean distance represents the true distance between two points in n-dimensional space or the natural length of a vector. The formula used was as follows:
d x p , q = j = 1 N x p i x q j 2     p , q 1 , N
where xp and xq represent two different samples, and N represents the number of spectral wave points of the samples [30].
In this study, 180 sets of hyperspectral data were extracted from 180 potatoes. Then, the KS algorithm was used to divide 180 sets of hyperspectral data into a training set and a verification set with a ratio of 7:3, namely, 126 sets were selected for the training set and 54 sets were selected for the verification set. To ensure the prediction effect of the test model, the cross-validation method was used to assess and refine the model effect.
  • Methods for establishing quantitative models
SVM, PLSR, PCR, and LSSVM were used to establish quantitative models [31]. These models were chosen because they are well suited for the regression task, guaranteeing the accuracy and reliability of the model through cross-validation and parameter optimization. PCA [32] is a statistical analysis method for data reduction and characteristic selection that aims to retain as much information as possible by reducing the dimensions of the data. The data after dimensionality reduction retain the information of the original variables, and there is no correlation between the variables. PCA achieves dimensionality reduction by projecting the original data into a new coordinate system to maximize the variance of the data in the new coordinate system.
  • Metrics to evaluate model performance
The determination coefficient (R2), root mean square error correction (RMSEC), root mean square prediction error (RMSEP), and relative prediction deviation (RPD) were used to evaluate the advantages and disadvantages of the constructed model. The evaluation index formula is (3–6). The closer R2 is to 1, the higher the accuracy. The smaller the RMSEC and RMSEP values, the better the prediction ability of the model. The larger the RPD value, the better the prediction ability of the model.
R 2 = 1 i = 1 n y i y i ^ 2 i = 1 n y i y i ¯ 2
where y i is the actual value, y i ^ is the predicted value, and y i ¯ is the mean of actual values.
R M S E C = i = 1 n y i y i ^ 2 n
where y i is the actual value, y i ^ is the predicted value, and n is the number of samples in the calibration set.
R M S E P = i = 1 m y i y i ^ 2 m
where y i is the actual value, y i ^ is the predicted value, and m is the number of samples in the prediction set.
R P D = S D R M S E P
where SD is the standard deviation of the actual values in the prediction set, and RMSEP is the root mean square error of prediction.

2.4.3. Qualitative Model Establishment

In order to improve the efficiency of potato external defect detection and the feasibility of actual production, this study used the hyperspectral data of the optimal preprocessing algorithm proven by a quantitative model to carry out defect-detection research based on machine learning. However, the more spectral bands used for machine learning, the more complex and less efficient the model. Therefore, the characteristic wavelength was first extracted, and only the hyperspectral data of the characteristic wavelength were used to establish the qualitative model of defect detection.
  • Extraction characteristic wavelength
In this study, the successive projections algorithm (SPA) was used to extract the characteristic wavelength of hyperspectral data. The selection of a spectral characteristic wavelength typically involves projecting the wavelength onto other wavelengths, comparing the size of the projection vector, taking the maximum wavelength of the projection vector as the selected wavelength, and selecting the final characteristic wavelength according to the correction model.
  • Methods for establishing qualitative models
BPNN, CART, KNN, and LDA were used to establish qualitative models to detect the external defects of potatoes [33]. These models were chosen because they are effective for classification tasks, wherein the goal is to assign data points to specific classes based on spectral characteristics. The model was trained using the training set, and the parameters were adjusted to improve the performance of the model. The use of characteristic selection and dimensionality reduction techniques can enhance computational efficiency and the generalization ability of the model, ensuring that it can accurately classify new, unseen data.

2.4.4. Confusion Matrices

Confusion matrices [34] are a tool for evaluating the performance of classification models in machine learning, especially in supervised learning. They are mainly used to describe the relationship between the prediction results of the classification model and the actual sample class. The confusion matrix, in the form of a matrix, shows the number of samples predicted correctly and the number of samples predicted incorrectly in each category. Each column of the confusion matrix represents the prediction category, and the total of each column represents the total number of data predicted for that category; each row represents the true category to which the data belong, and the total number of data instances in each row represents the number of instances in that category.

3. Results

3.1. Spectral Preprocessing

The hyperspectral data of potatoes were extracted using ENVI5.6 and imported into Excel for editing. The full-band hyperspectral curve of potatoes was obtained by MATLAB. In the preview spectrogram, it was observed that the clutter noise was significant at 400–549 nm and 921–1100 nm, so the 550–920 nm band was selected for analysis and processing. The original average spectral curve in this range is shown in Figure 4. The hyperspectral data of six types of potatoes into three categories based on spectral curve characteristics: healthy potatoes, black/green-skin potatoes, and scab/mechanical-damage/broken-skin potatoes, which aligns with the actual production requirements for sorting potatoes based on external defects.
Unscrambler X10.4 software was used for preprocessing in this experiment. The SG, MSC, SNV, and normalization algorithms were used. Because there was a large amount of noise in the hyperspectral data, and the SG algorithm can smooth the noise, after comparing and analyzing other combined preprocessing methods, the SG algorithm and the other three preprocessing methods had the best effect. The kernel size used by the SG algorithm in this study was 11. Therefore, the SG, MSC, SNV, and normalization algorithms were selected to be combined with the SG algorithm for data preprocessing. This means that the SG algorithm was first used to perform preliminary smoothing for the data, and then the results of the preliminary smoothing were further processed using different algorithms to complete the data preprocessing process. The hyperspectral curves of the raw potato hyperspectral data processed by the SG, MSC, SNV, and normalization algorithms are shown in Figure 5, Figure 6 and Figure 7.

3.2. Quantitative Models

According to the method in Section 2.4.2, quantitative models of healthy, black/green-skin, and scab/mechanical-damage/broken-skin potatoes were established using Unscramble X10.4 software.
The optimal quantitative spectral prediction model for healthy potatoes is presented in Table 1. By comparing four types of spectral quantitative models for healthy potatoes, it was found that the hyperspectral data processed by SG–SNV combined with the PCR algorithm had the best effect, with an R² value of 0.9499, RMSEC of 0.0184, RMSEP of 0.0154, and RPD of 14.4893. The results showed that SG–SNV preprocessing combined with the PCA algorithm offers significant advantages in the spectral analysis of healthy potatoes.
The specific values of the hyperspectral quantitative model for black-green potatoes are listed in Table 2. After comparing SVM, PLSR, PCR, and LSSVM algorithms, the SG–SNV preprocessing model combined with the SVM algorithm had the best performance, with an R² value of 0.9942, RMSEC of 0.0071, RMSEP of 0.0193, and RPD of 13.2256. The R² of this model was close to 1, and the RPD value was high, indicating that its prediction ability was significantly better than other methods. Compared with the healthy potato model, the black/green-skin potato model had a higher R2 but slightly larger RMSEP, which may be due to the more complex spectral characteristics of black/green-skin potatoes, yet still showed excellent predictive performance overall.
The optimal spectral quantitative model for the scab/mechanical-damage/broken-skin potatoes is shown in Table 3. In the spectral quantitative prediction of scab/mechanical-damage/broken-skin potatoes, the model of SG–SNV preprocessing combined with the LSSVM algorithm had the best performance, with an R² value as high as 0.9970, an RMSEC value of 0.0936, RMSEP of 0.0317, and RPD of 18.3182. The R2 of this model was close to 1, the RMSEC and RMSEP values were extremely low, and the RPD value was significantly higher than those of other models, indicating its strong prediction ability for complex defects. Compared with the healthy potato and black/green-skin potato models, the RPD value of this model was significantly improved, indicating that it is better at interpreting hyperspectral data when dealing with complex defects.
Compared to previous studies, the R2, RMSEC, RMSEP, and RPD values of these models were significantly optimized, especially when dealing with complex defects, showing higher prediction accuracy and stability. Future research can further optimize the preprocessing methods and algorithms to improve the generalization ability and applicability of the model.
In a quantitative analysis model using hyperspectral techniques to detect external defects in potatoes, PCA selected the key bands by the criteria of variance maximization and eigenvalue ranking and preferentially retained the bands with the largest variance to capture the most information. The actual measurement index was mainly spectral reflectance. The number of bands in PCA was reduced from the initial 228 by two principal components after PCA. The criteria for selecting bands in PCA were based on variance maximization and eigenvalue ordering, with the principal component with the largest variance being retained first. The training set (blue dots) was used for model training, and the prediction set (red dots) was used for verification. The higher the coincidence degree of red and blue dots and their proximity to the baseline indicates that the model prediction was accurate. The closer the data points are to the baseline, the greater the variance of the model interpretation, which indicates that the model is more effective for detecting defects. The scatterplots of variance for PCA of three types of potatoes are shown in Figure 8.
According to the prediction results of the three types of potatoes and the PCA analysis results of the above different data prediction models, it can be seen that for the prediction of the three types of potatoes, the PCR, SVM, and LSSVM data prediction methods can be used to predict the data preprocessed by the SG–SNV algorithm, achieving the best prediction results. Therefore, the hyperspectral data processed by the SG–SNV preprocessing algorithm can be used for subsequent defect detection research.

3.3. Qualitative Models

This study adopts the hyperspectral data preprocessed by the SG–SNV algorithm proved above to be suitable for data prediction to conduct defect detection research based on machine learning. Characteristic hyperspectral data were extracted using MATLAB R2020b. Characteristic hyperspectral data refers to the characteristic pattern of light absorbed, emitted, or scattered by a substance over a specific wavelength range. The characteristic hyperspectral data, combined with a qualitative model, can be used to identify potato external defects. The hyperspectral data used in this study had 288 wavelength points and contained a large number of spectral variables, including redundant and collinear variables, which needed to be optimized to obtain the most effective spectral information. The SPA algorithm selected the combination of variables with the least redundant information and collinearity. During the projection of multi-dimensional hyperspectral data, a new spectral distribution matrix was generated, and the characteristic wavelengths of these three types of potatoes were selected based on the redundant and collinear variables. The characteristic wavelengths selected results are shown in Figure 9. In Figure 9, the horizontal axis of small rectangles represents the selected characteristic wavelength, while the vertical axis of them represents the variable index value. The variable index value indicates the specific position of each spectral wavelength in the spectral distribution matrix, which only reflects the mathematical projection relationship but does not have direct physical significance. The characteristic wavelengths of hyperspectral data of three types of potatoes after SG–SNV preprocessing were 550, 610, 667, 768, 781, 790, 803, 861, 865, 867, 882, and 883 nm for healthy potatoes; 565, 597, 661, 684, 723, 772, 798, 854, 857, 859, 862, 887, and 891 nm for black/green-skin potatoes; and 550, 668, 701, 753, 831, 840, 857, 859, 864, 867, 868, 872, 877, and 880 nm for scab/mechanical-damage/broken-skin potatoes.
This study successfully distinguished the external defects of different potatoes by establishing qualitative models based on characteristic wavelengths extracted from hyperspectral data. Results show that the qualitative models based on different algorithms show good detection performance in both the training and test sets, providing reliable technical support for the classification of potato external defects.
In the healthy potato model, the CART algorithm showed high generalization ability, and the detection rate of the test set reached 100%, which indicates that the model can accurately identify healthy samples. However, the detection rate of the training set was relatively low (66.7%), suggesting that the model may have a certain risk of overfitting, and its robustness should be further improved by increasing sample diversity or optimizing algorithm parameters. In the black/green-skin potato model, the KNN algorithm showed a high detection rate (71.4% and 94.3%, respectively) on the training set and the test set, indicating that the model has good classification performance and generalization ability. This result is consistent with previous studies, further validating the effectiveness of the KNN algorithm in hyperspectral data classification. In the scab/mechanical-damage/broken-skin potato model, the BPNN algorithm achieved the best classification effect, and the detection rate of the training set and the test set reached 75.5% and 93.1%, respectively. This result shows that the BPNN algorithm has strong characteristic extraction and classification ability when dealing with complex defect types, but its detection rate of the training set still has room to improve, and further optimization of the network structure or introduction of more characteristic information may be needed. The results of the training set of LDA for the three types of potato qualitative models were all lower than 64%, and the effect was poor. The three qualitative discriminant models with the highest detection rates are shown in Figure 10.

3.4. Experimental Verification and Result Analysis

In order to come up with a clear method to distinguish potato external defects, a systematic comparative analysis of the above models was carried out. We explored and screened out a general method suitable for healthy potatoes, black/green-skin potatoes, and scab/mechanical-damage/broken-skin potatoes, so that a universal detection scheme can be obtained. By using the SG–SNV combined preprocessing method and SPA to extract characteristic wavelength, three optimal models of CART, KNN, and BPNN were used to test and verify the three groups of potatoes. Due to the poor effect of the LDA model, the LDA model was eliminated. Each group selected 30 potatoes, and the results were displayed in the confusion matrix.
The confusion matrix chart is used to observe the classification results of three types of potato samples based on the three optimal models. As shown in Figure 11a–c, the numbers on the diagonal from the upper left to the lower right represent the number of samples that were correctly predicted. For example, in (a), all 30 healthy potatoes were correctly predicted, 21 black/green-skin potatoes were correctly predicted, and 24 potatoes with scab/mechanical damage/broken skin were correctly predicted. It can be seen that most samples were predicted correctly, which indicates that the established model has good performance in identifying external defects of potatoes. The prediction accuracy of the three experimental verification models is shown in Figure 11d. The prediction accuracy rate of the experimental verification model is almost the same as that of the qualitative model, indicating that the model has good robustness. After comparing and analyzing the prediction results of all qualitative models, it can be concluded that the qualitative model based on the KNN algorithm has the most stable and good effect. However, the identification of a small number of samples was wrong, so the ability of the model to identify different damage properties of potatoes needs to be further improved.

4. Discussion

It can be concluded from the experimental results that hyperspectral imaging technology has high accuracy in the nondestructive detection of external defects in red-skin potatoes, and established quantitative models and qualitative models are reliable. Compared with previous studies mainly focused on yellow-skin potatoes, this study systematically explored the application of hyperspectral imagery technology in the detection of external defects in red potatoes, which further confirmed the universality of hyperspectral imaging technology in potato defect detection.
In terms of methodology, this study established and compared preprocessing models based on SG, SNV, MSC, and normalization algorithms, proposed a characteristic wavelength extraction model with the SPA algorithm, and designed qualitative analysis models for defect detection with different machine learning models such as CART, KNN, and BPNN. Which are similar to the previous research methods [4,5,16] in yellow-skin potatoes. However, in previous studies on external defect detection of potatoes, independent models are usually established for each different type of damage or defect. Although different types of potato defects may require different preprocessing methods and different machine learning modeling methods to accurately detect these defects, the excessive number of models makes it difficult to meet the demand for efficient detection of external defects in potatoes in practical applications using hyperspectral imaging technology.
By combining the models in each step of potato external defect detection mentioned above, it can be determined that the adoption of the SG–SNV combined preprocessing model, the SPA characteristic wavelength extraction model, and the KNN quantitative model allow the detection accuracy to reach 93%, 93%, and 83% for healthy potatoes, black/green-skin potatoes, and scab/mechanical-damage/broken-skin potatoes, respectively. The experimental results in Figure 11 show that the model proposed in this study has a higher detection accuracy for three types of synthesis than other models. The model combination in this study realizes a complete defect recognition process, which can simplify the recognition process and improve efficiency. It is more suitable for practical production applications compared to previous research.
However, it is worth noting that the constructed quantitative model shows high prediction accuracy (R² > 0.99), there may be a risk of model overfitting, which needs to be further verified in practical applications by expanding the sample size and increasing the validation steps. Also, better results were achieved under laboratory conditions, there may be more cases of targets classification failure in the actual production environment. due to sample diversity and environmental complexity, such as light conditions and potato surface humidity may affect the accuracy of spectral measurements.
Future research should focus on verifying the feasibility of the technology in real production environments and exploring more robust algorithms to reduce the impact of environmental factors. At the same time, expanding the sample size and increasing the defect types will help to improve the generalization ability of the model. These improvements will lay a solid foundation for the practical application of hyperspectral imagery technology in the potato industry, thus promoting the further development of the red-skin potato industry.

5. Conclusions

To solve the problems of low efficiency and accuracy currently existing in ordinary spectroscopy and machine vision for potato external defect detection, the hyperspectral imaging technology and machine learning algorithm were used in this study to achieve nondestructive detection of healthy potatoes and external defects such as scab, black skin, broken skin, green skin, and mechanical damage of red-skin potatoes. The detection experimental results have verified the feasibility and accuracy of the recognition model proposed in this study. The main conclusions and contributions of this study are as follows.
By comparing and analyzing the hyperspectral data processing methods of healthy potatoes and potatoes with different external defects, this study proposes a hyperspectral data preprocessing model based on SG–SNV combined algorithm, characteristics wavelengths extracting model based on SPA algorithm, and qualitative analyzing model based on KNN machine learning method. By combining the models of these three parts, a complete detection method and model for potato external defects was established. Experimental results show that the combined method proposed in this study can achieve a detection accuracy of 93%, 93%, and 83% for healthy potatoes, black/green-skin potatoes, and scab/mechanical-damage/broken-skin potatoes, respectively.
It can be concluded that the potato external defect detection method and model proposed in this study have high accuracy and are more suitable for practical production. Further evaluation is still needed by expanding the sample dataset size and validating it in the actual production environment. Also, future research should be focused on combining more features or introducing more advanced algorithms such as deep learning to further improve accuracy and generality.
Above all, the study results provided a theoretical basis for the use of hyperspectral imaging technology in potato defect detection equipment designing and its application, which also provides references for quality detection of other varieties of potatoes, fruits, and vegetables using hyperspectral imaging technology and machine learning.

Author Contributions

Conceptualization, P.Z. and X.W.; data curation, Q.Z. and X.N.; formal analysis, X.W.; investigation, X.W., Y.S. and X.N.; project administration, P.Z.; validation, Q.X.; writing—original draft, P.Z., X.W, Q.Z., Q.X. and Y.S.; writing—review and editing, Q.Z., Q.X. and Y.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Basic Research Program Project of Liaoning Province of China (2023JH2/101300117).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

All applicable data are published and referenced in the paper.

Acknowledgments

We would like to thank the Agrotechnical Extension Center of Jianping County of Liaoning Province in China, for providing test materials.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

SGSavitzky–Golay
MSCmultiplicative scatter correction
SNVstandard normal variate transformation
SVMsupport vector machine
PLSRpartial least squares regression
PCAprincipal component analysis
PCRprincipal component regression
LSSVMleast squares support vector machine
BPNNbackpropagation neural network
CARTclassification and regression tree
KNNk-nearest neighbors
LDAlinear discriminant analysis
RMSECroot mean squared error of calibration
RMSEProot mean squared error of prediction
RPDrelative prediction deviation
SPAsuccessive projections algorithm
RSrandom sampling
PLS-DApartial least squares discriminant analysis
MDDNetmulti-type defect detection network
HSIhyperspectral imaging
MSImulti-spectral imaging
IWSAimproved watershed segmentation algorithm
VNIRvisible near infrared
SWIRshort wave infrared
CSconventional selection
KSKennard–Stone
SPXYsample set partitioning based on joint x–y distance
ROIregion of interest

References

  1. Ke, J.; Yang, B.; Jiao, D.; Yang, L.; Zhou, J. Current situation and countermeasures of potato mechanization production in China. South China Agric. 2017, 11, 71–72. [Google Scholar] [CrossRef]
  2. Riza, D.F.A.; Widodo, S.; Yamamoto, K.; Ninomiya, K.; Suzuki, T.; Ogawa, Y.; Kondo, N. External defects and severity level evaluation of potato using single and multispectral imaging in near infrared region. Inf. Process. Agric. 2024, 11, 80–90. [Google Scholar] [CrossRef]
  3. Al Riza, D.F.; Suzuki, T.; Ogawa, Y.; Kondo, N. External Defects and Soil Deposits Identification on Potato Tubers using 2CCD Camera and Principal Component Images. Ind. J. Teknol. Manaj. Agroindustri 2023, 12, 13. [Google Scholar] [CrossRef]
  4. Yu, Y.; Zhenfang, L.; Min, H.; Qibing, Z.; Xin, Z. Automatic detection of multi-type defects on potatoes using multispectral imaging combined with a deep learning model. J. Food Eng. 2023, 336, 111213. [Google Scholar] [CrossRef]
  5. Li, X.; Tao, H.; Gao, H.; Li, P.; Huang, T.; Ren, J. Nondestructive detection method of potato scab based on multi-sensor information fusion technology. Trans. Chin. Soc. Agric. Eng. 2013, 29, 277–284. [Google Scholar] [CrossRef]
  6. Cozzolino, D. Advantages and limitations of using near infrared spectroscopy in plant phenomics applications. Comput. Electron. Agric. 2023, 212, 108078. [Google Scholar] [CrossRef]
  7. Yuanyuan, S.; Yi, L.; Guantao, X.; Yukang, S.; Quankai, L.; Zhichao, H. Detection and analysis of sweet potato defects based on hyperspectral imaging technology. Infrared Phys. Technol. 2022, 127, 104403. [Google Scholar] [CrossRef]
  8. Faqeerzada, M.A.; Kim, Y.N.; Kim, H.; Akter, T.; Kim, H.; Park, M.S.; Kim, M.S.; Baek, I.; Cho, B.K. Hyperspectral imaging system for pre- and post-harvest defect detection in paprika fruit. Postharvest Biol. Technol. 2024, 218, 113151. [Google Scholar] [CrossRef]
  9. Akter, T.; Faqeerzada, M.A.; Kim, Y.; Pahlawan, M.F.R.; Aline, U.; Kim, H.; Kim, H.; Cho, B.-K. Hyperspectral imaging with multivariate analysis for detection of exterior flaws for quality evaluation of apples and pears. Postharvest Biol. Technol. 2025, 223, 113453. [Google Scholar] [CrossRef]
  10. Shanthini, K.S.; Francis, J.; George, S.N.; George, S.; Devassy, B.M. Early bruise detection, classification and prediction in strawberry using Vis-NIR hyperspectral imaging. Food Control 2025, 167, 110794. [Google Scholar] [CrossRef]
  11. Keresztes, J.C.; Diels, E.; Goodarzi, M.; Nguyen-Do-Trong, N.; Goos, P.; Nicolai, B.; Saeys, W. Glare based apple sorting and iterative algorithm for bruise region detection using shortwave infrared hyperspectral imaging. Postharvest Biol. Technol. 2017, 130, 103–115. [Google Scholar] [CrossRef]
  12. Wang, H.; Yang, X.; Zhang, C.; Guo, D.; Bao, Y.; He, Y.; Liu, F. Fast Identification of Transgenic Soybean Varieties Based Near Infrared Hyperspectral Imaging Technology. Spectrosc. Spectr. Anal. 2016, 36, 1843–1847. [Google Scholar] [CrossRef]
  13. Gold, K.M.; Townsend, P.A.; Herrmann, I.; Gevens, A.J. Investigating potato late blight physiological differences across potato cultivars with spectroscopy and machine learning. Plant Sci. 2020, 295, 110316. [Google Scholar] [CrossRef] [PubMed]
  14. Chao, Q.; Murilo, S.; Jesper, C.W.; Ea, H.R.S.; Merethe, B.; Erik, A.; Junfeng, G. In-field classification of the asymptomatic biotrophic phase of potato late blight based on deep learning and proximal hyperspectral imaging. Comput. Electron. Agric. 2023, 205, 495. [Google Scholar] [CrossRef]
  15. Li, Q.; Fu, X.; Li, H.; Zhou, H. Advancing County-Level Potato Cultivation Area Extraction: A Novel Approach Utilizing Multi-Source Remote Sensing Imagery and the Shapley Additive Explanations–Sequential Forward Selection–Random Forest Model. Agriculture 2025, 15, 92. [Google Scholar] [CrossRef]
  16. Zhao, M.; Liu, Z.; Zou, X.; Wu, L.; Zhang, F.; Long, J. Detection of defects on potatoes by hyperspectral imaging technology. Laser J. 2016, 37, 20–24. [Google Scholar] [CrossRef]
  17. He, L.; Pan, Q.; Di, W.; Li, Y. Research Advance on Target Detection for Hyperspectral Imagery. Acta Electron. Sin. 2009, 37, 2016–2024. [Google Scholar] [CrossRef]
  18. Peraza-Alemán, C.M.; López-Maestresalas, A.; Jarén, C.; Rubio-Padilla, N.; Arazuri, S. A Systematized Review on the Applications of Hyperspectral Imaging for Quality Control of Potatoes. Potato Res. 2024, 67, 1539–1561. [Google Scholar] [CrossRef]
  19. Morales, A.; Horstrand, P.; Guerra, R.; Leon, R.; Ortega, S.; Díaz, M.; Melián, J.M.; López, S.; López, J.F.; Callico, G.M.; et al. Laboratory Hyperspectral Image Acquisition System Setup and Validation. Sensors 2022, 22, 2159. [Google Scholar] [CrossRef]
  20. Rahman, M.H.; Busby, S.; Ru, S.; Hanif, S.; Saez, A.S.; Zheng, J.; Rehman, T.U. Transformer-Based hyperspectral image analysis for phenotyping drought tolerance in blueberries. Comput. Electron. Agric. 2025, 228, 109684. [Google Scholar] [CrossRef]
  21. Sun, J.; Jin, X.; Mao, H.; Wu, X.; Yang, N. Application of hyperspectral imaging technology for detecting adulterate rice. Trans. Chin. Soc. Agric. Eng. 2014, 30, 301–307. [Google Scholar] [CrossRef]
  22. Leila, L.; Amir, D.M.; Asim, B.; Shahrokh, F.; Thomas, S. Spectral prediction of soil salinity and alkalinity indicators using visible, near-, and mid-infrared spectroscopy. J. Environ. Manag. 2023, 345, 118854. [Google Scholar] [CrossRef]
  23. Wang, W.; Feng, W.; Chang, N.; Liu, Q.; LIi, Z.; Chen, Y.; Li, C.; Chen, X.; Zhang, Y. Prediction of chlorophyll content in flue-cured tobacco based on spectral pretreatment and machine learningalgorithm. Soil Fertil. Sci. China 2023, 3, 194–201. [Google Scholar] [CrossRef]
  24. Diwu, P.; Bian, X.; Wang, Z.; Liu, W. Study on the Selection of Spectral Preprocessing Methods. Spectrosc. Spectr. Anal. 2019, 39, 2800–2806. [Google Scholar] [CrossRef]
  25. Yu, G.J.; Zheng, W.D.; Xiang, W.; Cheng, T.J.; Tong, X.J.; Ping, Z.; Feng, N.X. Detection of Powdery Mildew of Bitter Gourd Based on NIR/Fluorescence Spectra. J. Biosyst. Eng. 2023, 48, 319–328. [Google Scholar] [CrossRef]
  26. Sujitra, F.; Chanat, T.; Parichat, T.; Sila, K. Development of new fruit quality indices through aggregation of fruit quality parameters and their predictions using near-infrared spectroscopy. Postharvest Biol. Technol. 2023, 204, 112438. [Google Scholar] [CrossRef]
  27. Dong, X.; Michele, K.; Busolo, W.; Karl, H.; James, C. Development of robust quantitative methods by near-infrared spectroscopy for rapid pharmaceutical determination of content uniformity in complex tablet matrix. Analyst 2009, 134, 1405–1415. [Google Scholar] [CrossRef]
  28. Morais, C.L.M.; Santos, M.C.D.; Lima, K.M.G.; Martin, F.L. Improving data splitting for classification applications in spectrochemical analyses employing a random-mutation Kennard-Stone algorithm approach. Bioinformatics 2019, 35, 5257–5263. [Google Scholar] [CrossRef]
  29. Cai, Y.; Ma, X.; Huang, B.; Zhang, R.; Wang, X. LIBS combined with SG-SPXY spectral data pre-processing for cement raw meal composition analysis. Appl. Opt. 2024, 63, A24–A31. [Google Scholar] [CrossRef]
  30. Chen, S.; Huang, D.; Yu, S.; Gao, X.; Zhen, J.; Chen, X. Developing a rapid COD detection method based on the fusion strategy of multi-depth hyperspectral data. Biochem. Eng. J. 2025, 215, 109630. [Google Scholar] [CrossRef]
  31. Asghari, A.; Khorrami, M.K.; Garmarudi, A.B. Comparison between partial least square and support vector regression with a genetic algorithm wavelength selection method for the simultaneous determination of some oxygenate compounds in gasoline by FTIR spectroscopy. Infrared Phys. Technol. 2020, 105, 103177. [Google Scholar] [CrossRef]
  32. Guo, L.; Yin, Y.; Yuan, Y.; Yu, H. A robust characteristic wavelength extraction strategy for hyperspectral information:Three cases of potato quality evaluation. Microchem. J. 2024, 200, 110346. [Google Scholar] [CrossRef]
  33. Yujie, L.; Benxue, M.; Cong, L.; Guowei, Y. Accurate prediction of soluble solid content in dried Hami jujube using SWIR hyperspectral imaging with comparative analysis of models. Comput. Electron. Agric. 2022, 193, 106655. [Google Scholar] [CrossRef]
  34. Berliana, E.V.; Riasetiawan, M. Comparative Analysis of Naïve Bayes Classifier, Support Vector Machine and Decision Tree in Rainfall Classification Using Confusion Matrix. Int. J. Adv. Comput. Sci. Appl. 2024, 15, 560–567. [Google Scholar] [CrossRef]
Figure 1. Potato samples: (a) healthy potato; (b) green-skin potato; (c) black-skin potato; (d) scab disease potato; (e) broken-skin potato; (f) mechanical-damage potato.
Figure 1. Potato samples: (a) healthy potato; (b) green-skin potato; (c) black-skin potato; (d) scab disease potato; (e) broken-skin potato; (f) mechanical-damage potato.
Agriculture 15 00573 g001aAgriculture 15 00573 g001b
Figure 2. Image binarization processing.
Figure 2. Image binarization processing.
Agriculture 15 00573 g002
Figure 3. Extraction of hyperspectral data from the region of interest.
Figure 3. Extraction of hyperspectral data from the region of interest.
Agriculture 15 00573 g003
Figure 4. Average hyperspectral curve at 550–920 nm.
Figure 4. Average hyperspectral curve at 550–920 nm.
Agriculture 15 00573 g004
Figure 5. Spectrogram of different preprocessing methods for healthy potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Figure 5. Spectrogram of different preprocessing methods for healthy potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Agriculture 15 00573 g005
Figure 6. Spectrogram of different preprocessing methods for black/green-skin potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Figure 6. Spectrogram of different preprocessing methods for black/green-skin potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Agriculture 15 00573 g006
Figure 7. Spectrogram of different preprocessing methods for scab/mechanical-injury/broken-skin potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Figure 7. Spectrogram of different preprocessing methods for scab/mechanical-injury/broken-skin potatoes: (a) original; (b) SG; (c) MSC; (d) SNV; (e) normalization; (f) SG–MSC; (g) SG–SNV; and (h) SG–normalization.
Agriculture 15 00573 g007aAgriculture 15 00573 g007b
Figure 8. The scatterplot of variance for PCA of three types of potatoes: (a) healthy potatoes; (b) black/green-skin potatoes; (c) scab/mechanical-damage/broken-skin potatoes.
Figure 8. The scatterplot of variance for PCA of three types of potatoes: (a) healthy potatoes; (b) black/green-skin potatoes; (c) scab/mechanical-damage/broken-skin potatoes.
Agriculture 15 00573 g008
Figure 9. Characteristic wavelength curves of selected potatoes under the optimal hyperspectral model.
Figure 9. Characteristic wavelength curves of selected potatoes under the optimal hyperspectral model.
Agriculture 15 00573 g009
Figure 10. Discriminant accuracy of the three spectral qualitative models.
Figure 10. Discriminant accuracy of the three spectral qualitative models.
Agriculture 15 00573 g010
Figure 11. Confusion matrix chart of prediction results: (a) CART; (b) KNN; (c) BPNN; (d) experimental verification of model detection rate.
Figure 11. Confusion matrix chart of prediction results: (a) CART; (b) KNN; (c) BPNN; (d) experimental verification of model detection rate.
Agriculture 15 00573 g011
Table 1. Optimal spectral quantitative model for healthy potatoes.
Table 1. Optimal spectral quantitative model for healthy potatoes.
Model MethodPreprocess AlgorithmsR2RMSECRMSEPRPD
LSSVMOriginal0.95460.00180.12194.8032
SNV0.97020.00180.00616.3696
SG0.96710.00180.00815.5457
Normalization0.74320.00170.03192.0644
MSC0.77850.31860.02912.1572
SG–SNV0.78530.84360.02242.2613
SG–normalization0.93130.00160.01583.8431
SG–MSC0.76490.00170.02782.0839
PCROriginal0.96730.02850.04075.5344
SNV0.99720.01800.019411.0049
SG0.95830.32140.40516.5369
Normalization0.74920.04750.02723.0568
MSC0.75870.02480.04461.6601
SG–SNV0.94990.01840.015414.4893
SG–normalization0.90990.06960.044742.9731
SG–MSC0.87760.02560.05743.3721
PLSROriginal0.98720.26680.45067.4802
SNV0.98620.02380.02048.9260
SG0.97720.40850.43064.2544
Normalization0.92880.12450.03523.5671
MSC0.96350.04240.03095.2369
SG–SNV0.97890.22610.28966.5714
SG–normalization0.98840.03670.323964.8022
SG–MSC0.81450.10830.03532.1637
SVMOriginal0.99790.95130.85941.1013
SNV0.95690.54060.48076.1628
SG0.25150.87270.20851.2220
Normalization0.98840.46450.09791.0323
MSC0.99840.04330.01921.0764
SG–SNV0.86320.05170.08222.8107
SG–normalization0.99560.00490.004850.7900
SG–MSC0.97980.61070.01351.3007
The bold number is the value of the evaluation index of the optimal quantitative model.
Table 2. Optimal spectral quantitative model for black/green-skin potatoes.
Table 2. Optimal spectral quantitative model for black/green-skin potatoes.
Model MethodPreprocess AlgorithmsR2RMSECRMSEPRPD
LSSVMOriginal0.99950.00220.003136.0454
SNV0.99710.03150.019613.6751
SG0.99850.00180.003826.0084
Normalization0.99750.00220.000863.6733
MSC0.99870.00230.003711.8601
SG–SNV0.99710.00410.016316.8621
SG–normalization0.99720.01840.011217.6351
SG–MSC0.99540.00140.004114.8136
PCROriginal0.99890.00320.003830.9618
SNV0.99550.01940.017715.3956
SG0.99860.00280.003732.5557
Normalization0.99940.00090.003447.2952
MSC0.99460.03390.003116.8008
SG–SNV0.98830.02400.01679.1554
SG–normalization0.99750.00130.002364.9067
SG–MSC0.99760.00340.002921.7409
PLSROriginal0.98730.01270.357627.8184
SNV0.99530.01960.005214.4648
SG0.94940.01670.004332.0425
Normalization0.99820.03740.001674.0153
MSC0.99490.00160.004213.5957
SG–SNV0.99830.00760.012623.1621
SG–normalization0.99890.00170.068382.8501
SG–MSC0.99520.00150.004014.1826
SVMOriginal0.45470.00320.08071.3548
SNV0.96990.00650.04466.2774
SG0.72780.00360.06281.917
Normalization0.99520.00310.006915.8604
MSC0.77650.00170.02782.334
SG–SNV0.99420.00710.019313.2256
SG–normalization0.99630.00370.008716.6649
SG–MSC0.74110.00170.02711.983
The bold number is the value of the evaluation index of the optimal quantitative model.
Table 3. Optimal spectral quantitative model for scab/mechanical-damage/broken-skin potatoes.
Table 3. Optimal spectral quantitative model for scab/mechanical-damage/broken-skin potatoes.
Model MethodPreprocess AlgorithmsR2RMSECRMSEPRPD
LSSVMOriginal0.99820.07890.035323.6735
SNV0.99760.00440.029120.4414
SG0.94490.00210.003242.2290
Normalization0.98850.02450.02048.1345
MSC0.99860.00210.003911.8122
SG–SNV0.99700.09360.031718.3182
SG–normalization0.99950.00190.001584.5735
SG–MSC0.99840.00210.003925.3372
PCROriginal0.99800.00340.003430.8110
SNV0.99750.02770.031621.1826
SG0.99880.00380.003328.9727
Normalization0.98760.03570.02898.2371
MSC0.99690.00370.003518.4770
SG–SNV0.99810.02560.033116.2945
SG–normalization0.99850.00140.002124.7903
SG–MSC0.99690.03140.003617.9501
PLSROriginal0.99890.00310.001629.6294
SNV0.96050.00640.035115.9038
SG0.99890.00190.003630.9011
Normalization0.94940.00140.001712.8549
MSC0.99180.00120.003811.0638
SG–SNV0.95990.01130.033216.8489
SG–normalization0.99920.00010.0015104.4002
SG–MSC0.99110.00180.00479.9476
SVMOriginal0.50050.03990.07781.4450
SNV0.92120.01480.16123.6033
SG0.67760.03970.05481.7792
Normalization0.96950.00370.03145.8785
MSC0.93000.00240.01453.9679
SG–SNV0.98570.01510.06938.4233
SG–normalization0.99210.00410.014911.5070
SG–MSC0.77210.00200.02842.1677
The bold number is the value of the evaluation index of the optimal quantitative model.
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.

Share and Cite

MDPI and ACS Style

Zhao, P.; Wang, X.; Zhao, Q.; Xu, Q.; Sun, Y.; Ning, X. Non-Destructive Detection of External Defects in Potatoes Using Hyperspectral Imaging and Machine Learning. Agriculture 2025, 15, 573. https://doi.org/10.3390/agriculture15060573

AMA Style

Zhao P, Wang X, Zhao Q, Xu Q, Sun Y, Ning X. Non-Destructive Detection of External Defects in Potatoes Using Hyperspectral Imaging and Machine Learning. Agriculture. 2025; 15(6):573. https://doi.org/10.3390/agriculture15060573

Chicago/Turabian Style

Zhao, Ping, Xiaojian Wang, Qing Zhao, Qingbing Xu, Yiru Sun, and Xiaofeng Ning. 2025. "Non-Destructive Detection of External Defects in Potatoes Using Hyperspectral Imaging and Machine Learning" Agriculture 15, no. 6: 573. https://doi.org/10.3390/agriculture15060573

APA Style

Zhao, P., Wang, X., Zhao, Q., Xu, Q., Sun, Y., & Ning, X. (2025). Non-Destructive Detection of External Defects in Potatoes Using Hyperspectral Imaging and Machine Learning. Agriculture, 15(6), 573. https://doi.org/10.3390/agriculture15060573

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop