CN115684074B - Pear quality prediction method based on visible near infrared spectrum and migration learning - Google Patents

Pear quality prediction method based on visible near infrared spectrum and migration learning Download PDF

Info

Publication number
CN115684074B
CN115684074B CN202211225769.4A CN202211225769A CN115684074B CN 115684074 B CN115684074 B CN 115684074B CN 202211225769 A CN202211225769 A CN 202211225769A CN 115684074 B CN115684074 B CN 115684074B
Authority
CN
China
Prior art keywords
spectrum
pear
near infrared
layer
training
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.)
Active
Application number
CN202211225769.4A
Other languages
Chinese (zh)
Other versions
CN115684074A (en
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.)
Northeast Forestry University
Original Assignee
Northeast 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 Northeast Forestry University filed Critical Northeast Forestry University
Priority to CN202211225769.4A priority Critical patent/CN115684074B/en
Publication of CN115684074A publication Critical patent/CN115684074A/en
Application granted granted Critical
Publication of CN115684074B publication Critical patent/CN115684074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention provides a pear quality prediction method based on visible near infrared spectrum and transfer learning. For the same sample, if a high-accuracy visible/near infrared spectrum model aiming at a first component of the sample is known, when the second component of the sample is predicted, the number of network layers is not required to be changed, the real value corresponding to the first component is replaced by the real value of the second component, and model training is performed again to obtain a model which is a universality visible/near infrared spectrum model aiming at the second component.

Description

