CN111595790A - Hyperspectral image-based green plum acidity prediction method - Google Patents

Hyperspectral image-based green plum acidity prediction method Download PDF

Info

Publication number
CN111595790A
CN111595790A CN202010480720.8A CN202010480720A CN111595790A CN 111595790 A CN111595790 A CN 111595790A CN 202010480720 A CN202010480720 A CN 202010480720A CN 111595790 A CN111595790 A CN 111595790A
Authority
CN
China
Prior art keywords
layer
green plum
encoder
hidden layer
green
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010480720.8A
Other languages
Chinese (zh)
Inventor
刘�英
沈鹭翔
倪超
刘阳
杨雨图
姜东�
汪希伟
李忠
王虹虹
唐敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Forestry University
Original Assignee
Nanjing Forestry University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Forestry University filed Critical Nanjing Forestry University
Priority to CN202010480720.8A priority Critical patent/CN111595790A/en
Publication of CN111595790A publication Critical patent/CN111595790A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/02Food
    • G01N33/025Fruits or vegetables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Food Science & Technology (AREA)
  • Artificial Intelligence (AREA)
  • Pathology (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Medicinal Chemistry (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a method for predicting the acidity of green plums based on a hyperspectral image, which comprises the following steps of: collecting a hyperspectral image of a green plum sample, and calibrating the reflectivity of the hyperspectral image; acquiring the average spectral reflectivity of each green plum sample; acquiring SSC and pH results of a green plum sample by using a traditional physicochemical detection mode, and taking the SSC and pH results as reference values during prediction model training; designing a DSAE-SPA-PLSR prediction model of a multilayer network structure based on a deep learning technology, and predicting the sugar degree value and the acidity value of the green plums; and visually representing the greengage sugar value prediction result and the acidity value prediction result. The invention provides a deep learning model based on a deep learning technology, improves the prediction precision of the sugar value and the acidity value of green plums, realizes the nondestructive detection of the green plum components, and has high detection efficiency. Meanwhile, the method can be popularized to nondestructive testing of other forest fruits, and has a wide application prospect.

Description

Hyperspectral image-based green plum acidity prediction method
Technical Field
The invention belongs to the technical field of green plum detection, and particularly relates to a method for predicting the acidity of green plums based on a hyperspectral image.
Background
The green plums are also called plum fruits and plum fruits, are one of special fruits in China, and have a planting history of more than 3000 years in China. The green plum has large fruit and small kernel, and the pulp is loved by people with the characteristics of crisp and sour taste, and the like. Besides unique taste, green plums simultaneously contain rich nutrient substances, and flesh is rich in various vitamins, trace elements, amino acids and the like, the nutrient substances ensure the normal operation of a human body, and the green plums are researched more in the medical community. The green plums are rarely eaten directly, and because a large amount of acid and amygdalin exist in the flesh, the taste is sour and bitter when the green plums are eaten directly, and the problem can be solved after the green plums are processed, so the green plums can be processed into other products, such as plum wine, plum essence and the like.
Although green plums are traditional fruits in China, the green plum industry is not regarded as important, and the green plums are represented by backward production modes and single processing varieties and are sold by using more original fruits, so that the comprehensive utilization rate of the green plums is low, and the market of the green plums is relatively flat. In recent years, in some countries with large requirements for green plums, such as japan and thailand, a large amount of green plum raw fruits are imported from China, so that the yield of green plums in China is continuously increased, the phenomenon of over supply and over demand gradually occurs, and the price of green plum products is limited. The green plum industry needs to make the transformation, changes the extensive production mode at present, increases the green plum deep-processing product, processes the green plum that the composition is different into different products, promotes the product quality, improves the added value of green plum, and then promotes peasant's income, increases the profit of enterprise.
The sugar content and acidity of green plum are important component indexes considered during deep processing of green plum, for example, green plum wine requires a green plum raw fruit with high sugar content and low acidity during processing, and green plum essence requires a green plum raw fruit with low sugar content and high acidity during processing. The contents of components in the green plums are different at different seasons, and even at the same time, the contents of components are greatly different between different fruits. During manual picking, workers can judge the component content of the green plums according to the color, picking time and other factors of the green plums by experience and classify the green plums, but the classification effect is low due to the influence of the factors such as variety, illumination, region and the experience of the workers. Because the traditional physicochemical mode is used for measuring the component content of the green plums, the green plums need to be damaged, and the detection efficiency is low, so that the requirement of actual production cannot be met. Therefore, the research on the novel nondestructive testing method for the green plum components can provide technical support for the green plum industry, improve the automation and intelligence level of green plum production and the quality of green plum products, and have important significance and practical application value.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for predicting the degree of acidity of green plums based on a hyperspectral image aiming at the defects of the prior art, and the method for predicting the degree of acidity of green plums based on the hyperspectral image is based on a deep learning technology, so that a deep learning model is provided, the prediction precision of the degree of acidity and the degree of acidity of green plums is improved, the nondestructive detection of green plum components is realized, and the detection efficiency is high.
In order to achieve the technical purpose, the technical scheme adopted by the invention is as follows:
the method for predicting the degree of glucoheptonic acid based on the hyperspectral image comprises the following steps:
(1) collecting spectral information of the green plums by utilizing a hyperspectral collection system; simultaneously collecting a dark noise spectral image of a system on the same day and a standard reflectivity calibration plate spectral image with 99% reflectivity, and respectively calibrating the reflectivity of the spectral image of the green plum;
(2) selecting a green plum part in the calibrated spectral image, and calculating the average spectral reflectivity of the green plum part to serve as green plum sample data;
(3) performing physical and chemical detection on the green plums by using a saccharimeter and a ph meter to obtain the sugar degree value and the acidity value of the green plums;
(4) constructing a DSAE-SPA-PLSR prediction model with a multilayer network structure, wherein the network structure of the DSAE-SPA-PLSR prediction model comprises a noise reduction self-encoder DAE, a sparse self-encoder SAE1, a sparse self-encoder SAE2 and a continuous projection algorithm-partial least squares regression SPA-PLSR; the input layer of the network structure of the DSAE-SPA-PLSR prediction model is the average spectral reflectivity result of a green plum part in a spectral image, the hidden layer is the hidden layer of a noise reduction self-encoder DAE, the hidden layer is the hidden layer of a sparse self-encoder SAE1, the hidden layer is the hidden layer of a sparse self-encoder SAE2, the hidden layer four is a continuous projection algorithm-partial least squares regression SPA-PLSR, and the output layer is the prediction result of a green plum sugar degree value and an acidity value;
firstly, pre-training the average spectral reflectivity of greengage in a greengage sample by using a noise reduction self-encoder DAE, transmitting the implicit layer data of the noise reduction self-encoder DAE to a sparse self-encoder SAE1 after training, training a sparse self-encoder SAE1, transmitting the implicit layer data of the sparse self-encoder SAE1 to a sparse self-encoder SAE2 after training, and training a sparse self-encoder SAE 2; after pre-training, the weights and the offsets of the noise reduction self-encoder DAE, the sparse self-encoder SAE1 and the sparse self-encoder SAE2 can be obtained, and the parameters of the DSAE-SPA-PLSR prediction model are initialized by using the weights and the offsets;
(5) training a DSAE-SPA-PLSR prediction model by using green plum sample data to obtain a trained DSAE-SPA-PLSR prediction model, inputting the average spectral reflectance in the green plum sample data into the trained DSAE-SPA-PLSR prediction model to obtain a prediction result Yp of a sugar degree value and an acidity value;
(6) comparing the prediction result Yp with the actual result Y to obtain a prediction error, and adjusting the weights and biases of a hidden layer I, a hidden layer II and a hidden layer III in the network structure according to a reverse regulation mechanism, wherein the weights and biases of a hidden layer IV are updated by self; thereby finally fitting a DSAE-SPA-PLSR prediction model close to the real situation;
(7) inputting the average spectral reflectance of the green plums needing to be subjected to sugar acidity prediction into a finally obtained DSAE-SPA-PLSR prediction model, and predicting the sugar acidity and acidity of the green plums;
(8) and visually representing the greengage sugar value prediction result and the acidity value prediction result.
As a further improved technical solution of the present invention, the formula for performing the reflectivity calibration on the spectral image of the green plum is as follows:
Figure BDA0002517276860000031
wherein A is0The spectral reflectance data of the green plum after black and white calibration, A is the original data of the green plum spectrum, ADFor dark field spectral reflectance data, AwSpectral data for the 99% reflectance panel.
As a further improved technical solution of the present invention, the step (2) specifically comprises:
performing data extraction on the calibrated hyperspectral image of the green plum, manually selecting the green plum part in the image by using an ENVI5.3 software ROI tool, calculating the average spectral reflectivity of the green plum part, and taking the average spectral reflectivity as a reflectivity result of the image, wherein the specific calculation mode is as follows:
Figure BDA0002517276860000032
wherein, XoFor average spectral reflectance, XiThe spectral reflectivity of the ith pixel point is shown, and n is the total number of the pixel points.
As a further improved technical solution of the present invention, the weight and offset adjustment formula in step (6) is respectively:
Figure BDA0002517276860000033
Figure BDA0002517276860000034
wherein Δ WiIs the adjustment amount of the ith layer weight, Δ BiIs the adjustment amount of the i-th layer offset, E is the deviation of the output result from the actual result, WiWeight passed to i +1 th layer for i-th layer, BiFor the bias passed from layer i to layer i +1, XiInput to the ith layer, η is gradient descent scale factor;
weight and offset adjustment formula of hidden layer onei+1Comprises the following steps:
i+1i+2Wi+1f′(WiXi+Bi);
weight and offset adjustment formula for hidden layer two and hidden layer threei+1All are as follows:
Figure BDA0002517276860000035
where β is the weight of the sparsity penalty factor, ρ is the sparsity parameter,
Figure BDA0002517276860000036
mean activation of hidden layer neurons;
of the output layer5The calculation formula is as follows:
5=-(Yp-Y)f′(W4X4+B4);
wherein: f' (W)4X4+B4)=1;
For hidden layer one, hidden layer two and hidden layer three, there are:
f′(WiXi+Bi)=(WiXi+Bi)(1-(WiXi+Bi))。
the invention has the beneficial effects that: the method breaks through the limitation of the traditional method, integrates the deep learning technology, and establishes a greengage acidity prediction model based on a noise reduction self-encoder (DAE) and a sparse self-encoder (SAE): DSAE-SPA-PLSR. Compared with the traditional prediction model, the DSAE-SPA-PLSR model is used for predicting the glucoheptonate degree, and the prediction effect is better. The nondestructive detection of the green plum components is realized, and the detection efficiency is high.
Drawings
FIG. 1 is a hyperspectral image of a part of green plums in a green plum sample.
Fig. 2 is a graph of the average spectral reflectance of a green plum sample.
FIG. 3 is a hyperspectral image of a certain green plum in a green plum sample.
FIG. 4 is a graph of the average spectral reflectance of a certain green plum in a green plum sample.
Fig. 5 is a visual representation of the predicted result of the brix value of green plums.
FIG. 6 is a visual representation of the acidity value prediction results of greengage.
FIG. 7 is a diagram of a DSAE-SPA-PLSR prediction model.
Detailed Description
Embodiments of the invention are further illustrated below with reference to figures 1-7:
the embodiment provides a method for predicting the degree of greengage acidity based on a hyperspectral image, which comprises the following steps:
step 1, purchasing a green plum sample, placing the green plum sample in a refrigerator, and refrigerating at constant temperature of 4 ℃. Before each experiment, the green plum sample is taken out and placed in the environment temperature, and the subsequent spectral data acquisition and physical and chemical tests are carried out when the temperature of the green plum sample is the same as the room temperature.
And 2, collecting the spectral information of the green plum sample by using the built hyperspectral collection system, opening the hyperspectral collection system for preheating before testing, and placing the measured green plum sample on a conveying table for data collection after the system environment is stable. And obtaining the hyperspectral image of the green plums. As shown in fig. 1:
simultaneously, acquiring a dark noise spectrum image of a system on the same day and a standard reflectivity calibration board spectrum image with 99% reflectivity, and respectively calibrating the reflectivity of the spectrum image of the green plum sample to eliminate the influence of non-uniformity of a light source and dark noise of a camera on the spectrum image, wherein the calculation formula is as follows:
Figure BDA0002517276860000041
wherein A is0The spectral reflectance data of the green plum after black and white calibration, A is the original data of the green plum spectrum, ADFor dark field spectral reflectance data, AWSpectral data for the 99% reflectance panel.
And 3, selecting a green plum part in the calibrated hyperspectral image of the green plum, and calculating the average spectral reflectivity of the green plum part to serve as green plum sample data.
The method specifically comprises the following steps:
performing data extraction on the calibrated hyperspectral image of the green plum, manually selecting the green plum part in the image by using an ENVI5.3 software ROI (region of interest) tool, and calculating the average spectral reflectivity of the green plum part as a reflectivity result of the image, wherein the specific calculation mode is as follows:
Figure BDA0002517276860000051
wherein, XoFor average spectral reflectance, XiThe spectral reflectivity of the ith pixel point is shown, and n is the total number of the pixel points.
In this embodiment, spectral information of a plurality of green plums is collected, and average spectral reflectances of the green plums are respectively calculated as green plum sample data, and spectral characteristic curves (i.e., average spectral reflectance curves) of all green plum samples are shown in fig. 2.
And 4, performing physical and chemical detection on the green plums by using a glucometer and a ph meter to obtain the sugar degree value and the acidity value of the green plums.
Step 5, building a DSAE-SPA-PLSR prediction model with a multilayer network structure, wherein the network structure of the DSAE-SPA-PLSR prediction model comprises a noise reduction self-encoder DAE, a sparse self-encoder SAE1, a sparse self-encoder SAE2 and a continuous projection algorithm-partial least squares regression SPA-PLSR; the method comprises the steps of building a network model DSAE-SPA-PLSR which comprises an input layer, four hidden layers and an output layer, wherein the input layer is an average spectral reflectivity result of a green plum part in a spectral image, the dimension of the input layer is 119, the hidden layer is a hidden layer of a noise reduction self-encoder DAE, the number of neurons is 119, the hidden layer is a hidden layer of a sparse self-encoder 1, the number of the neurons is 90, the hidden layer is a hidden layer of a sparse self-encoder SAE2, the number of the neurons is 55, a continuous projection algorithm-partial least squares regression SPA-SAE R is arranged on the fourth hidden layer, and the output layer is a prediction result of the green plum value and the acidity value. Wherein the calculation result of SPA-PLSR is directly transmitted to the output layer of DSAE-SPA-PLSR.
Firstly, pre-training the average spectral reflectivity of greengage in a greengage sample by using a noise reduction self-encoder DAE, transmitting the implicit layer data of the noise reduction self-encoder DAE to a sparse self-encoder SAE1 after training, training a sparse self-encoder SAE1, transmitting the implicit layer data of the sparse self-encoder SAE1 to a sparse self-encoder SAE2 after training, and training a sparse self-encoder SAE 2; after pre-training, the weights and the offsets of the noise reduction self-encoder DAE, the sparse self-encoder SAE1 and the sparse self-encoder SAE2 can be obtained, and the parameters of the DSAE-SPA-PLSR prediction model are initialized by the weights and the offsets.
And 6, training a DSAE-SPA-PLSR prediction model by using green plum sample data to obtain a trained DSAE-SPA-PLSR prediction model, and inputting the average spectral reflectivity of the green plum sample to be detected into the trained DSAE-SPA-PLSR prediction model to obtain a prediction result Yp of the sugar degree value and the acidity value.
For example, the average spectral reflectance of a certain green plum sample in fig. 3 is fig. 4. The prediction result of the DSAE-SPA-PLSR prediction model is as follows: saccharinity value (i.e. SSC): 9.145, respectively; acidity value (i.e., pH): 2.562. the practical result is: the sugar degree value is: 9.6; acidity value: 2.73. where the SSC units are: % Brix.
And 7, adding a feedback link in order to improve the prediction precision of the model. Comparing the prediction result Yp with the actual result Y to obtain a prediction error, and adjusting the weights and biases of a hidden layer I, a hidden layer II and a hidden layer III in the network structure according to a reverse regulation mechanism; the weight and the bias calculated by the SPA-PLSR of the hidden layer four are updated by the SPA-PLSR per se during each training; so as to finally fit a DSAE-SPA-PLSR prediction model close to the real situation.
And 8, calculating the average spectral reflectivity of the green plums to be predicted according to the methods from the step 1 to the step 3, inputting the average spectral reflectivity into the finally obtained DSAE-SPA-PLSR prediction model, and predicting the sugar degree value and the acidity value of the green plums.
For example, if the average spectral reflectance curve of the green plum sample of fig. 3 is input into the DSAE-SPA-PLSR prediction model obtained finally, the prediction results of the sugar value and the acidity value are obtained, and the prediction results at this time are: the sugar degree value is: 9.512, respectively; acidity value: 2.628. it can be seen that this value is closer to the actual result.
And 9, visually representing the greengage sugar degree value prediction result and the acidity value prediction result. As shown in fig. 5 and 6.
In this embodiment, the hyperspectral collection system in step 2 is a direct way to obtain the spectral data of the green plum sample, so the performance of the system directly affects the reliability of the data. In order to ensure the reliability of data, the adopted hyperspectral imaging system consists of a hyperspectral camera, a light source, a transmission platform, a computer and the like, wherein the hyperspectral camera is a Gaiafield-V10E-AZ4 visible near-infrared hyperspectral camera.
The purpose of this embodiment is to predict the sugar degree and acidity value of green plums, so it is necessary to accurately obtain the sugar degree and acidity value of green plums, and a solid foundation is laid for the subsequent research. In this example, the soluble solid content is used to represent the sugar value, and the pH is used to represent the acidity value. The Content of Soluble Solids (SSC) is a common technical parameter in the food industry, and refers to a general term of all compounds dissolved in water in liquid or fluid food, and mainly refers to Soluble sugars, including monosaccharide, disaccharide, polysaccharide and the like, so that the Content of Soluble Solids in green plums can be measured and used for representing the sugar Content of green plums. In this example, the sugar content was measured in step 4 using a hand-held sugar meter of PAL-1 type.
In order to further improve the feature extraction capability of the model, the embodiment aims at the problems of green plum SSC and pH prediction, and designs a new prediction model DSAE-SPA-PLSR as described in step 5, which is specifically shown in FIG. 7.
Firstly, a three-layer structure of a noise reduction self-encoder DAE, a sparse self-encoder SAE1 and a sparse self-encoder SAE2 is established, and the spectral characteristic curve (namely the average spectral reflectivity result) of the green plum is pre-trained. And (4) taking the spectral characteristic curve obtained in the step (3) as an input of the model, wherein the input data dimension is 119.
The input data X first pass through a first layer of noise-reducing self-encoder DAE, the purpose of which is to reconstruct the original data. The input layer dimension and the output layer dimension of the noise reduction self-encoder are both set to be 119, and the hidden layer dimension is both set to be 119. And setting a dropout rule by the input layer, and enabling weights of some nodes of the hidden layer to not work so as to realize random noise adding damage of the original data. The DAE is trained to derive weights w1 and offsets b1, while the hidden layer data Y1 is obtained as input for the next layer.
Y1 is transmitted to a two-layer sparse self-encoder (SAE1, SAE2) structure as input data, the input layer and output layer dimensions of SAE1 are respectively 119, the hidden layer dimension is 90, the sparsity parameter is 0.01, the input layer and output layer dimensions of SAE2 are respectively 90, the hidden layer dimension is 55, the sparsity parameter is 0.01, meanwhile, the hidden layer of each SAE is transmitted to the next layer as output, two SAEs are trained, and weight w2, weight w3, bias b2 and bias b3 are obtained. And passes the output Y3 of SAE2 to the next layer.
Data Y3 obtained by structure training of two layers of SAEs (SAE1, SAE2) is used as input and is transmitted to an SPA-PLSR (continuous projection algorithm-partial least squares regression), and dimension reduction is further carried out on 55-dimensional data obtained by the former structure through a continuous projection algorithm (SPA), so that data complexity is reduced, a model is simplified, and speed is increased. In the embodiment, the characteristic wave band extraction is carried out on the green plum sample through SPA to obtain 21 characteristic wave bands, characteristic wave band data obtained through SPA are extracted, Partial Least Squares Regression (PLSR) is used for training to obtain weight w4 and bias b4, and meanwhile, the SSC and pH prediction result Yp is obtained. In the DSAE-SPA-PLSR prediction model, the correlation coefficient of the training set is 0.93 and the root mean square error is 0.61 in SSC prediction. On pH prediction, the training set correlation coefficient was 0.71 and the root mean square error was 0.11.
In order to improve the prediction accuracy of the model, a supervised fine-turning mechanism is introduced. A multi-layer network structure DSAE-SPA-PLSR is established, an input layer of DAE is used as an input layer of the DSAE-SPA-PLSR, an implied layer of DAE is used as an implied layer I of the DSAE-SPA-PLSR, an implied layer of SAE1 is used as an implied layer II of the DSAE-SPA-PLSR, an implied layer of SAE2 is used as an implied layer III of the DSAE-SPA-PLSR, and SAE1 and SAE2 retain original sparse limits. The SPA-PLSR is taken as the hidden layer four of the DSAE-SPA-PLSR, and the hidden layer one, the hidden layer two, the hidden layer three and the hidden layer four retain the weights and biases of the original DAE, SAE1, SAE2 and SPA-PLSR, namely w1, w2, w3, w4, b1, b2, b3 and b 4. And comparing the predicted result Yp with the actual result Y to obtain a prediction error, and adjusting w1, w2, w3, b1, b2 and b3 in the network according to a reverse regulation mechanism. The weight w4 and the offset b4 obtained by the SPA-PLSR are updated by the SPA-PLSR itself.
The update principle of weights and biases is based on the back propagation principle, and therefore:
Figure BDA0002517276860000071
Figure BDA0002517276860000072
wherein Δ WiIs the adjustment amount of the ith layer weight, Δ BiE is the deviation of the output result from the actual result (i.e., the error between the predicted result Yp and the actual result Y), and W is the adjustment amount of the i-th layer offsetiWeight passed to i +1 th layer for i-th layer, BiFor the bias passed from layer i to layer i +1, XiWhich is the input to the ith layer, η is the gradient descent scaling factor,i+1the calculation formula of (2) is as follows:
i+1i+2Wi+1f′(WiXi+Bi);
in which the output layer is5The calculation formula is as follows:
5=-(Yp-Y)f′(W4X4+B4);
since the results of SPA-PLSR are directly transferred to the output layer and the activation function is equivalent to Y ═ X, it can be seen that:
f′(W4X4+B4)=1。
the activation functions of DAE, SAE1, SAE2 (i.e. hidden layer one, hidden layer two, hidden layer three) are Sigmod functions, so for DAE, SAE1, SAE 2:
f′(WiXi+Bi)=(WiXi+Bi)(1-(WiXi+Bi))。
in addition, SAE1 and SAE2 (namely hidden layer two and hidden layer three) add penalty terms on the cost function, so that the penalty terms need to be addedi+1The updating is as follows:
Figure BDA0002517276860000081
where β is the weight of the sparsity penalty factor, ρ is the sparsity parameter,
Figure BDA0002517276860000082
mean activation of hidden layer neurons.
The forecasting model of the DSAE-SPA-PLSR with the added super fine-turning is trained, the forecasting effect is improved, at the moment, the relevant coefficient of the training set of the DSAE-SPA-PLSR forecasting model is 0.95 and the root mean square error is 0.57 in SSC forecasting. On pH prediction, the training set correlation coefficient was 0.74 and the root mean square error was 0.09.
The method of the embodiment breaks through the limitation of the traditional method, integrates a deep learning technology, and establishes a greengage acidity prediction model based on a noise reduction self-encoder (DAE) and a sparse self-encoder (SAE): DSAE-SPA-PLSR. Compared with the traditional prediction model, the DSAE-SPA-PLSR model is used for predicting the glucoheptonate degree, and the prediction effect is better.
The scope of the present invention includes, but is not limited to, the above embodiments, and the present invention is defined by the appended claims, and any alterations, modifications, and improvements that may occur to those skilled in the art are all within the scope of the present invention.

Claims (4)

1. The method for predicting the degree of glucoheptonic acid based on the hyperspectral image is characterized by comprising the following steps of: the method comprises the following steps:
(1) collecting spectral information of the green plums by utilizing a hyperspectral collection system; simultaneously collecting a dark noise spectral image of a system on the same day and a standard reflectivity calibration plate spectral image with 99% reflectivity, and respectively calibrating the reflectivity of the spectral image of the green plum;
(2) selecting a green plum part in the calibrated spectral image, and calculating the average spectral reflectivity of the green plum part to serve as green plum sample data;
(3) performing physical and chemical detection on the green plums by using a saccharimeter and a ph meter to obtain the sugar degree value and the acidity value of the green plums;
(4) constructing a DSAE-SPA-PLSR prediction model with a multilayer network structure, wherein the network structure of the DSAE-SPA-PLSR prediction model comprises a noise reduction self-encoder DAE, a sparse self-encoder SAE1, a sparse self-encoder SAE2 and a continuous projection algorithm-partial least squares regression SPA-PLSR; the input layer of the network structure of the DSAE-SPA-PLSR prediction model is the average spectral reflectivity result of a green plum part in a spectral image, the hidden layer is the hidden layer of a noise reduction self-encoder DAE, the hidden layer is the hidden layer of a sparse self-encoder SAE1, the hidden layer is the hidden layer of a sparse self-encoder SAE2, the hidden layer four is a continuous projection algorithm-partial least squares regression SPA-PLSR, and the output layer is the prediction result of a green plum sugar degree value and an acidity value;
firstly, pre-training the average spectral reflectivity of greengage in a greengage sample by using a noise reduction self-encoder DAE, transmitting the implicit layer data of the noise reduction self-encoder DAE to a sparse self-encoder SAE1 after training, training a sparse self-encoder SAE1, transmitting the implicit layer data of the sparse self-encoder SAE1 to a sparse self-encoder SAE2 after training, and training a sparse self-encoder SAE 2; after pre-training, the weights and the offsets of the noise reduction self-encoder DAE, the sparse self-encoder SAE1 and the sparse self-encoder SAE2 can be obtained, and the parameters of the DSAE-SPA-PLSR prediction model are initialized by using the weights and the offsets;
(5) training a DSAE-SPA-PLSR prediction model by using green plum sample data to obtain a trained DSAE-SPA-PLSR prediction model, inputting the average spectral reflectance in the green plum sample data into the trained DSAE-SPA-PLSR prediction model to obtain a prediction result Yp of a sugar degree value and an acidity value;
(6) comparing the prediction result Yp with the actual result Y to obtain a prediction error, and adjusting the weights and biases of a hidden layer I, a hidden layer II and a hidden layer III in the network structure according to a reverse regulation mechanism, wherein the weights and biases of a hidden layer IV are updated by self; thereby finally fitting a DSAE-SPA-PLSR prediction model close to the real situation;
(7) inputting the average spectral reflectance of the green plums needing to be subjected to sugar acidity prediction into a finally obtained DSAE-SPA-PLSR prediction model, and predicting the sugar acidity and acidity of the green plums;
(8) and visually representing the greengage sugar value prediction result and the acidity value prediction result.
2. The method for predicting the degree of glucoheptonic acid based on the hyperspectral image as claimed in claim 1, wherein: the formula for calibrating the reflectivity of the spectral image of the green plum is as follows:
Figure FDA0002517276850000011
wherein A is0The spectral reflectance data of the green plum after black and white calibration, A is the original data of the green plum spectrum, ADFor dark field spectral reflectance data, AWSpectral data for the 99% reflectance panel.
3. The method for predicting the degree of glucoheptonic acid based on the hyperspectral image as claimed in claim 1, wherein: the step (2) specifically comprises the following steps:
performing data extraction on the calibrated hyperspectral image of the green plum, manually selecting the green plum part in the image by using an ENVI5.3 software ROI tool, calculating the average spectral reflectivity of the green plum part, and taking the average spectral reflectivity as a reflectivity result of the image, wherein the specific calculation mode is as follows:
Figure FDA0002517276850000021
wherein, XoFor average spectral reflectance, XiThe spectral reflectivity of the ith pixel point is shown, and n is the total number of the pixel points.
4. The method for predicting the degree of glucoheptonic acid based on the hyperspectral image as claimed in claim 1, wherein: the weight and offset adjustment formula in the step (6) is respectively as follows:
Figure FDA0002517276850000022
Figure FDA0002517276850000023
wherein Δ WiIs the adjustment amount of the ith layer weight, Δ BiIs the adjustment amount of the i-th layer offset, E is the deviation of the output result from the actual result, WiWeight passed to i +1 th layer for i-th layer, BiFor the bias passed from layer i to layer i +1, XiInput to the ith layer, η is gradient descent scale factor;
weight and offset adjustment formula of hidden layer onei+1Comprises the following steps:
i+1i+2Wi+1f′(WiXi+Bi);
weight and offset adjustment formula for hidden layer two and hidden layer threei+1All are as follows:
Figure FDA0002517276850000024
where β is the weight of the sparsity penalty factor, ρ is the sparsity parameter,
Figure FDA0002517276850000025
mean activation of hidden layer neurons;
of the output layer5The calculation formula is as follows:
5=-(Yp-Y)f′(W4X4+B4);
wherein: f' (W)4X4+B4)=1;
For hidden layer one, hidden layer two and hidden layer three, there are:
f′(WiXi+Bi)=(WiXi+Bi)(1-(WiXi+Bi))。
CN202010480720.8A 2020-05-30 2020-05-30 Hyperspectral image-based green plum acidity prediction method Pending CN111595790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010480720.8A CN111595790A (en) 2020-05-30 2020-05-30 Hyperspectral image-based green plum acidity prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010480720.8A CN111595790A (en) 2020-05-30 2020-05-30 Hyperspectral image-based green plum acidity prediction method

Publications (1)

Publication Number Publication Date
CN111595790A true CN111595790A (en) 2020-08-28

Family

ID=72187959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010480720.8A Pending CN111595790A (en) 2020-05-30 2020-05-30 Hyperspectral image-based green plum acidity prediction method

Country Status (1)

Country Link
CN (1) CN111595790A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112964719A (en) * 2021-04-26 2021-06-15 山东深蓝智谱数字科技有限公司 Hyperspectrum-based food fructose detection method and device
CN113670837A (en) * 2021-08-02 2021-11-19 华南农业大学 Method for detecting total sugar content in longan pulp based on hyperspectrum and deep learning
CN114235720A (en) * 2021-12-15 2022-03-25 杭州电子科技大学 Portable nondestructive test device for sugar acidity of waxberry fruits
CN115015180A (en) * 2022-07-20 2022-09-06 浙江理工大学 Fruit sugar degree nondestructive testing method based on spectral reflectivity reconstruction technology

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105163121A (en) * 2015-08-24 2015-12-16 西安电子科技大学 Large-compression-ratio satellite remote sensing image compression method based on deep self-encoding network
CN105866042A (en) * 2016-04-27 2016-08-17 南京林业大学 Detection method for spatial distribution of biological quality indexes based on pixel index unbiased estimation method
CN105954205A (en) * 2016-04-27 2016-09-21 南京林业大学 Spectral imaging-based green plum sugar content and acidity fast non-destructive detection device
CN107292885A (en) * 2017-08-08 2017-10-24 广东工业大学 A kind of product defects classifying identification method and device based on autocoder
US20190096049A1 (en) * 2017-09-27 2019-03-28 Korea Advanced Institute Of Science And Technology Method and Apparatus for Reconstructing Hyperspectral Image Using Artificial Intelligence
CN109783739A (en) * 2019-01-23 2019-05-21 北京工业大学 A kind of collaborative filtering recommending method based on the sparse noise reduction self-encoding encoder enhancing of stacking
CN111177911A (en) * 2019-12-24 2020-05-19 大连理工大学 Part surface roughness online prediction method based on SDAE-DBN algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105163121A (en) * 2015-08-24 2015-12-16 西安电子科技大学 Large-compression-ratio satellite remote sensing image compression method based on deep self-encoding network
CN105866042A (en) * 2016-04-27 2016-08-17 南京林业大学 Detection method for spatial distribution of biological quality indexes based on pixel index unbiased estimation method
CN105954205A (en) * 2016-04-27 2016-09-21 南京林业大学 Spectral imaging-based green plum sugar content and acidity fast non-destructive detection device
CN107292885A (en) * 2017-08-08 2017-10-24 广东工业大学 A kind of product defects classifying identification method and device based on autocoder
US20190096049A1 (en) * 2017-09-27 2019-03-28 Korea Advanced Institute Of Science And Technology Method and Apparatus for Reconstructing Hyperspectral Image Using Artificial Intelligence
CN109783739A (en) * 2019-01-23 2019-05-21 北京工业大学 A kind of collaborative filtering recommending method based on the sparse noise reduction self-encoding encoder enhancing of stacking
CN111177911A (en) * 2019-12-24 2020-05-19 大连理工大学 Part surface roughness online prediction method based on SDAE-DBN algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LUXIANG SHEN 等: "Prediction of Soluble Solids Content in Green Plum by Using a Sparse Autoencoder", 《APPL. SCI.》 *
佘玉梅 段鹏 编著: "《人工智能原理及应用》", 31 December 2018, 上海交通大学出版社 *
贾文娟等: "自编码器理论与方法综述", 《计算机系统应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112964719A (en) * 2021-04-26 2021-06-15 山东深蓝智谱数字科技有限公司 Hyperspectrum-based food fructose detection method and device
CN113670837A (en) * 2021-08-02 2021-11-19 华南农业大学 Method for detecting total sugar content in longan pulp based on hyperspectrum and deep learning
CN114235720A (en) * 2021-12-15 2022-03-25 杭州电子科技大学 Portable nondestructive test device for sugar acidity of waxberry fruits
CN115015180A (en) * 2022-07-20 2022-09-06 浙江理工大学 Fruit sugar degree nondestructive testing method based on spectral reflectivity reconstruction technology
CN115015180B (en) * 2022-07-20 2024-05-21 浙江理工大学 Fruit sugar degree nondestructive testing method based on spectral reflectance reconstruction technology

Similar Documents

Publication Publication Date Title
CN111595790A (en) Hyperspectral image-based green plum acidity prediction method
CN102495005B (en) Method for diagnosing crop water deficit through hyperspectral image technology
CN111968080B (en) Method for detecting quality of inside and outside of Feicheng peaches based on hyperspectral and deep learning
Huang et al. Rapid detection of the reducing sugar and amino acid nitrogen contents of Daqu based on hyperspectral imaging
An et al. Advances in infrared spectroscopy and hyperspectral imaging combined with artificial intelligence for the detection of cereals quality
CN102788752A (en) Non-destructive detection device and method of internal information of crops based on spectrum technology
Pang et al. Hyperspectral imaging coupled with multivariate methods for seed vitality estimation and forecast for Quercus variabilis
CN108169165B (en) Maltose mixture quantitative analysis method based on terahertz spectrum and image information fusion
Mu et al. Non‐destructive detection of blueberry skin pigments and intrinsic fruit qualities based on deep learning
Wang et al. Development of near‐infrared online grading device for long jujube
CN110308111B (en) Method for rapidly predicting time for smoldering yellow tea by using near infrared spectrum technology
Xu et al. Non‐destructive prediction of total soluble solids and titratable acidity in Kyoho grape using hyperspectral imaging and deep learning algorithm
Huang et al. Analysis of the spectral and textural features of hyperspectral images for the nondestructive prediction of amylopectin and amylose contents of sorghum
Yang et al. A recognition method of corn varieties based on spectral technology and deep learning model
Tian et al. Detection of mango soluble solid content using hyperspectral imaging technology
Wang et al. Determination of polysaccharide content in shiitake mushroom beverage by NIR spectroscopy combined with machine learning: A comparative analysis
Li et al. Assessment of multiregion local models for detection of SSC of whole peach (Amygdalus persica L.) by combining both hyperspectral imaging and wavelength optimization methods
CN110132865B (en) Method for establishing Vis-NIR spectral depth characteristic model based on SAE-LSSVR crop cadmium content
CN108535250A (en) ' Fuji ' ripe apples degree lossless detection method based on Streif indexes
Gao et al. Comparative analysis of non-destructive prediction model of soluble solids content for malus micromalus makino based on near-infrared spectroscopy
Yu et al. Nondestructive testing of external defects on Nanguo pear
Zhou et al. Hyperspectral imaging technology for detection of moisture content of tomato leaves
Zhou et al. Germination prediction of sugar beet seeds based on HSI and SVM-RBF
Fei et al. The rapid non-destructive detection of the protein and fat contents of sorghum based on hyperspectral imaging
Zhang et al. Hyperspectral detection of walnut protein contents based on improved whale optimized algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200828

RJ01 Rejection of invention patent application after publication