Method for continuous prediction of maturity based on raman spectrum calibrated appearance image of fruit
Patent Information
- Application Number
- CN202611343011.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-09-29
AI Technical Summary
[0006]本发明提供了基于拉曼光谱标定的水果外观图像成熟度连续预测方法,以解决现有视觉成熟分类标签主观性强、难以反映内部生化状态,以及直接拉曼光谱检测成本较高的问题
[0038](1)本发明将内部拉曼光谱所反映的成熟相关生化组分变化信息转化为连续成熟指数,能够为水果成熟度预测提供具有生化解释性的监督目标;
Smart Images

Figure CN122836023A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-destructive testing technology for food and agricultural products, and involves computer vision, Raman spectroscopy analysis and machine learning modeling. Specifically, it relates to a method for continuous prediction of the maturity of fruit appearance images based on Raman spectroscopy calibration. Background Technology
[0002] Fruit maturity is a crucial indicator affecting post-harvest grading, storage, transportation, processing, and commercial value. Existing methods for evaluating fruit maturity mainly include manual visual grading and maturity stage classification based on appearance images. Manual visual grading typically relies on peel color, spot distribution, fruit morphology, and operator experience, resulting in strong subjectivity, insufficient evaluation consistency, and blurred boundaries between adjacent maturity stages. Appearance image-based classification methods can reduce labor costs and improve detection efficiency to some extent; however, these methods often use manual visual grades or discrete maturity stages as training labels, and their output primarily reflects the external appearance of the fruit, making it difficult to directly characterize the continuous changes in maturity-related components such as sugars, starches, pigments, organic acids, and phenolic substances within the fruit.
[0003] Raman spectroscopy provides vibrational information about molecules in a sample, which can be used to characterize changes in components such as sugars, starches, and pigments during fruit ripening. Therefore, constructing maturity evaluation indicators based on Raman spectroscopy has good biochemical interpretability. Taking bananas as an example, during ripening, starch degradation and soluble sugar accumulation typically occur within the pulp, resulting in corresponding changes in starch-related and sugar-related characteristic peaks in the Raman spectrum. However, acquiring Raman spectra of pulp or other internal tissues usually requires destructive sampling. If continuous internal Raman detection is performed on each sample during actual grading, storage management, or commercial distribution, there are problems such as high detection costs, complex operation, limited detection throughput, and unsuitability for large-scale application.
[0004] Existing technologies have attempted to combine Raman spectroscopy and color features of fruit surfaces for maturity detection, obtaining spectral and color prediction results separately and then combining them to output a maturity level. While these methods incorporate Raman spectral and color information, their output primarily represents discrete maturity levels, failing to depict the continuous changes during the fruit ripening process. Furthermore, Raman information is mostly used as input for classification models or as multimodal discriminant features, and has not yet been further developed into interpretable, continuous maturity indicators by incorporating key biochemical changes during ripening. Moreover, if simultaneous acquisition of Raman spectra and appearance images is still required in the application phase, equipment costs, detection efficiency, and ease of large-scale deployment will remain limited.
[0005] Therefore, there is a need for a fruit maturity evaluation method that can retain the maturity-related biochemical information provided by Raman spectroscopy while reducing the actual detection cost and the need for damaged sampling. Summary of the Invention
[0006] This invention provides a continuous prediction method for fruit maturity based on Raman spectroscopy calibration, addressing the problems of existing visual maturity classification labels being highly subjective, failing to reflect internal biochemical states, and the high cost of direct Raman spectroscopy detection. Specifically, during the model training phase, this invention collects exterior images and corresponding internal tissue Raman spectra of selected fruit samples. A continuous maturity index with biochemical interpretability is constructed using Raman spectroscopy, and a mapping relationship is established between this index and exterior image features. After the model is established, in practical applications, it is no longer necessary to collect the internal Raman spectra of the fruit being tested, nor is it necessary to damage the fruit during sampling. Only the exterior image needs to be acquired, and the trained prediction model can output a continuous maturity score or maturity level. This method can both calibrate the model using internal spectral information and achieve rapid, low-cost, and non-destructive maturity prediction in the application phase.
[0007] The technical solution provided by this invention is a method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration, comprising the following steps:
[0008] S101, acquire appearance images of multiple fruit samples, and acquire Raman spectral data of internal tissue corresponding to the appearance images, and establish a sample correspondence between appearance images and internal tissue Raman spectral data;
[0009] S102, preprocess the Raman spectral data of internal tissues, and extract the Raman spectral characteristic values of biochemical components related to the maturation process from the preprocessed Raman spectral data of internal tissues.
[0010] S103, Construct a Raman spectral maturity index to characterize the internal biochemical maturity state based on the Raman spectral characteristic values;
[0011] S104, convert the Raman spectral maturity index into a continuous maturity index;
[0012] S105, Perform region of interest segmentation on the appearance image, and extract image features from the segmented region of interest to form an image feature vector;
[0013] S106, Using the image feature vector as input and the continuous maturity index as output, train a regression prediction model;
[0014] S107: Obtain the appearance image of the fruit to be tested, perform the same feature extraction process as in S105 on the appearance image of the fruit to be tested, and input the obtained image features into the trained regression prediction model to output the continuous maturity score of the fruit to be tested.
[0015] Furthermore, the appearance image is a fruit peel image, and the internal tissue Raman spectral data is Raman spectral data of fruit pulp, core, or other edible internal tissues; the preprocessing includes one or more of the following: baseline correction, noise reduction, Raman shift interval truncation, intensity normalization, and standardization.
[0016] Furthermore, the biochemical components include one or more of sugars, starches, pigments, organic acids, and phenolic substances; the Raman characteristic peaks or characteristic spectral segments of the biochemical components are Raman spectral characteristics that change with the fruit ripening process in terms of peak intensity, peak area, peak position, peak shape, or combination relationship; the Raman spectral characteristic values are peak height, peak area, local integrated intensity, or intensity values obtained by peak fitting.
[0017] Furthermore, the Raman spectral maturity index is the sugar / starch Raman spectral ratio R, constructed from sugar-related Raman characteristic peaks and starch-related Raman characteristic peaks.
[0018]
[0019] in, Indicates the peak intensity or peak area of sugar-related Raman characteristic peaks. This indicates the peak intensity or peak area of starch-related Raman characteristic peaks.
[0020] Furthermore, converting the Raman spectral maturity index into a continuous maturity index includes: performing a numerical transformation on the Raman spectral maturity index, and determining the lower anchor point corresponding to the early maturity sample. Anchor points corresponding to late-mature samples Perform normalization, limiting the normalization result to a preset numerical range:
[0021]
[0022]
[0023] in, R represents the natural logarithm of the current sample's sugar / starch Raman ratio. Indicates the lower anchor point The natural logarithm, Indicates the upper anchor point The natural logarithm of the continuous maturity index; When less than 0, it is recorded as 0; when A value greater than 1 is recorded as 1, so that the continuous maturity index is located in the 0-1 interval; the numerical transformation is a logarithmic transformation, a linear transformation, a standardized transformation, or a nonlinear mapping; the lower anchor point is the low quantile of the maturity index of the Raman spectrum of early-mature samples, and the upper anchor point is the high quantile of the maturity index of the Raman spectrum of late-mature samples.
[0024] Furthermore, the region of interest segmentation includes: converting the appearance image to the HSV color space, using threshold segmentation to obtain candidate regions, performing morphological filtering on the candidate regions, and selecting the largest connected region as the region of interest on the fruit surface;
[0025] The image features are used to characterize color migration, spot formation, surface texture changes, or morphological changes on the fruit surface, including one or more of color statistical features, texture statistical features, and morphological features.
[0026] Furthermore, the regression prediction model is one of the following: partial least squares regression model, random forest regression model, support vector regression model, and multilayer perceptron model. The model is determined based on the model performance and application requirements. The specific model structure, parameters, and training process are adjusted according to the data scale and deployment conditions.
[0027] Before training the regression prediction model, feature filtering is performed on the candidate image feature vectors to obtain a subset of target image features for training the regression prediction model; the feature filtering includes one or more of the following: feature importance ranking, correlation filtering, recursive feature elimination, embedded feature filtering, or feature selection based on prediction error.
[0028] Furthermore, the continuous maturity score is further mapped to a maturity level based on the maturity registration threshold, and the maturity level threshold is adjusted according to the fruit variety, origin, storage conditions, application scenario and sample distribution.
[0029] This invention also provides a continuous prediction device for the maturity of fruit appearance images based on Raman spectroscopy calibration, comprising:
[0030] The sample acquisition unit is used to acquire appearance images of multiple fruit samples and acquire Raman spectral data of internal tissues corresponding to the appearance images, and establish a sample correspondence between the appearance images and the Raman spectral data of internal tissues.
[0031] A Raman spectral index construction unit is used to preprocess Raman spectral data of internal tissues and extract Raman spectral characteristic values of biochemical components related to the maturation process from the preprocessed Raman spectral data of internal tissues; construct Raman spectral maturity index to characterize the internal biochemical maturation state based on the Raman spectral characteristic values; and convert the Raman spectral maturity index into a continuous maturity index.
[0032] The image feature extraction unit is used to segment the region of interest in the appearance image and extract image features from the segmented region of interest to form an image feature vector.
[0033] The model training unit is used to train a regression prediction model with the image feature vector as input and the continuous maturity index as output.
[0034] The maturity prediction unit is used to acquire the appearance image of the fruit to be tested, perform the same feature extraction process as the image feature extraction unit on the appearance image of the fruit to be tested, and input the obtained image features into the trained regression prediction model to output the continuous maturity score of the fruit to be tested.
[0035] This invention also provides a continuous fruit maturity prediction device based on the correlation between appearance images and internal Raman spectra, comprising a sample acquisition unit, a Raman spectral index construction unit, an image feature extraction unit, a model training unit, and a maturity prediction unit. Each unit is respectively used to perform the corresponding sample acquisition, Raman spectral maturity index construction, image feature extraction, model training, and maturity prediction steps in the aforementioned continuous fruit maturity prediction method.
[0036] The present invention also provides an electronic device comprising: a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration described in the above technical solution.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) This invention transforms the information on the changes in ripening-related biochemical components reflected by internal Raman spectroscopy into a continuous ripening index, which can provide a monitoring target with biochemical interpretability for the prediction of fruit ripeness;
[0039] (2) In the application stage, this invention only requires the collection of Raman spectra of the fruit to be tested, which can reduce the cost and complexity of internal Raman spectroscopy detection of each sample;
[0040] (3) The present invention uses continuous maturity scores as model output, which can preserve the continuous sequence and individual differences in the maturity process, and further map them to maturity levels according to actual application needs;
[0041] (4) The present invention characterizes ripening-related changes such as color migration, spot formation, texture changes and surface heterogeneity on the surface of fruit by using appearance phenotypic features, thereby improving the ability of appearance images to characterize the internal ripening state;
[0042] (5) This invention can be applied to post-harvest grading, supply chain management, non-destructive quality evaluation and processing use determination. Attached Figure Description
[0043] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0044] Figure 2 This is a data processing flowchart for the training and application phases in an embodiment of the present invention.
[0045] Figure 3 This is a Raman spectrum change diagram of banana pulp during 9 days of storage in an embodiment of the present invention.
[0046] Figure 4 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation
[0047] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Other implementation methods obtained by those skilled in the art based on the embodiments of the present invention without creative effort should all fall within the protection scope of the present invention.
[0048] The present invention provides a method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration. Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Figure 2 This diagram illustrates the data processing steps for the training and application phases. During the training phase, the method uses both fruit appearance images and internal tissue Raman spectral data simultaneously; during the application phase, it uses only the appearance images of the fruit to predict maturity.
[0049] This embodiment uses bananas as an example to illustrate a specific implementation of the method of the present invention. It should be noted that the present invention is not limited to bananas, but can also be applied to apples, tomatoes, mangoes, pears, peaches, kiwifruit, melons, and other fruits that undergo continuous changes in sugars, starches, pigments, organic acids, phenolic substances, or cell wall-related components during ripening. Similar to bananas, tomatoes, mangoes, and melons undergo changes in sugars, pigments, or cell wall-related components during ripening, which can be characterized by Raman spectroscopy. Furthermore, their peel or background color usually shows a visible migration from green to yellow, orange, or red. Therefore, it is suitable to use internal Raman ripening indices to calibrate the appearance image prediction model. The same approach can be used for apples, pears, peaches, and some kiwifruit varieties, but varieties or ripening stages with more stable background color changes should be prioritized. Although watermelons exhibit significant internal lycopene accumulation, the overall color change of their outer peel is relatively limited; therefore, it is usually advisable to combine color spots, gloss, or local texture features before implementation. Figure 1 As shown, the method includes:
[0050] S101: Acquire appearance images of multiple fruit samples and acquire Raman spectral data of internal tissues corresponding to the appearance images, and establish a sample correspondence between the appearance images and the Raman spectral data of internal tissues.
[0051] Banana samples at different ripening stages were selected, and images of the banana peel were acquired. Corresponding Raman spectra of the banana pulp were also acquired. Peel images were acquired under uniform lighting and background conditions. Pulp Raman spectra were acquired using a 785 nm excitation wavelength through point scanning.
[0052] In this embodiment, banana samples were stored naturally under indoor conditions, with continuous acquisition of peel images and Raman spectra of the fruit pulp cross-section. The specific storage temperature, humidity, camera model, Raman instrument parameters, and sampling frequency can be adjusted according to actual equipment conditions and are not intended to limit the scope of protection of this invention.
[0053] S102: Raman spectroscopy preprocessing, and extracting Raman spectral characteristic values of biochemical components related to the maturation process from the preprocessed Raman spectral data of internal tissues.
[0054] The preprocessing includes one or more of the following: baseline correction, noise reduction, Raman shift interval truncation, intensity normalization, and standardization. The internal tissue Raman spectral data are from the fruit pulp, core, or other edible internal tissues.
[0055] In this embodiment, baseline correction and intensity normalization were performed on the collected Raman spectra of the fruit pulp, retaining the values in the 400-1500 cm⁻¹ range. -1 The Raman spectra within the range were normalized using relatively stable reference peaks.
[0056] The Raman characteristic peaks or characteristic spectral segments of the biochemical components are Raman spectral characteristics that change with the fruit ripening process in terms of peak intensity, peak area, peak position, peak shape, or combination relationship; the biochemical components include one or more of sugars, starches, pigments, organic acids, and phenolic substances; wherein, the Raman spectral characteristic values are peak height, peak area, local integrated intensity, or intensity values obtained by peak fitting.
[0057] S103: Construct a Raman spectral maturity index to characterize the internal biochemical maturity state based on the Raman spectral characteristic values, that is, construct the sugar / starch Raman spectral characteristic peak ratio.
[0058] The Raman spectroscopy maturity indicators include peak intensity ratio, peak area ratio, Raman spectral intensity difference, weighted combination index, and principal component score.
[0059] During banana ripening, starch gradually degrades and soluble sugars gradually accumulate within the pulp. Correspondingly, the starch-related Raman characteristic peaks in the Raman spectrum of the pulp gradually weaken, while the sugar-related Raman characteristic peaks gradually strengthen. These sugar-related Raman characteristic peaks are located in the 1000-1110 cm⁻¹ range. -1 Within this range, the starch-related Raman characteristic peak position is 450-500 cm⁻¹. -1 Within the range; such as Figure 3 As shown, based on existing papers, it can be inferred that the peak around 1060 cm⁻¹ represents carbohydrates, 477 cm⁻¹ is the strongest peak for starch, and the remaining peaks of 860, 935, 1339, and 1457 cm⁻¹ are weak peaks for starch. During the maturation process, the starch peak weakens while the carbohydrate peak strengthens. Therefore, in this embodiment, the carbohydrate-related Raman characteristic peak can be selected at 1060 cm⁻¹. -1 Nearby peaks, starch-related Raman characteristic peaks, can be selected at 477 cm⁻¹. -1 Nearby peaks were observed, and the following sugar / starch Raman spectrum ratios were constructed:
[0060]
[0061] in, Indicates the peak intensity or peak area of sugar-related Raman characteristic peaks. This indicates the peak intensity or peak area of starch-related Raman characteristic peaks.
[0062] It should be noted that in other embodiments, the Raman spectral maturity index can be adjusted according to the fruit type, Raman spectrometer, peak position drift, and data preprocessing method; for example, Raman characteristic peaks, characteristic spectral bands, or multi-peak comprehensive indexes related to sugar, starch, pigments, organic acids, phenolic substances, or combinations thereof can be used, and are not limited to the specific peak positions mentioned above.
[0063] S104: Construct a continuous maturity index.
[0064] sugar / starch Raman spectral ratio Numerical transformation and normalization are performed to obtain the continuous maturity index (Score). The numerical transformation can be logarithmic, linear, standardized, or nonlinear. In this embodiment, [the transformation method is described in the original text]. Perform a natural logarithmic transformation and use the lower anchor point corresponding to the mature early samples. Anchor points corresponding to late-mature samples Normalize:
[0065]
[0066]
[0067] in, This represents the natural logarithm of the current sample's sugar / starch Raman ratio R. Indicates the lower anchor point The natural logarithm, Indicates the upper anchor point The natural logarithm of . When When less than 0, it is recorded as 0; when A value greater than 1 is recorded as 1, ensuring the continuous maturity index remains within the 0-1 range. The lower anchor point represents the low quantile of the Raman spectral maturity index for early-maturity samples, while the upper anchor point represents the high quantile of the Raman spectral maturity index for late-maturity samples. In this embodiment... For day 1 sample The 5th percentile, For day 9 samples The 95th percentile.
[0068] Table 1 shows the changes in the sugar / starch characteristic peak intensity ratio and maturity score of bananas during storage. A Ripeness Score closer to 0 indicates an immature state, while a score closer to 1 indicates a mature state. In this embodiment, the 5th percentile of the characteristic peak intensity ratio in the initial day 1 sample is used as the lower anchor point, and the 95th percentile of the characteristic peak intensity ratio in the final day 9 sample is used as the upper anchor point, denoted as follows: and This treatment allows the continuous ripening index to characterize the degree of transition from starch-dominated to sugar-dominated production within the banana pulp.
[0069] Table 1. Changes in sugar / starch characteristic peak intensity ratio and maturity score during banana storage.
[0070]
[0071] S105: Epidermal image processing and feature extraction.
[0072] Background removal and region of interest (ROI) segmentation are performed on banana peel images. Optionally, the image is converted to the HSV color space, and candidate regions are obtained using Otsu thresholding combined with morphological filtering. The largest connected region is selected as the ROI for the banana peel.
[0073] Image features are used to characterize color migration, spot formation, surface texture changes, or morphological changes on the surface of fruits, including one or more of color statistical features, texture statistical features, and morphological features.
[0074] In this embodiment, color and texture features are extracted within the region of interest (ROI). Color features may include the red-green-blue color space (RGB), the hue-saturation-lightness color space (HSV), the mean value of each channel in the CIELab color space, and the proportion of each color channel; texture features may include contrast, correlation, energy, homogeneity, dissimilarity, and angular second moment (ASM) based on the gray-level co-occurrence matrix (GLCM).
[0075] First, 18-dimensional candidate visual features are extracted. Then, hierarchical feature selection is performed using random forest feature importance and the elbow rule, retaining the mean hue (Mean H). The channel mean (Mean a), the proportion of the red channel (Ratio R), homogeneity, dissimilarity, and correlation are used as image feature vectors.
[0076] S106: Regression model training.
[0077] Each group of fruit appearance image feature vectors and their corresponding continuous maturity indices are used as paired modeling samples to form a modeling sample set, which is then divided into a calibration set and a prediction set. The mean and standard deviation of each candidate image feature are calculated using the calibration set, and the obtained parameters are used to perform Z-score standardization on both the calibration and prediction sets. Feature selection is performed on the standardized calibration set, and multiple candidate regression models are trained. The prediction set is then processed according to the same feature subset and standardized parameters to evaluate the model's predictive performance.
[0078] Before training the regression prediction model, candidate image features are screened to obtain a subset of target image features for training the model. Feature screening includes one or more of the following: feature importance ranking, correlation screening, recursive feature elimination, embedded feature screening, or feature selection based on prediction error. Then, the image feature vectors of the screened banana samples are paired with their corresponding continuous ripening indices to construct a training sample set.
[0079] In this embodiment, Partial Least Squares Regression (PLSR), Random Forest Regression (RF), Support Vector Regression (SVR), and Multilayer Perceptron (MLP) models are established as candidate regression models. The target regression model is determined based on the performance of the prediction set and application requirements. The specific model structure, parameters, and training process can be adjusted according to the data scale and deployment conditions.
[0080] S107: Predictive Applications.
[0081] In the application phase, images of the banana peels to be tested are collected, image feature vectors are extracted according to S105, and input into the trained regression prediction model to output a continuous maturity score of the bananas to be tested.
[0082] Furthermore, the continuous maturity score can be mapped to maturity levels according to actual grading requirements. For example, in one implementation, the 0-1 continuous maturity index can be divided into operational maturity intervals such as unripe, semi-ripe, ripe, and overripe. The maturity level threshold can be determined based on the distribution of the continuous maturity index in the calibration set, preset level labels, and actual application requirements, and can be recalibrated for fruit varieties, origins, and storage conditions.
[0083] To verify the effectiveness of the method of this invention, banana samples with different storage days were selected for the experiment. The samples covered five ripening process nodes: day 1, day 3, day 5, day 7, and day 9, with 45 samples at each node, for a total of 225 samples. Images of the banana peel and corresponding Raman spectra of the pulp were acquired for each sample, and sugar-related Raman characteristic peaks and starch-related Raman characteristic peaks were extracted according to the method described above. The intensity ratio of sugar / starch Raman spectral characteristic peaks and the continuous ripening index were constructed.
[0084] Experimental results show that the ratio of sugar to starch Raman spectral peak intensities generally increases with prolonged banana storage time. Specifically, the average sugar to starch Raman spectral ratio for day 1 samples was approximately 0.876, corresponding to an average continuous maturity index of approximately 0.086; the average sugar to starch Raman spectral ratio for day 9 samples was approximately 3.476, corresponding to an average continuous maturity index of approximately 0.932. These results indicate that the constructed Raman spectral maturity index can reflect the ripening process of banana pulp, from starch-dominated to sugar-dominated.
[0085] Furthermore, using the filtered image feature vectors as input and the continuous maturity index as output, partial least squares regression (PLSR), random forest regression (RFR), support vector regression (SVR), and multilayer perceptron (MLP) models were trained respectively. The results show that all regression models can predict the continuous maturity index determined by Raman spectroscopy based on banana peel image features. Specifically, RFR achieved an R² of 0.939 and an RMSE of 0.073 on the test set; MLP achieved an R² of 0.928 and an RMSE of 0.080 on the test set. These results indicate that there is a learnable mapping relationship between banana peel image features and Raman spectral maturity indices within the fruit pulp. The method of this invention can output continuous maturity scores related to internal biochemical maturity status based solely on external images during the application stage, thereby reducing the cost of sample-by-sample Raman detection and improving the continuity and biochemical interpretability of maturity evaluation.
[0086] like Figure 4As shown, the present invention also provides a fruit maturity continuous prediction device based on the correlation between appearance image and internal Raman spectrum, including a sample acquisition unit, a Raman spectrum index construction unit, an image feature extraction unit, a model training unit and a maturity prediction unit.
[0087] The sample acquisition unit is used to acquire appearance images of multiple fruit samples and acquire Raman spectral data of the internal tissue corresponding to the appearance images, and establish a sample correspondence between the appearance images and the internal tissue Raman spectral data.
[0088] The Raman spectroscopy index construction unit is used to preprocess the Raman spectral data of internal tissues, extract the Raman characteristic peaks or characteristic spectral segments of biochemical components related to the maturation process, construct Raman spectral maturation indexes, and convert the indexes into continuous maturation indices.
[0089] The image feature extraction unit is used to segment the region of interest in the appearance image and extract the image feature vector.
[0090] The model training unit is used to train a regression prediction model from appearance image features to a continuous maturity index.
[0091] The maturity prediction unit is used to input the image feature vector corresponding to the appearance image of the fruit to be tested during the application stage, and output a continuous maturity score or maturity level.
[0092] The specific implementation methods of each unit are the same as those of each step, and will not be described in this invention.
[0093] This invention also provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration described in the above technical solution.
[0094] This embodiment also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration in any of the above embodiments.
[0095] Without departing from the concept of this invention, those skilled in the art can make the following substitutions or modifications:
[0096] (1) The internal tissue Raman spectroscopy data can also be replaced with near-infrared spectroscopy, hyperspectral spectroscopy, fluorescence spectroscopy or multimodal spectroscopy in non-preferred alternative embodiments depending on the object being detected;
[0097] (2) The Raman spectral maturity index can be replaced by the weighted ratio of multiple maturity-related Raman characteristic peaks or characteristic spectral segments, peak area ratio, intensity difference, principal component score, multi-peak comprehensive index or Raman spectral model output score, depending on the fruit type and maturity mechanism.
[0098] (3) The appearance image features can be replaced with image features automatically extracted by deep learning networks, or manual features can be fused with deep features;
[0099] (4) Region of interest segmentation can be performed using color thresholding, cluster segmentation, GrabCut, semantic segmentation, or instance segmentation methods;
[0100] (5) The regression prediction model can be selected from linear model, tree model, kernel method model, neural network model or ensemble model according to the sample size and deployment conditions;
[0101] (6) The continuous maturity score can be output as a 0-1 score, a percentage score, a maturity risk index, a maturity days equivalent value, or other continuous maturity characteristics.
[0102] The above embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Any modifications, equivalent substitutions, or improvements made within the principles of the invention should be included within the protection scope of the invention.
Claims
1. A method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration, characterized in that: S101, acquire appearance images of multiple fruit samples, and acquire Raman spectral data of internal tissue corresponding to the appearance images, and establish a sample correspondence between appearance images and internal tissue Raman spectral data; S102, preprocess the Raman spectral data of internal tissues, and extract the Raman spectral characteristic values of biochemical components related to the maturation process from the preprocessed Raman spectral data of internal tissues. S103, Construct a Raman spectral maturity index characterizing the internal biochemical maturity state based on the Raman spectral characteristic values; S104, convert the Raman spectral maturity index into a continuous maturity index; S105, Perform region of interest segmentation on the appearance image, and extract image features from the segmented region of interest to form an image feature vector; S106, Using the image feature vector as input and the continuous maturity index as output, train the regression prediction model; S107: Obtain the appearance image of the fruit to be tested, perform the same feature extraction process as in S105 on the appearance image of the fruit to be tested, and input the obtained image features into the trained regression prediction model to output the continuous maturity score of the fruit to be tested.
2. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The appearance image is a fruit peel image, and the internal tissue Raman spectral data is Raman spectral data of fruit pulp, core, or other edible internal tissues; the preprocessing includes one or more of the following: baseline correction, noise reduction, Raman shift interval truncation, intensity normalization, and standardization.
3. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The biochemical components include one or more of sugars, starches, pigments, organic acids, and phenolic substances; the Raman characteristic peaks or characteristic spectral segments of the biochemical components are Raman spectral characteristics that change with the fruit ripening process in terms of peak intensity, peak area, peak position, peak shape, or combination relationship; the Raman spectral characteristic values are peak height, peak area, local integrated intensity, or intensity values obtained by peak fitting.
4. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The Raman spectral maturity index is the sugar / starch Raman spectral intensity ratio R, constructed from sugar-related Raman characteristic peaks and starch-related Raman characteristic peaks. ; in, Indicates the peak intensity or peak area of sugar-related Raman characteristic peaks. This indicates the peak intensity or peak area of starch-related Raman characteristic peaks.
5. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: Converting the Raman spectral maturity index into a continuous maturity index includes: performing a numerical transformation on the Raman spectral maturity index, and adjusting the index based on the lower anchor point corresponding to the early maturity sample. Anchor points corresponding to late-mature samples Perform normalization and limit the normalization result to a preset numerical range; ; ; in, R represents the natural logarithm of the current sample's sugar / starch Raman ratio. Indicates the lower anchor point The natural logarithm, Indicates the upper anchor point The natural logarithm of the continuous maturity index; When less than 0, it is recorded as 0; when A value greater than 1 is recorded as 1, so that the continuous maturity index is located in the 0-1 interval; the numerical transformation is a logarithmic transformation, a linear transformation, a standardized transformation, or a nonlinear mapping; the lower anchor point is the low quantile of the maturity index of the Raman spectrum of early-mature samples, and the upper anchor point is the high quantile of the maturity index of the Raman spectrum of late-mature samples.
6. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The region of interest segmentation involves converting the appearance image to the HSV color space, using threshold segmentation to obtain candidate regions, performing morphological filtering on the candidate regions, and selecting the largest connected region as the region of interest on the fruit surface. The image features are used to characterize color migration, spot formation, surface texture changes, or morphological changes on the fruit surface, including one or more of color features, texture features, and morphological features.
7. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The regression prediction model is one of the following: partial least squares regression model, random forest regression model, support vector regression model, and multilayer perceptron model. The model is determined based on the model performance and application requirements. The specific model structure, parameters, and training process are adjusted according to the data scale and deployment conditions. Before training the regression prediction model, feature filtering is performed on the candidate image feature vectors to obtain a subset of target image features for training the regression prediction model. The feature selection includes one or more of the following: feature importance ranking, correlation selection, recursive feature elimination, embedded feature selection, or feature selection based on prediction error.
8. The method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration according to claim 1, characterized in that: The continuous maturity score is mapped to a maturity level based on the maturity registration threshold. The maturity level threshold is adjusted according to the fruit variety, origin, storage conditions, application scenario, and sample distribution.
9. A continuous prediction device for fruit appearance image maturity based on Raman spectroscopy calibration, characterized in that: The sample acquisition unit is used to acquire appearance images of multiple fruit samples and acquire Raman spectral data of internal tissues corresponding to the appearance images, and establish a sample correspondence between the appearance images and the Raman spectral data of internal tissues. The Raman spectroscopy index construction unit is used to preprocess the Raman spectral data of internal tissues and extract the Raman spectral characteristic values of biochemical components related to the maturation process from the preprocessed Raman spectral data of internal tissues. Based on the Raman spectral characteristic values, a Raman spectral maturity index is constructed to characterize the internal biochemical maturity state; the Raman spectral maturity index is then converted into a continuous maturity index. The image feature extraction unit is used to segment the region of interest in the appearance image and extract image features from the segmented region of interest to form an image feature vector. The model training unit is used to train a regression prediction model with the image feature vector as input and the continuous maturity index as output. The maturity prediction unit is used to acquire the appearance image of the fruit to be tested, perform the same feature extraction process as the image feature extraction unit on the appearance image of the fruit to be tested, and input the obtained image features into the trained regression prediction model to output the continuous maturity score of the fruit to be tested.
10. An electronic device, characterized in that, The electronic device includes: The processor and memory, wherein the memory stores a computer program that, when executed by the processor, implements the method for continuous prediction of fruit appearance image maturity based on Raman spectroscopy calibration as described in any one of claims 1 to 8.