Pear quality prediction method based on visible near infrared spectrum and migration learning
Technical Field
The invention belongs to the technical field of visible/near infrared spectrum analysis, and particularly relates to a pear quality prediction method based on visible/near infrared spectrum and migration learning.
Background
Pear is a commercial fruit that is popular and welcomed by consumers worldwide. China is the largest pear-growing country and accounts for over 60% of the world's yield. Post-harvest quality of fruits depends primarily on the fruit maturity and post-harvest internal quality parameters. The soluble solids content (Soluble solids content, SSC), hardness and moisture content are the most important internal quality indicators of the pear, directly determining the unique taste of the pear and the desire of consumers to purchase. Conventional methods of measuring SSC, water content and hardness, while relatively accurate measurements can be obtained, are mostly destructive. For example, hardness is measured by penetration of pear pulp with a durometer. Therefore, the nondestructive prediction of the main internal quality (SSC, water content and hardness) in the ripening process of pears is of great importance for guiding production, harvesting and orchard management.
The visible/near infrared spectrum can reflect the internal and external physical characteristics and chemical components of agricultural products more comprehensively, so that the method has become an important detection technology in the field of nondestructive detection of the quality of agricultural products at home and abroad. Although research has been widely conducted on detecting internal quality of fruits, such as sugar degree, hardness and water content, by using visible/near infrared spectrum technology, there is often a problem that accurate modeling is difficult due to insufficient data in an actual industrial production process. The traditional modeling method is based on classical machine learning methods such as partial least squares, support vector machines, K-nearest neighbor algorithms, etc. However, the above machine learning method has the problem of limited feature extraction capability, and when different qualities of the prediction samples are faced, different models are often required to be established, so that modeling efficiency is reduced.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and provides a pear quality prediction method based on visible near infrared spectrum and transfer learning. According to the method, the model for predicting the pear sugar content is migrated to the predicted hardness value, and the prediction accuracy is ensured under the condition that the training set sample is less.
The invention is realized by the following technical scheme, and provides a pear quality prediction method based on visible near infrared spectrum and transfer learning, which specifically comprises the following steps:
Collecting a spectrum: taking intact pears as samples, and collecting visible near infrared spectrums of the samples near the equator of each pear fruit by adopting a visible near infrared spectrometer;
data preprocessing: preprocessing the visible near infrared spectrum of the pear by adopting a multielement scattering correction method to eliminate spectrum difference caused by different scattering levels, so that the correlation between the spectrum and data is enhanced;
sample division: the Kennard-Stone method was selected to 3:1 dividing the preprocessed spectrum data into a training set and a testing set;
Measuring quality: cutting a piece of pulp at the equator of the pear sample, extruding the juice, dripping the juice into a prism groove of a PR101 alpha glycosylometer, recording the glycosyl value at the position, and taking the average value of the two points as a glycosyl parameter for measuring the pear sample; measuring the hardness of pulp by using a fruit hardness meter at the position for measuring the sugar degree, and taking the hardness as a hardness parameter for measuring the pear sample;
building a VGG pre-training network model: after the training set is input, firstly, a convolution layer is passed through, each convolution layer uses a linear rectification function as an activation function, a layer of maximum pooling layer is added after each two convolution layers to keep main characteristics, a layer of flat is connected with the last maximum pooling layer and the full connection layer, and the last output layer of the network is set as a node which represents a prediction result of outputting each piece of sugar degree information;
Building a migration model: freezing all the front layers of the pre-training network model, training parameters of the last full-connection layer, inputting the preprocessed spectrum data into the VGG pre-training network model, training the full-connection layer by using an Adam optimizer to obtain a migration model after fine adjustment, and predicting the hardness data of pears by the migration model.
Further, the spectrum acquisition conditions are: the spectrum collection range is 200.22-1024.85 nm, the collection wave bands are 1936, and the spectrum resolution is 0.38nm.
Further, the total number of samples is 100, the number of training sets is 75, and the number of test sets is 25.
Further, the thickness of the pulp is 3-5 mm.
Further, the fruit durometer is of GY-4 type with a indenter diameter of 11 mm.
Further, the mean square error is used as a loss function of the output layer.
The beneficial effects of the invention are as follows:
According to the pear quality prediction method based on visible near infrared spectrum and transfer learning, for the same sample, if a high-accuracy visible near infrared spectrum model aiming at a first component of the sample is known, when the second component of the sample is predicted, the number of network layers is not required to be changed, only the real value corresponding to the first component is replaced by the real value of the second component, and the model obtained by model training is the universality visible near infrared spectrum model aiming at the second component.
Drawings
FIG. 1 is a schematic diagram of a VGG pre-training network model;
Fig. 2 is a general frame diagram of a pear quality prediction method based on visible near infrared spectrum and transfer learning according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the problems in the prior art, the invention introduces a migration learning idea, the migration learning can effectively utilize source domain data to assist target domain data to carry out modeling, and old process data of similar source domains are utilized to improve the modeling efficiency and the quality prediction precision of the target domain data. For the same sample, if a high-accuracy visible/near infrared spectrum model aiming at a first component (such as sugar degree) of the sample is known, when a second component (such as hardness) of the sample is predicted, the number of network layers is not required to be changed, the corresponding real value of the first component is only required to be replaced by the real value of the second component, and the model is obtained by model training again, namely the universal visible/near infrared spectrum model aiming at the second component, so that the training time of a network can be greatly shortened, and the prediction precision of different qualities is effectively improved.
Referring to fig. 1-2, the invention provides a pear quality prediction method based on visible near infrared spectrum and transfer learning, which specifically comprises the following steps:
Collecting a spectrum: taking intact pears as samples, and collecting visible near infrared spectrums of the samples near the equator of each pear fruit by adopting a visible near infrared spectrometer; the spectrum acquisition conditions are: the spectrum collection range is 200.22-1024.85 nm, the collection wave bands are 1936, and the spectrum resolution is 0.38nm.
Data preprocessing: preprocessing the visible near infrared spectrum of the pear by adopting a multielement scattering correction method to eliminate spectrum difference caused by different scattering levels, so that the correlation between the spectrum and data is enhanced;
Sample division: the Kennard-Stone method was selected to 3:1 dividing the preprocessed spectrum data into a training set and a testing set; the total number of samples is 100, the number of training sets is 75, and the number of test sets is 25.
Measuring quality: cutting a piece of pulp with the thickness of 3-5 mm at the equator of the pear sample, dripping the extruded juice into a prism groove of a PR101 alpha sugar degree instrument, recording the sugar degree value at the position, and taking the average value of the two points as a sugar degree parameter for measuring the pear sample; measuring the hardness of pulp by using a GY-4 fruit hardness tester with the diameter of a pressing head of 11mm at the position for measuring the sugar degree, and taking the hardness as a hardness parameter for measuring a pear sample;
Building a VGG pre-training network model: after the training set is input, firstly, a convolution layer (Conv 1D) is passed, each layer of convolution layer uses a linear rectification function (RECTIFIED LINEAR unit, reLU) as an activation function, a maximum pooling layer (MaxPooling 1D) is added after each two layers of convolution layers to keep main characteristics, a Flatten layer is used for connecting the last maximum pooling layer and a full connection layer, and the last output layer of the network is set as a node which represents a prediction result of outputting each piece of sugar degree information; the mean square error is used as a loss function of the output layer.
Building a migration model: and the data size of the model to be trained is small, all the front layers of the pre-training network model are selected to be frozen, parameters of the last full-connection layer are only trained, the preprocessed spectrum data are input into the VGG pre-training network model, an Adam optimizer is used for training the full-connection layer, a migration model after fine adjustment is obtained, and the migration model is used for predicting the hardness data of pears.
The invention has been described in detail with reference to a method for predicting pear quality based on visible near infrared spectrum and transfer learning, and specific examples are applied herein to illustrate the principles and embodiments of the invention, and the above examples are only used to help understand the method and core ideas of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (5)

1. A pear quality prediction method based on visible near infrared spectrum and transfer learning is characterized by comprising the following steps:
Collecting a spectrum: taking intact pears as samples, and collecting visible near infrared spectrums of the samples near the equator of each pear fruit by adopting a visible near infrared spectrometer;
data preprocessing: preprocessing the visible near infrared spectrum of the pear by adopting a multielement scattering correction method to eliminate spectrum difference caused by different scattering levels, so that the correlation between the spectrum and data is enhanced;
sample division: the Kennard-Stone method was selected to 3:1 dividing the preprocessed spectrum data into a training set and a testing set;
Measuring quality: cutting a piece of pulp at the equator of the pear sample, extruding the juice, dripping the juice into a prism groove of a PR101 alpha glycosylometer, recording the glycosyl value at the position, and taking the average value of the two points as a glycosyl parameter for measuring the pear sample; measuring the hardness of pulp by using a fruit hardness meter at the position for measuring the sugar degree, and taking the hardness as a hardness parameter for measuring the pear sample;
building a VGG pre-training network model: after the training set is input, firstly, a convolution layer is passed through, each convolution layer uses a linear rectification function as an activation function, a layer of maximum pooling layer is added after each two convolution layers to keep main characteristics, a layer of flat is connected with the last maximum pooling layer and the full connection layer, and the last output layer of the network is set as a node which represents a prediction result of outputting each piece of sugar degree information;
Building a migration model: freezing all the front layers of the pre-training network model, training parameters of the last full-connection layer, inputting the preprocessed spectrum data into the VGG pre-training network model, training the full-connection layer by using an Adam optimizer to obtain a migration model after fine adjustment, and predicting hardness data of pears by the migration model;
the spectrum acquisition conditions are: the spectrum collection range is 200.22-1024.85 nm, the collection wave bands are 1936, and the spectrum resolution is 0.38nm.
2. The method of claim 1, wherein the total number of samples is 100, the number of training sets is 75, and the number of test sets is 25.
3. A method according to claim 2, characterized in that the pulp has a thickness of 3-5 mm.
4. A method according to claim 3, wherein the fruit durometer is type GY-4 with a ram diameter of 11 mm.
5. The method of claim 4, wherein the mean square error is used as a loss function of the output layer.
CN202211225769.4A 2022-10-09 2022-10-09 Pear quality prediction method based on visible near infrared spectrum and migration learning Active CN115684074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211225769.4A CN115684074B (en) 2022-10-09 2022-10-09 Pear quality prediction method based on visible near infrared spectrum and migration learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211225769.4A CN115684074B (en) 2022-10-09 2022-10-09 Pear quality prediction method based on visible near infrared spectrum and migration learning

Publications (2)

Publication Number Publication Date
CN115684074A CN115684074A (en) 2023-02-03
CN115684074B true CN115684074B (en) 2024-04-30

Family

ID=85063948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211225769.4A Active CN115684074B (en) 2022-10-09 2022-10-09 Pear quality prediction method based on visible near infrared spectrum and migration learning

Country Status (1)

Country Link
CN (1) CN115684074B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111474137A (en) * 2020-04-27 2020-07-31 无锡雪浪数制科技有限公司 Citrus sugar degree nondestructive testing method based on convolutional neural network
WO2021033033A1 (en) * 2019-08-22 2021-02-25 Foss Analytical A/S Determining physicochemical properties of a sample
CN113030001A (en) * 2021-03-19 2021-06-25 北京农业智能装备技术研究中心 Fruit sugar degree detection method and system
CN113702377A (en) * 2021-08-05 2021-11-26 华中农业大学 Glucose degree nondestructive testing method based on deep learning
CN114577671A (en) * 2022-03-17 2022-06-03 东北林业大学 Near-infrared wood density detection method based on parameter correction and transfer learning
WO2022160662A1 (en) * 2021-02-01 2022-08-04 广东省农业科学院蔬菜研究所 Method for measuring content of sugar in pumpkins by means of near infrared spectrum instrument

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021033033A1 (en) * 2019-08-22 2021-02-25 Foss Analytical A/S Determining physicochemical properties of a sample
CN111474137A (en) * 2020-04-27 2020-07-31 无锡雪浪数制科技有限公司 Citrus sugar degree nondestructive testing method based on convolutional neural network
WO2022160662A1 (en) * 2021-02-01 2022-08-04 广东省农业科学院蔬菜研究所 Method for measuring content of sugar in pumpkins by means of near infrared spectrum instrument
CN113030001A (en) * 2021-03-19 2021-06-25 北京农业智能装备技术研究中心 Fruit sugar degree detection method and system
CN113702377A (en) * 2021-08-05 2021-11-26 华中农业大学 Glucose degree nondestructive testing method based on deep learning
CN114577671A (en) * 2022-03-17 2022-06-03 东北林业大学 Near-infrared wood density detection method based on parameter correction and transfer learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于光子传输模拟与卷积神经网络的苹果品质检测;徐焕良 等;农业机械学报;20210831;第52卷(第9期);全文 *

Also Published As

Publication number Publication date
CN115684074A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN101308086B (en) Fruit internal quality on-line checking apparatus based on near infrared spectra technology
Kato Electrical density sorting and estimation of soluble solids content of watermelon
US20190041374A1 (en) Rapid screening method of processing raw rice for rice products
CN102539375A (en) Straw solid-state fermentation process parameter soft measurement method and device based on near infrared spectrum
CN109932333B (en) Fruit firmness measuring system and method with acoustic vibration and near infrared spectrum fused
CN101059426A (en) Method for non-destructive measurement for tea polyphenol content of tea based on near infrared spectrum technology
Jie et al. Review on the recent progress of non-destructive detection technology for internal quality of watermelon
CN103163217A (en) Sound surface wave resonator series detection and detection method
CN102937575B (en) Watermelon sugar degree rapid modeling method based on secondary spectrum recombination
CN103344597B (en) Anti-flavored-interference near infrared non-destructive testing method for internal components of lotus roots
CN106596456A (en) Changeable moving window based selection method of near infrared spectral region of solution
CN101881729B (en) Method for predicting moisture and protein content in minced pollock
CN105548070A (en) Apple soluble solid near-infrared detection part compensation method and system
CN105136767B (en) Quick determination method based on delicate flavour material inosinicacid in Raman spectrum fresh chicken
CN108414376B (en) Convenient nondestructive peach fruit hardness determination model establishing method
CN104949927A (en) Hyperspectral detection method of dried scallop moisture content
CN105738311A (en) Apple sweetness non-damage quick detection method based on near-infrared spectrum technology
CN115684074B (en) Pear quality prediction method based on visible near infrared spectrum and migration learning
CN101620195A (en) Method for detecting internal quality of jirou sweet persimmon by smell sensor
Lu et al. Nondestructive determination of soluble solids and firmness in mix-cultivar melon using near-infrared CCD spectroscopy
CN109946246A (en) A kind of detection method and device of apple soluble solid
CN108535250A (en) ' Fuji ' ripe apples degree lossless detection method based on Streif indexes
CN106198423A (en) A kind of method differentiating ham sausage grade based on visible and near infrared spectrum analytical technology
CN103048275A (en) Adaptive soft-instrument device and adaptive soft-instrument construction method based on near infrared spectrum
CN115097085A (en) Apple fruit brittleness grading method

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
GR01 Patent grant
GR01 Patent grant