WO2023077569A1 - Deep learning-based method for updating spectral analysis model for fruit - Google Patents

Deep learning-based method for updating spectral analysis model for fruit Download PDF

Info

Publication number
WO2023077569A1
WO2023077569A1 PCT/CN2021/132651 CN2021132651W WO2023077569A1 WO 2023077569 A1 WO2023077569 A1 WO 2023077569A1 CN 2021132651 W CN2021132651 W CN 2021132651W WO 2023077569 A1 WO2023077569 A1 WO 2023077569A1
Authority
WO
WIPO (PCT)
Prior art keywords
fruit
model
weight
deep learning
spectral analysis
Prior art date
Application number
PCT/CN2021/132651
Other languages
French (fr)
Chinese (zh)
Inventor
应义斌
杨杰
林涛
丁冠中
Original Assignee
浙江大学
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 浙江大学 filed Critical 浙江大学
Publication of WO2023077569A1 publication Critical patent/WO2023077569A1/en

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
    • G01N21/27Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands using photo-electric detection ; circuits for computing concentration
    • 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

Definitions

  • the invention belongs to the field of spectral analysis and chemometrics, and specifically relates to a method for updating a deep learning fruit spectral analysis model.
  • this research aims to propose a model update method suitable for nonlinear deep learning models, which makes good use of historical batch data and provides good performance when the new batch has a small number of labeled samples. model reliability.
  • the present invention proposes a deep learning method for updating the fruit spectral analysis model, which solves the problem of biological
  • the technology that cannot achieve accurate detection caused by the difference has brought about an improvement effect on the accuracy of the model method.
  • the invention uses a small number of samples to update the spectral model constructed by historical data, and provides higher prediction accuracy than multiple traditional model updating methods. This method can effectively preserve the common characteristics of historical batch data and new batch data, and provide better prediction accuracy and robustness for new batches of fruit samples.
  • Step 1) Use historical batches of fruit spectral data as the sample set, and the fruit quality variable values corresponding to the sample set as the label set; construct a deep learning fruit spectral analysis model, use the sample set as input, and the label set as output, and use the deep learning fruit
  • the spectral analysis model is trained, and the initial deep learning fruit spectral analysis model and its model weight are obtained through the gradient descent algorithm and the hyperparameter optimization method;
  • Step 2) Predict the quality variable value of the new batch of fruit:
  • step 1) Select a small number of representative samples from the new batch of total fruit samples, collect the spectral data of representative fruit samples and their corresponding fruit quality variable values as a training set, and input it into the initial deep learning fruit spectral analysis model obtained in step 1) Among them, the weight of the weight freezing layer in the model is fixed, and the model is retrained to complete the weight fine-tuning of the weight variable layer, so as to obtain an updated deep learning fruit spectral analysis model suitable for the prediction of the new batch of fruit quality variables;
  • step 2.2) Collect the fruit spectral data of the remaining unknown quality variable values in the new batch, and input the updated deep learning fruit spectral analysis model in step 2.1) to predict the quality variable values, and complete the detection of the new batch of fruit quality variables.
  • the deep neural network spectral analysis model adopts a convolutional neural network model, an autoencoder model, a recurrent neural network model or a Transformer model; the embodiment of the present invention adopts a convolutional neural network model, which usually consists of multiple convolutional layers, a
  • the stretching layer is composed of multiple fully connected layers, where the front end of the convolutional layer is the input of the original spectrum, and the predicted value of the quality variable is input after the last fully connected layer.
  • the weight training of the deep neural network spectral analysis model guides the gradient descent algorithm to learn the model weights according to the loss function.
  • the loss function is composed of the mean square error between the estimated predicted value and the real value and a regularization term.
  • the final weight is determined through several rounds of iterations. .
  • the structural hyperparameter search of the deep neural network spectral analysis model is used to optimize the model structure of the neural network, such as the size of the convolution kernel, etc., and generate several hyperparameter combinations in the pre-set hyperparameter search space. According to the training set samples in the network training performance to determine the optimal model hyperparameters.
  • the training of the deep learning model adopts one or more combinations of the following four strategies: L2 norm regularization, learning rate decay strategy Learning rate decay, loss method Dropout and early stopping strategy Early stopping.
  • the fruit samples of the historical batches in the step 1) are the fruit samples obtained before the new batch, which come from different harvest years, different harvest seasons and different origins; the new batch of fruits in the step 2) are quality Variable fruit to be tested.
  • the fruit quality variable value in described step 1) and step 2.1) is a kind of quality parameter value in the sugar content of fruit, acidity, hardness;
  • the sugar content and acidity of the fruit are detected; the hardness of the fruit is measured by a hardness meter.
  • representative samples are selected from the total samples of the new batch of fruits by the Kennard-Stone method for model update, and the representative samples account for 5% to 20% of the total samples of the new batch of fruits.
  • the weight freezing layer and the weight variable layer in the step 2.1) are optimized by the following method:
  • the last 1 layer, the last 2 layers, ... the last N-1, and N layers in the model are respectively used as variable weight layers in the model, and the rest of the layers in the model are used as weight freezing layers, so that Obtain N models with different weight variable layers and weight frozen layers;
  • the parameters of the convolutional layer are generally fixed, and the parameters of the fully connected layer are fine-tuned.
  • the gradient descent algorithm is used to fine-tune the weight of the variable weight layer.
  • the present invention can realize the generalization of the model by fine-tuning the weight of the model. Due to the good nonlinear fitting ability of the deep neural network model, a new batch of data is used to fine-tune the model, so that the model can extract the general and differential features of different batches of data and improve the prediction accuracy of the model.
  • the present invention can fine-tune the historical model based on a small number of samples in a new batch, avoiding the manpower and material resources spent on collecting a large number of samples required for remodeling, and Effective use of historical data.
  • the present invention is applicable to the weight adjustment of the nonlinear neural network model, and has better reliability in the case of different data volumes.
  • the present invention is applicable to the application of the convolutional neural network model in the spectral analysis of different batches of fruit, and can effectively utilize the model constructed by the historical batch, and through the spectral data and quality variables of a small number of new batch samples, the model Fine-tune some parameters of the model to increase the generalization ability of the model, making it suitable for good prediction of a new batch of fruit samples.
  • Fig. 1 is the architecture diagram of the deep learning model used for spectral analysis in the present invention, taking the convolutional neural network as an example;
  • Fig. 2 is the flowchart of implementing model update
  • Fig. 3 is the schematic diagram of deep neural network fine-tuning method
  • Fig. 4 is a comparison chart of prediction performance of different model update methods in the embodiment.
  • Step 1) Build a deep learning fruit spectral analysis model (this paper takes convolutional neural network as an example): use the fruit spectral data collected in historical batches and the quality variable data obtained through destructive tests as labels, and input them into the convolutional neural network respectively.
  • the initial deep neural network spectral analysis model structure and its model weight are obtained through the gradient descent algorithm and the random grid hyperparameter search method. This model is suitable for the quality variable prediction of historical batches of fruits;
  • model weight refers to the connection weight of the neurons between the layers of the deep neural network spectral analysis model
  • structural hyperparameter refers to the parameters that determine the model structure and the number of weights.
  • step 1) specifically:
  • Deep neural network spectral analysis models include convolutional neural network models, autoencoder models, recurrent neural network models, and Transformer models used in spectral analysis.
  • the structural hyperparameters of the model are optimized and determined through manual search, network search, and random network search methods.
  • This paper mainly takes the convolutional neural network model as an example.
  • the model usually consists of multiple convolutional layers, a stretching layer, and multiple fully connected layers.
  • the front end of the convolutional layer is the input of the original spectrum, and the last fully connected Output the predicted value of the quality variable after the layer;
  • the weight training of the deep neural network spectral analysis model guides the gradient descent algorithm to learn the weight of the model according to the loss function.
  • the loss function is composed of the mean square error and the regularization item between the estimated predicted value and the real value. Through several rounds of iterations Determine the final weight parameter.
  • the hyperparameter search of the model is used to optimize the model structure, such as the size of the convolution kernel, etc., generate several hyperparameter combinations in the pre-set hyperparameter search space, and determine the optimal model hyperparameter according to the performance of the training set samples in network training. parameter;
  • Structural hyperparameters include the number of neurons in different layers of the neural network, learning rate of network training, learning rate decay, activation function, random deactivation rate, batch size, etc.
  • the training process of the deep learning model uses four strategies to reduce model overfitting and improve model accuracy, including 1) adding an L2 norm regularization term to the loss function and optimizing the strength of the regularization term; 2) in the model Add a dropout layer (Dropout) to the structure, optimize its strength, and randomly deactivate some neurons to avoid excessive dependence of the model on specific parameter configurations; 3) Use the Learning rate decay strategy to learn the weight of the model Gradually reduce the learning rate in the middle to avoid the model from falling into local optimum; 4) Use the early stopping strategy (Early stopping) to avoid over-fitting caused by over-training of the model.
  • these four strategies may not all be used, and one or a combination of some of them may be used.
  • step 2) specifically:
  • the number of weight-freezing layers with fixed weights in the process of parameter fine-tuning is determined after optimization. By comparing the impact of fixing different layers on the model update prediction results, the number of layers with fixed weights in model fine-tuning is determined.
  • the parameters of the convolutional layer are generally fixed, and the parameters of the fully connected layer are fine-tuned;
  • Step 3) Collect spectral data for a large number of fruit samples with unknown quality variable values in the new batch, and predict them through the updated model in step 2), so as to obtain the quality variable prediction results of the new batch of fruit samples .
  • This method updates the model by fine-tuning some of the weights of the historical model.
  • This method uses the neural network data-driven weight learning method to automatically retain the common features between different batches of data in the two trainings, and is suitable for the new generation. The samples collected in batches can improve the accuracy of predicting the quality variables of new batches of fruits.
  • the method proposed by the invention aims to update the model developed in the historical batch and apply it to the new batch of fruit samples, and the scope of application includes: different harvest years, different harvest seasons, different origins and so on. Aiming at the problem of model performance degradation caused by differences in the growth environment of different batches of fruits, a small amount of new batch data is used to update the model to be suitable for the prediction of the new batch of fruit quality.
  • the selected data set is the Cuiguan pear data collected in two batches (harvest year) in Tonglu County, Zhejiang City in 2017 and 2018 by the pear sugar detection system developed by the Intelligent Bio-Industrial Equipment Innovation (IBE) team of Zhejiang University.
  • IBE Intelligent Bio-Industrial Equipment Innovation
  • Kennard-Stone sampling algorithm 80% of the samples in 2017 (historical batch) are selected as the training set, and 20% are used as the prediction set for the development of the convolutional neural network model; the sample selection for 2018 (new batch) 5%, 10%, 15%, 20% are used for model update, and 80% are used for testing model update performance.
  • this model comprises three convolutional layers, a stretching layer, two fully connected layers and an output layer connected successively .
  • the convolution kernel sizes in the three convolution layers are 5, 7, and 3 respectively, and the step size is 5, respectively. 3, 1, the number of neurons in both fully connected layers is 16, the random deactivation rate is 0.2, the batch size is 32, the learning rate is 0.001, and the regularization coefficient is 0.05, etc.
  • the obtained prediction sets RMSEP are 0.481, 0.477, 0.476, and 0.407 respectively; using the global Model method, the obtained prediction set RMSEP is 0.516, 0.499, 0.501, 0.448 respectively; using the slope/bias correction method, the obtained prediction set RMSEP is 0.621, 0.554, 0.566, 0.549 respectively; using the remodeling method, the obtained The RMSEP of the prediction set are 0.843, 0.538, 0.737, 0.530 respectively.
  • the method of the present invention is superior to the three methods in updating the fruit spectral model between different batches, and can improve the accuracy of fruit sugar content prediction.
  • This method has good reliability under different sample sizes and has wider application prospects.

Landscapes

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

Abstract

A deep learning-based method for updating a spectral analysis model for fruit. The method comprises: inputting spectral data of fruit and a quality variable, which are collected in a historical batch, into a deep neural network, and optimizing model parameters by means of a random grid hyper-parameter search and a gradient descent algorithm, so as to obtain an optimal model structure and weights; keeping the weight of a weight frozen layer of the model fixed, and performing a fine adjustment on the weight of a weight variable layer of the model by using spectral data and a quality variable, which are obtained by using a small number of fruit samples in a new batch, so as to obtain an updated model; and inputting, into the updated model, a fruit spectrum having an unknown predicted value in a new batch, and outputting a quality variable prediction result of fruit in the new batch. In the method, a spectral model constructed by means of historical data is updated by using a small number of samples, and a prediction precision higher than that of various traditional model updating methods is provided; and common features of data of a historical batch and data of a new batch can be effectively reserved, and a better prediction precision and robustness are provided for fruit samples in a new batch.

Description

一种深度学习水果光谱分析模型更新方法A Deep Learning Method for Updating the Spectral Analysis Model of Fruits 技术领域technical field
本发明属于光谱分析与化学计量学领域,具体涉及了一种深度学习水果光谱分析模型更新方法。The invention belongs to the field of spectral analysis and chemometrics, and specifically relates to a method for updating a deep learning fruit spectral analysis model.
背景技术Background technique
光谱技术与化学计量学的发展促进了食品、制药、石油化工等行业的现场化无损检测应用。近年来,水果高通量分级系统快速发展,处理速度达到每秒多个,能够进行水果内部品质安全的快速分选。由于水果等生物对象在生长发育过程中收到环境等因素的影响,不同批次、年份、来源的水果通常存在生物学差异性,影响光在水果组织内部的作用和光谱数据的采集,导致已经开发的水果光谱分析模型失效,难以提供良好的品质预测决策支持。因此,开发可靠的光谱模型更新方法,对不同批次的待测水果是重要的。The development of spectroscopy technology and chemometrics has promoted the application of on-site non-destructive testing in food, pharmaceutical, petrochemical and other industries. In recent years, the fruit high-throughput grading system has developed rapidly, with a processing speed of more than one per second, which can quickly sort the internal quality and safety of fruits. Because biological objects such as fruits are affected by factors such as the environment during the growth and development process, there are usually biological differences in fruits of different batches, years, and sources, which affect the role of light in the fruit tissue and the collection of spectral data. The developed fruit spectral analysis model is invalid, and it is difficult to provide good quality prediction decision support. Therefore, it is important to develop a reliable spectral model update method for different batches of tested fruits.
传统的模型更新方法主要有三大类:1)全局模型:通过将多批次的数据构建全局训练集来提升模型的适用范围,但是由于增大的数据变异性和非线性程度,该方法通常会导致预测精度下降;2)重新建模:通过采集新一批次大量水果样本的光谱和品质变量数据,重新开发模型,但是该方法耗费较多的人力物力,且不能良好地利用历史批次的数据;3)斜率/偏差校正:通过部分新一批次的样本对已有模型的斜率和偏差进行校正,但是该方法仅适用于线性预测模型,且该方法可靠性较差,样本选择不当会造成杠杆效应显著降低模型预测精度。There are three main categories of traditional model update methods: 1) Global model: By constructing a global training set with multiple batches of data to improve the scope of application of the model, but due to the increased data variability and nonlinearity, this method usually loses 2) Remodeling: redevelop the model by collecting a new batch of spectral and quality variable data of a large number of fruit samples, but this method consumes more manpower and material resources, and cannot make good use of historical batches. data; 3) slope/bias correction: the slope and deviation of the existing model are corrected by some new batches of samples, but this method is only suitable for linear prediction models, and the reliability of this method is poor, and improper sample selection will lead to The leverage effect significantly reduces the prediction accuracy of the model.
针对现有方法的限制,该研究旨在提出一种适用于非线性深度学习模型的模型更新方法,良好地利用历史批次的数据,并且新一批次有少量带标签样本的情况下提供良好的模型可靠性。Aiming at the limitations of existing methods, this research aims to propose a model update method suitable for nonlinear deep learning models, which makes good use of historical batch data and provides good performance when the new batch has a small number of labeled samples. model reliability.
发明内容Contents of the invention
为了解决已开发的水果光谱分析模型对不同批次水果样本预测精度显著降低的问题,本发明提出了一种深度学习水果光谱分析模型更新方法,解决了由于不同批次采集的水果样本存在生物学差异性而引起的无法实现准确检测的技术,对模型方法精度带来了提升效果。In order to solve the problem that the developed fruit spectral analysis model significantly reduces the prediction accuracy of different batches of fruit samples, the present invention proposes a deep learning method for updating the fruit spectral analysis model, which solves the problem of biological The technology that cannot achieve accurate detection caused by the difference has brought about an improvement effect on the accuracy of the model method.
本发明使用少量的样本,更新历史数据所构建的光谱模型,提供比多种传统模型更新方法更高的预测精度。该方法能够有效保留历史批次数据与新一批次数据的共有特征,并且对新一批次的水果样本提供更好的预测精度和鲁棒性。The invention uses a small number of samples to update the spectral model constructed by historical data, and provides higher prediction accuracy than multiple traditional model updating methods. This method can effectively preserve the common characteristics of historical batch data and new batch data, and provide better prediction accuracy and robustness for new batches of fruit samples.
本发明采用的技术方案如下,包含如下步骤:The technical scheme that the present invention adopts is as follows, comprises the steps:
步骤1)采用历史批次的水果光谱数据作为样本集,样本集对应的水果品质变量值作为标签集;构建深度学习水果光谱分析模型,将样本集作为输入,标签集作为输出,对深度学习水果光谱分析模型进行训练,通过梯度下降算法和超参数优化方法,得到初始深度学习水果光谱分析模型及其模型权重;Step 1) Use historical batches of fruit spectral data as the sample set, and the fruit quality variable values corresponding to the sample set as the label set; construct a deep learning fruit spectral analysis model, use the sample set as input, and the label set as output, and use the deep learning fruit The spectral analysis model is trained, and the initial deep learning fruit spectral analysis model and its model weight are obtained through the gradient descent algorithm and the hyperparameter optimization method;
步骤2)预测新批次水果的品质变量值:Step 2) Predict the quality variable value of the new batch of fruit:
2.1)从新批次水果总样本中选取少量代表性样本,采集代表性水果样本的光谱数据及其对应的水果品质变量值作为训练集,将其输入步骤1)得到的初始深度学习水果光谱分析模型中,固定模型中权重冻结层的权重,对模型进行重新训练完成权重可变层的权重微调,从而得到适用于新批次水果品质变量预测的更新后的深度学习水果光谱分析模型;2.1) Select a small number of representative samples from the new batch of total fruit samples, collect the spectral data of representative fruit samples and their corresponding fruit quality variable values as a training set, and input it into the initial deep learning fruit spectral analysis model obtained in step 1) Among them, the weight of the weight freezing layer in the model is fixed, and the model is retrained to complete the weight fine-tuning of the weight variable layer, so as to obtain an updated deep learning fruit spectral analysis model suitable for the prediction of the new batch of fruit quality variables;
2.2)采集新批次中其余的未知品质变量值的水果光谱数据,并输入步骤2.1)更新后的深度学习水果光谱分析模型中进行品质变量值预测,完成新批次的水果品质变量检测。2.2) Collect the fruit spectral data of the remaining unknown quality variable values in the new batch, and input the updated deep learning fruit spectral analysis model in step 2.1) to predict the quality variable values, and complete the detection of the new batch of fruit quality variables.
所述深度神经网络光谱分析模型采用卷积神经网络模型、自编码器模型、循环神经网络模型或Transformer模型;本发明实施例采用卷积神经网络模型,该模型通常由多个卷积层、一个拉伸层和多个全连接层组成,其中卷积层的前端为原始光谱的输入,最后一个全连接层后输入品质变量预测值。The deep neural network spectral analysis model adopts a convolutional neural network model, an autoencoder model, a recurrent neural network model or a Transformer model; the embodiment of the present invention adopts a convolutional neural network model, which usually consists of multiple convolutional layers, a The stretching layer is composed of multiple fully connected layers, where the front end of the convolutional layer is the input of the original spectrum, and the predicted value of the quality variable is input after the last fully connected layer.
深度神经网络光谱分析模型的权重训练根据损失函数指导梯度下降算法以学习模型权重,损失函数由评估预测值和真实值之间的均方误差和正则化项组成,通过若干轮迭代确定最后的权重。The weight training of the deep neural network spectral analysis model guides the gradient descent algorithm to learn the model weights according to the loss function. The loss function is composed of the mean square error between the estimated predicted value and the real value and a regularization term. The final weight is determined through several rounds of iterations. .
深度神经网络光谱分析模型的结构超参数搜索用于优化神经网络的模型结构,如卷积核大小等,在预先设定的超参数搜索空间生成若干项超参数组合,根据网络训练中训练集样本的表现,确定最优的模型超参数。The structural hyperparameter search of the deep neural network spectral analysis model is used to optimize the model structure of the neural network, such as the size of the convolution kernel, etc., and generate several hyperparameter combinations in the pre-set hyperparameter search space. According to the training set samples in the network training performance to determine the optimal model hyperparameters.
深度学习模型的训练采用下述四种策略中的一种或多种组合:L2范数正则化、学习率衰减策略Learning rate decay、丢失法Dropout和提前停止策略Early stopping。The training of the deep learning model adopts one or more combinations of the following four strategies: L2 norm regularization, learning rate decay strategy Learning rate decay, loss method Dropout and early stopping strategy Early stopping.
所述步骤1)中历史批次的水果样本为在新批次之前获得的水果样本,分别来源于不同收获年份、不同收获季节和不同产地;所述步骤2)中新批次的水果为品质变量待检测的水果。The fruit samples of the historical batches in the step 1) are the fruit samples obtained before the new batch, which come from different harvest years, different harvest seasons and different origins; the new batch of fruits in the step 2) are quality Variable fruit to be tested.
所述步骤1)和步骤2.1)中的水果品质变量值为水果的糖度、酸度、硬度中的一种品质参数值;通过破坏性试验获取水果果汁后,分别采用糖度计和pH计对果汁进行检测得到水果的糖度和酸度;水果的硬度通过硬度计测量得到。The fruit quality variable value in described step 1) and step 2.1) is a kind of quality parameter value in the sugar content of fruit, acidity, hardness; The sugar content and acidity of the fruit are detected; the hardness of the fruit is measured by a hardness meter.
所述步骤2.1)中,通过Kennard-Stone方法从新批次水果总样本中选择代表性样本用于模型更新,代表性样本占新批次水果总样本的5%~20%。In the step 2.1), representative samples are selected from the total samples of the new batch of fruits by the Kennard-Stone method for model update, and the representative samples account for 5% to 20% of the total samples of the new batch of fruits.
所述步骤2.1)中的权重冻结层和权重可变层通过下述方法优化得到:The weight freezing layer and the weight variable layer in the step 2.1) are optimized by the following method:
对于N层的深度神经网络模型,将模型中的最后1层、最后2层、…最后N-1、N层分别作为模型中的权重可变层,模型中的其余层作为权重冻结层,从而得到N个权重可变层和权重冻结层不同的模型;For an N-layer deep neural network model, the last 1 layer, the last 2 layers, ... the last N-1, and N layers in the model are respectively used as variable weight layers in the model, and the rest of the layers in the model are used as weight freezing layers, so that Obtain N models with different weight variable layers and weight frozen layers;
将训练集分别输入N个模型中,比较N个模型输出的预测值与真实值的误差,将误差最小的模型对应的权重冻结层和权重可变层作为优化后得到的权重冻结层和权重可变层。Input the training set into N models respectively, compare the errors between the predicted values output by the N models and the real values, and use the weight frozen layer and weight variable layer corresponding to the model with the smallest error as the weight frozen layer and weight variable layer obtained after optimization. Change layers.
以卷积神经网络为例,一般将卷积层参数固定,微调全连接层的参数。Taking the convolutional neural network as an example, the parameters of the convolutional layer are generally fixed, and the parameters of the fully connected layer are fine-tuned.
所述步骤2.1)中采用梯度下降算法对权重可变层的权重进行微调。In the step 2.1), the gradient descent algorithm is used to fine-tune the weight of the variable weight layer.
本发明的有益效果是:The beneficial effects of the present invention are:
1)本发明相比与全局建模方法而言,能够通过微调模型模型权重来实现模型的泛化。由于深度神经网络模型具有良好的非线性拟合能力,使用新一批次数据进行模型微调,使模型提取到不同批次数据的通用和差异特征,提升模型预测精度。1) Compared with the global modeling method, the present invention can realize the generalization of the model by fine-tuning the weight of the model. Due to the good nonlinear fitting ability of the deep neural network model, a new batch of data is used to fine-tune the model, so that the model can extract the general and differential features of different batches of data and improve the prediction accuracy of the model.
2)本发明相比与重新建模方法而言,能够通过新一批次的少量样本对在历史模型的基础上进行微调,避免了重新建模所需要采集大量样本所耗费的人力物力,并能有效利用好历史数据。2) Compared with the remodeling method, the present invention can fine-tune the historical model based on a small number of samples in a new batch, avoiding the manpower and material resources spent on collecting a large number of samples required for remodeling, and Effective use of historical data.
3)本发明相比与斜率/偏差校正方法而言,能够适用于非线性神经网络模型的权重调整,并且在不同数据量的情况下具有较好的可靠性。3) Compared with the slope/deviation correction method, the present invention is applicable to the weight adjustment of the nonlinear neural network model, and has better reliability in the case of different data volumes.
4)本发明适用于卷积神经网络模型在不同批次水果光谱分析中的应用,能够有效的利用历史批次所构建的模型,通过少量新一批次样本的光谱数据和品质变量,对模型的部分参数进行微调,增加模型的可泛化能力,使其适用于对新一批次水果样本的良好预测。4) The present invention is applicable to the application of the convolutional neural network model in the spectral analysis of different batches of fruit, and can effectively utilize the model constructed by the historical batch, and through the spectral data and quality variables of a small number of new batch samples, the model Fine-tune some parameters of the model to increase the generalization ability of the model, making it suitable for good prediction of a new batch of fruit samples.
附图说明Description of drawings
图1为本发明用于光谱分析的深度学习模型架构图,以卷积神经网络为例;Fig. 1 is the architecture diagram of the deep learning model used for spectral analysis in the present invention, taking the convolutional neural network as an example;
图2为实现模型更新的流程图;Fig. 2 is the flowchart of implementing model update;
图3为深度神经网络微调方法的示意图;Fig. 3 is the schematic diagram of deep neural network fine-tuning method;
图4为实施例不同模型更新方法预测性能比较图。Fig. 4 is a comparison chart of prediction performance of different model update methods in the embodiment.
具体实施方式Detailed ways
下面结合实施例对本发明做进一步详细说明,但本发明要求保护的范围并不局限于实施例表示的范围。以下进行的实施例,在Python软件上运行。The present invention will be described in further detail below in conjunction with the examples, but the protection scope of the present invention is not limited to the scope indicated by the examples. The following embodiments are run on Python software.
如图2所示,本发明采用的技术方案如下:As shown in Figure 2, the technical scheme that the present invention adopts is as follows:
步骤1):构建深度学习水果光谱分析模型(本文以卷积神经网络为例):采用历史批次采集的水果光谱数据和通过破坏性试验获取的品质变量数据作为标签,分别输入到该卷积神经网络模型中,通过梯度下降算法和随机网格超参数搜索方法,得到初始深度神经网络光谱分析模型结构及其模型权重,该模型适用于历史批次水果的品质变量预测;Step 1): Build a deep learning fruit spectral analysis model (this paper takes convolutional neural network as an example): use the fruit spectral data collected in historical batches and the quality variable data obtained through destructive tests as labels, and input them into the convolutional neural network respectively. In the neural network model, the initial deep neural network spectral analysis model structure and its model weight are obtained through the gradient descent algorithm and the random grid hyperparameter search method. This model is suitable for the quality variable prediction of historical batches of fruits;
其中,模型权重是指深度神经网络光谱分析模型层与层之间神经元的连接权重,结构超参数是指决定模型结构和权重数量的参数。Among them, the model weight refers to the connection weight of the neurons between the layers of the deep neural network spectral analysis model, and the structural hyperparameter refers to the parameters that determine the model structure and the number of weights.
所述的步骤1)中,具体为:In the described step 1), specifically:
1.1)深度神经网络光谱分析模型包括光谱分析中使用的卷积神经网络模型、自编码器模型、循环神经网络模型、Transformer模型等。模型的结构超参数是通过人工搜索、网络搜索、随机网络搜索方法优化决定。本文中主要以卷积神经网络模型为例,该模型通常由多个卷积层、一个拉伸层、多个全连接层组成,其中卷积层的前端为原始光谱的输入,最后一个全连接层后输出品质变量预测值;1.1) Deep neural network spectral analysis models include convolutional neural network models, autoencoder models, recurrent neural network models, and Transformer models used in spectral analysis. The structural hyperparameters of the model are optimized and determined through manual search, network search, and random network search methods. This paper mainly takes the convolutional neural network model as an example. The model usually consists of multiple convolutional layers, a stretching layer, and multiple fully connected layers. The front end of the convolutional layer is the input of the original spectrum, and the last fully connected Output the predicted value of the quality variable after the layer;
1.2)深度神经网络光谱分析模型的权重训练根据损失函数来指导梯度下降算法以学习模型权重,损失函数由评估预测值和真实值之间的均方误差和正则化项所组成,通过若干轮迭代确定最后的权重参数。模型的超参数搜索用于优化模型结构,如卷积核大小等,在预先设定的超参数搜索空间生成若干项超参数组合,根据网络训练中训练集样本的表现,确定最优的模型超参数;1.2) The weight training of the deep neural network spectral analysis model guides the gradient descent algorithm to learn the weight of the model according to the loss function. The loss function is composed of the mean square error and the regularization item between the estimated predicted value and the real value. Through several rounds of iterations Determine the final weight parameter. The hyperparameter search of the model is used to optimize the model structure, such as the size of the convolution kernel, etc., generate several hyperparameter combinations in the pre-set hyperparameter search space, and determine the optimal model hyperparameter according to the performance of the training set samples in network training. parameter;
结构超参数包括神经网络不同层中神经元个数等,网络训练的学习率、学习率衰减、激活函数、随机失活率、批大小等。Structural hyperparameters include the number of neurons in different layers of the neural network, learning rate of network training, learning rate decay, activation function, random deactivation rate, batch size, etc.
步骤2):对训练好的深度神经网络光谱分析模型进行参数微调:对新一批次收获的少量水果样本,采集光谱数据和品质变量标签,将其输入步骤1)中训练好的深度神经网络光谱分析模型中,在模型结构和部分层权重固定不变的基础下,对模型其他层的权重进行微调,实现模型权重的更新,以适用于新一批次的品质变量预测;Step 2): Fine-tune the parameters of the trained deep neural network spectral analysis model: collect spectral data and quality variable labels for a small number of fruit samples harvested in a new batch, and input them into the trained deep neural network in step 1) In the spectral analysis model, on the basis that the model structure and the weights of some layers are fixed, the weights of other layers of the model are fine-tuned to realize the update of the model weights, so as to be suitable for the prediction of the new batch of quality variables;
1.3)深度学习模型的训练过程使用四种策略来减少模型过度拟合从而提升模型精度,包括1)损失函数中加入L2范数正则化项,并优化该正则化项的强度;2)在模型结构中添加丢失层(Dropout),并优化其强度,随机使一部分神经元失活,避免模型过度依赖于特定的参数配置;3)使用学习率衰减(Learning rate decay)策略,在模型权重学习过程中逐步降低学习率,避免模型陷入局部最优;4)使用提前停止策略(Early stopping),在模型避免模型过度训练导致 过拟合。1.3) The training process of the deep learning model uses four strategies to reduce model overfitting and improve model accuracy, including 1) adding an L2 norm regularization term to the loss function and optimizing the strength of the regularization term; 2) in the model Add a dropout layer (Dropout) to the structure, optimize its strength, and randomly deactivate some neurons to avoid excessive dependence of the model on specific parameter configurations; 3) Use the Learning rate decay strategy to learn the weight of the model Gradually reduce the learning rate in the middle to avoid the model from falling into local optimum; 4) Use the early stopping strategy (Early stopping) to avoid over-fitting caused by over-training of the model.
具体实施中,这四种策略不一定全部使用,可采用其中的某种或某几种的组合。In specific implementation, these four strategies may not all be used, and one or a combination of some of them may be used.
所述的步骤2)中,具体为:In the described step 2), specifically:
2.1)对训练好的深度学习模型进行参数微调时,模型的结构参数保持固定,部分层的权重固定,仅对其他层的权重进行更新,以调整所提取特征的权重组合,使模型适用于新一批次所采集的数据,如图3示意图。对于多层网络结构的深度学习模型,所选择用于权重的固定层的层数通过优化所确定的;2.1) When fine-tuning the parameters of the trained deep learning model, the structural parameters of the model are kept fixed, the weights of some layers are fixed, and only the weights of other layers are updated to adjust the weight combination of the extracted features, so that the model is suitable for new models. The data collected in one batch is shown in Figure 3. For a deep learning model with a multi-layer network structure, the number of fixed layers selected for weights is determined by optimization;
2.2)参数微调过程中权重固定的权重冻结层的数量是优化后决定的,通过比较固定不同层对模型更新预测结果的影响,确定模型微调中权重固定的层数。以卷积神经网络为例,一般将卷积层参数固定,微调全连接层的参数;2.2) The number of weight-freezing layers with fixed weights in the process of parameter fine-tuning is determined after optimization. By comparing the impact of fixing different layers on the model update prediction results, the number of layers with fixed weights in model fine-tuning is determined. Taking the convolutional neural network as an example, the parameters of the convolutional layer are generally fixed, and the parameters of the fully connected layer are fine-tuned;
2.3)参数微调过程选择新一批次具有代表性的样本,有利于提升模型的预测精度,如可通过Kennard-Stone方法来选择代表性样本用于模型更新。2.3) Selecting a new batch of representative samples in the parameter fine-tuning process is conducive to improving the prediction accuracy of the model. For example, the Kennard-Stone method can be used to select representative samples for model update.
步骤3):对新一批次中未知品质变量值的大量水果样本采集光谱数据,通过步骤2)中更新后的模型对其进行预测,以得到对新一批次水果样本的品质变量预测结果。该方法通过微调历史模型的部分权重实现模型的更新,该方法利用神经网络数据驱动的权重学习方式,在两次训练中自动地保留了不同批次数据之间的通用特征,并适用于新一批次采集的样本,从而提高了对新一批次水果品质变量预测的精度。Step 3): Collect spectral data for a large number of fruit samples with unknown quality variable values in the new batch, and predict them through the updated model in step 2), so as to obtain the quality variable prediction results of the new batch of fruit samples . This method updates the model by fine-tuning some of the weights of the historical model. This method uses the neural network data-driven weight learning method to automatically retain the common features between different batches of data in the two trainings, and is suitable for the new generation. The samples collected in batches can improve the accuracy of predicting the quality variables of new batches of fruits.
本发明提出的方法旨在对历史批次开发的模型更新应用于新一批次的水果样本,适用范围包括:不同收获年份、不同收获季节、不同产地来源等。针对不同批次水果生长环境等差异所导致的模型性能下降的问题,采用少量新一批次数据对模型更新,以适用于新一批次的水果品质预测。The method proposed by the invention aims to update the model developed in the historical batch and apply it to the new batch of fruit samples, and the scope of application includes: different harvest years, different harvest seasons, different origins and so on. Aiming at the problem of model performance degradation caused by differences in the growth environment of different batches of fruits, a small amount of new batch data is used to update the model to be suitable for the prediction of the new batch of fruit quality.
由于不同收获年份、不同收获季节、不同产地来源水果的生长环境和种植管理不同,水果收获后通常存在大小尺寸、外观颜色、品质变量分布等生物学差异性,使用历史批次构建好的模型不能提供良好的预测精度、通常导致检测结果不准确。本发明解决了上述技术问题。Due to different harvesting years, different harvesting seasons, and different growth environments and planting management of fruits from different origins, there are usually biological differences in size, appearance, color, and quality variable distribution of fruits after harvesting. Models constructed using historical batches cannot Provides good prediction accuracy, usually leads to inaccurate detection results. The present invention solves the above-mentioned technical problems.
实施例:Example:
本实例应用于可见/近红外光谱的定量分析,预测翠冠梨的糖度含量。所选取的数据集是浙江大学智能生物产业装备创新(IBE)团队开发的梨糖度检测系统于2017和2018年两个批次(收获年份)在浙江省桐庐县采集的翠冠梨数据。This example is applied to the quantitative analysis of visible/near-infrared spectrum to predict the sugar content of Cuiguan pear. The selected data set is the Cuiguan pear data collected in two batches (harvest year) in Tonglu County, Zhejiang Province in 2017 and 2018 by the pear sugar detection system developed by the Intelligent Bio-Industrial Equipment Innovation (IBE) team of Zhejiang University.
2017年采集样本477个,糖度含量范围是8.95%~16.25%,2018年采集样本256个,糖度含量范围是9.00%~13.50%。糖度数据是通过对梨可食用部分榨 汁后在糖度计上采集的。在海洋光学QE65pro光谱仪上测试每个梨的光谱数据,去除噪声部分后,使用的光谱波段范围是576.66到939.29nm,共有475个变量构建模型。In 2017, 477 samples were collected, with a sugar content ranging from 8.95% to 16.25%, and in 2018, 256 samples were collected, with a sugar content ranging from 9.00% to 13.50%. Brix data were collected on a Brix meter after juicing the edible part of pears. The spectral data of each pear was tested on the Ocean Optics QE65pro spectrometer. After removing the noise part, the spectral band range used was 576.66 to 939.29nm, and a total of 475 variables were used to construct the model.
通过Kennard-Stone采样算法对2017年(历史批次)的样本选择80%作为训练集,20%作为预测集,用于开发卷积神经网络模型;对2018年(新一批次)的样本选择5%,10%,15%,20%用于模型更新,80%用于测试模型更新性能。Through the Kennard-Stone sampling algorithm, 80% of the samples in 2017 (historical batch) are selected as the training set, and 20% are used as the prediction set for the development of the convolutional neural network model; the sample selection for 2018 (new batch) 5%, 10%, 15%, 20% are used for model update, and 80% are used for testing model update performance.
如图2所示步骤,上述实施例过程具体如下:Steps as shown in Figure 2, the above-mentioned embodiment process is specifically as follows:
1)构建深度学习模型,该实施例中使用卷积神经网络模型,如图1所示,该模型包括依次连接的三个卷积层、一个拉伸层、两个全连接层和一个输出层。1) build deep learning model, use convolutional neural network model in this embodiment, as shown in Figure 1, this model comprises three convolutional layers, a stretching layer, two fully connected layers and an output layer connected successively .
2)将2017年的训练集数据和已知的糖度含量输入到模型中。2) Input the training set data in 2017 and the known sugar content into the model.
3)使用Adam优化器结合随机梯度下降算法训练模型的权重,并且优化神经网络模型的超参数,三个卷积层中的卷积核大小分别为5,7,3,步长分别为5,3,1,两个全连接层的神经元个数均为16,随机失活率为0.2,批大小为32,学习率为0.001,正则化系数为0.05等。3) Use the Adam optimizer combined with the stochastic gradient descent algorithm to train the weight of the model, and optimize the hyperparameters of the neural network model. The convolution kernel sizes in the three convolution layers are 5, 7, and 3 respectively, and the step size is 5, respectively. 3, 1, the number of neurons in both fully connected layers is 16, the random deactivation rate is 0.2, the batch size is 32, the learning rate is 0.001, and the regularization coefficient is 0.05, etc.
4)将该2017年数据所训练的卷积神经网络模型的最优权重保存,并固定网络结构的超参数和卷积层的权重;4) Save the optimal weight of the convolutional neural network model trained by the 2017 data, and fix the hyperparameters of the network structure and the weight of the convolutional layer;
5)将2018年少量样本输入到该模型中,使用随机梯度下降算法微调全连接层的中的权重参数。使用5%,10%,15%,20%样本量进行更新后分别得到四个更新后的模型,并保存各更新后模型的最优权重。5) Input a small number of samples in 2018 into the model, and use the stochastic gradient descent algorithm to fine-tune the weight parameters in the fully connected layer. Use 5%, 10%, 15%, and 20% sample sizes to update and obtain four updated models respectively, and save the optimal weights of each updated model.
6)将2018年80%的测试样本的光谱数据分别输入以上四个更新后的模型中,输出糖度含量的预测值。6) Input the spectral data of 80% of the test samples in 2018 into the above four updated models respectively, and output the predicted value of sugar content.
7)使用5%,10%,15%,20%样本量进行测试:如图4所示,采用本发明模型微调的方法,得到的预测集RMSEP分别为0.481,0.477,0.476,0.407;使用全局模型方法,所得到的预测集RMSEP分别为0.516,0.499,0.501,0.448;使用斜率/偏差校正方法,所得到的预测集RMSEP分别为0.621,0.554,0.566,0.549;使用重新建模方法,所得到的预测集RMSEP分别为0.843,0.538,0.737,0.530。7) Use 5%, 10%, 15%, and 20% sample sizes for testing: as shown in Figure 4, using the method of fine-tuning the model of the present invention, the obtained prediction sets RMSEP are 0.481, 0.477, 0.476, and 0.407 respectively; using the global Model method, the obtained prediction set RMSEP is 0.516, 0.499, 0.501, 0.448 respectively; using the slope/bias correction method, the obtained prediction set RMSEP is 0.621, 0.554, 0.566, 0.549 respectively; using the remodeling method, the obtained The RMSEP of the prediction set are 0.843, 0.538, 0.737, 0.530 respectively.
通过比较看出,本发明方法在不同批次间的水果光谱模型更新中优于三种方法,可以提高水果糖度预测的精度。该方法在不同的样本量下具有较好的可靠性,有更加广泛的应用前景。It can be seen from the comparison that the method of the present invention is superior to the three methods in updating the fruit spectral model between different batches, and can improve the accuracy of fruit sugar content prediction. This method has good reliability under different sample sizes and has wider application prospects.

Claims (7)

  1. 一种深度学习水果光谱分析模型更新方法,其特征在于,包含如下步骤:A method for updating a deep learning fruit spectrum analysis model, characterized in that it comprises the following steps:
    步骤1)采用历史批次的水果光谱数据作为样本集,样本集对应的水果品质变量值作为标签集;构建深度学习水果光谱分析模型,将样本集作为输入,标签集作为输出,对深度学习水果光谱分析模型进行训练,通过梯度下降算法和超参数优化方法,得到初始深度学习水果光谱分析模型及其模型权重;Step 1) Use historical batches of fruit spectral data as the sample set, and the fruit quality variable values corresponding to the sample set as the label set; construct a deep learning fruit spectral analysis model, use the sample set as input, and the label set as output, and use the deep learning fruit The spectral analysis model is trained, and the initial deep learning fruit spectral analysis model and its model weight are obtained through the gradient descent algorithm and the hyperparameter optimization method;
    步骤2)预测新批次水果的品质变量值:Step 2) Predict the quality variable value of the new batch of fruit:
    2.1)从新批次水果总样本中选取少量代表性样本,采集代表性水果样本的光谱数据及其对应的水果品质变量值作为训练集,将其输入步骤1)得到的初始深度学习水果光谱分析模型中,固定模型中权重冻结层的权重,对模型进行重新训练完成权重可变层的权重微调,从而得到适用于新批次水果品质变量预测的更新后的深度学习水果光谱分析模型;2.1) Select a small number of representative samples from the new batch of total fruit samples, collect the spectral data of representative fruit samples and their corresponding fruit quality variable values as a training set, and input it into the initial deep learning fruit spectral analysis model obtained in step 1) Among them, the weight of the weight freezing layer in the model is fixed, and the model is retrained to complete the weight fine-tuning of the weight variable layer, so as to obtain an updated deep learning fruit spectral analysis model suitable for the prediction of the new batch of fruit quality variables;
    2.2)采集新批次中其余的未知品质变量值的水果光谱数据,并输入步骤2.1)更新后的深度学习水果光谱分析模型中进行品质变量值预测,完成新批次的水果品质变量检测。2.2) Collect the fruit spectral data of the remaining unknown quality variable values in the new batch, and input the updated deep learning fruit spectral analysis model in step 2.1) to predict the quality variable values, and complete the detection of the new batch of fruit quality variables.
  2. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述深度神经网络光谱分析模型采用卷积神经网络模型、自编码器模型、循环神经网络模型或Transformer模型;A kind of deep learning fruit spectral analysis model update method according to claim 1, it is characterized in that, described deep neural network spectral analysis model adopts convolutional neural network model, self-encoder model, recurrent neural network model or Transformer model;
    深度学习模型的训练采用下述四种策略中的一种或多种组合:L2范数正则化、学习率衰减策略、丢失法和提前停止策略。The training of the deep learning model adopts one or more combinations of the following four strategies: L2 norm regularization, learning rate decay strategy, loss method and early stopping strategy.
  3. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述步骤1)中历史批次的水果样本为在新批次之前获得的水果样本,分别来源于不同收获年份、不同收获季节和不同产地;所述步骤2)中新批次的水果为品质变量待检测的水果。A kind of deep learning fruit spectral analysis model update method according to claim 1, it is characterized in that, the fruit sample of history batch in described step 1) is the fruit sample that obtains before new batch, respectively comes from different harvests Year, different harvest seasons and different production areas; the new batch of fruit in the step 2) is the fruit whose quality variable is to be detected.
  4. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述步骤1)和步骤2.1)中的水果品质变量值为水果的糖度、酸度、硬度中的一种品质参数值;A kind of deep learning fruit spectral analysis model update method according to claim 1, it is characterized in that, the fruit quality variable value in described step 1) and step 2.1) is a kind of quality in the sugar content of fruit, acidity, hardness parameter value;
    通过破坏性试验获取水果果汁后,分别采用糖度计和pH计对果汁进行检测得到水果的糖度和酸度;水果的硬度通过硬度计测量得到。After the fruit juice is obtained through the destructive test, the sugar content and acidity of the fruit are detected by using a sugar meter and a pH meter respectively; the hardness of the fruit is measured by a hardness meter.
  5. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述步骤2.1)中,通过Kennard-Stone方法从新批次水果总样本中选择代表性样本用于模型更新,代表性样本占新批次水果总样本的5%~20%。A kind of deep learning fruit spectral analysis model update method according to claim 1, it is characterized in that, in described step 2.1), select representative sample from new batch of fruit total samples by Kennard-Stone method for model update, Representative samples accounted for 5% to 20% of the total samples of the new batch of fruit.
  6. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述步骤2.1)中的权重冻结层和权重可变层通过下述方法优化得到:A kind of deep learning fruit spectral analysis model update method according to claim 1, is characterized in that, the weight freezing layer and weight variable layer in described step 2.1) are obtained by following method optimization:
    对于N层的深度神经网络模型,将模型中的最后1层、最后2层、…最后N-1层、N层分别作为模型中的权重可变层,模型中的其余层作为权重冻结层,从而得到N个权重可变层和权重冻结层不同的模型;For an N-layer deep neural network model, the last 1 layer, the last 2 layers, ... the last N-1 layer, and N layer in the model are respectively used as variable weight layers in the model, and the remaining layers in the model are used as weight freezing layers. Thus, N models with different weight variable layers and weight frozen layers are obtained;
    将训练集分别输入N个模型中,比较N个模型输出的预测值与真实值的误差,将误差最小的模型对应的权重冻结层和权重可变层作为优化后得到的权重冻结层和权重可变层。Input the training set into N models respectively, compare the errors between the predicted values output by the N models and the real values, and use the weight frozen layer and weight variable layer corresponding to the model with the smallest error as the weight frozen layer and weight variable layer obtained after optimization. Change layers.
  7. 根据权利要求1所述的一种深度学习水果光谱分析模型更新方法,其特征在于,所述步骤2.1)中采用梯度下降算法对权重可变层的权重进行微调。A kind of deep learning fruit spectral analysis model update method according to claim 1, is characterized in that, adopts gradient descent algorithm to fine-tune the weight of weight variable layer in described step 2.1).
PCT/CN2021/132651 2021-11-02 2021-11-24 Deep learning-based method for updating spectral analysis model for fruit WO2023077569A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111288042.6 2021-11-02
CN202111288042.6A CN114002167A (en) 2021-11-02 2021-11-02 Method for updating fruit spectral analysis model through deep learning

Publications (1)

Publication Number Publication Date
WO2023077569A1 true WO2023077569A1 (en) 2023-05-11

Family

ID=79926429

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132651 WO2023077569A1 (en) 2021-11-02 2021-11-24 Deep learning-based method for updating spectral analysis model for fruit

Country Status (2)

Country Link
CN (1) CN114002167A (en)
WO (1) WO2023077569A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077450A (en) * 2021-04-12 2021-07-06 大连大学 Cherry grading detection method and system based on deep convolutional neural network

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023204029A1 (en) * 2022-04-21 2023-10-26 パナソニックIpマネジメント株式会社 Information processing method, information processing system, and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106841103A (en) * 2017-03-01 2017-06-13 沈阳农业大学 Near infrared spectrum detects fruit internal quality method and dedicated test system
CN110320162A (en) * 2019-05-20 2019-10-11 广东省智能制造研究所 A kind of semi-supervised high-spectral data quantitative analysis method based on generation confrontation network
CN110736707A (en) * 2019-09-16 2020-01-31 浙江大学 Spectrum detection optimization method for spectrum model transfer from master instruments to slave instruments
CN111968080A (en) * 2020-07-21 2020-11-20 山东农业大学 Hyperspectrum and deep learning-based method for detecting internal and external quality of Feicheng peaches
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596123A (en) * 2018-04-28 2018-09-28 山东师范大学 A kind of fruit hardness detection method and device based on hyperspectral analysis
CN108760668B (en) * 2018-06-01 2019-10-29 南京林业大学 Pinus massoniana Seedlings root moisture method for fast measuring based on weighting autocoder
CN109493287B (en) * 2018-10-10 2022-03-15 浙江大学 Deep learning-based quantitative spectral data analysis processing method
CN110705372B (en) * 2019-09-10 2023-05-05 中国科学院上海技术物理研究所 LIBS multicomponent quantitative inversion method based on deep learning convolutional neural network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106841103A (en) * 2017-03-01 2017-06-13 沈阳农业大学 Near infrared spectrum detects fruit internal quality method and dedicated test system
CN110320162A (en) * 2019-05-20 2019-10-11 广东省智能制造研究所 A kind of semi-supervised high-spectral data quantitative analysis method based on generation confrontation network
WO2021033033A1 (en) * 2019-08-22 2021-02-25 Foss Analytical A/S Determining physicochemical properties of a sample
CN110736707A (en) * 2019-09-16 2020-01-31 浙江大学 Spectrum detection optimization method for spectrum model transfer from master instruments to slave instruments
CN111968080A (en) * 2020-07-21 2020-11-20 山东农业大学 Hyperspectrum and deep learning-based method for detecting internal and external quality of Feicheng peaches
CN113030001A (en) * 2021-03-19 2021-06-25 北京农业智能装备技术研究中心 Fruit sugar degree detection method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077450A (en) * 2021-04-12 2021-07-06 大连大学 Cherry grading detection method and system based on deep convolutional neural network

Also Published As

Publication number Publication date
CN114002167A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
Walsh et al. The uses of near infra-red spectroscopy in postharvest decision support: A review
WO2023077569A1 (en) Deep learning-based method for updating spectral analysis model for fruit
CN102788752B (en) Non-destructive detection device and method of internal information of crops based on spectrum technology
CN108304970B (en) Method and system for rapidly predicting storage period of apples and controlled atmosphere storage monitoring system
CN105675539B (en) A kind of quality of agricultural product integrated evaluating method
CN105527244A (en) Near infrared spectrum-based Hanfu apple quality nondestructive test method
Liu et al. A method combining ELM and PLSR (ELM-P) for estimating chlorophyll content in rice with feature bands extracted by an improved ant colony optimization algorithm
CN111855591A (en) Rice overground part carbon-nitrogen ratio remote sensing inversion model and method
Matteoli et al. A spectroscopy-based approach for automated nondestructive maturity grading of peach fruits
Cruz et al. Nondestructive simultaneous prediction of internal browning disorder and quality attributes in ‘Rocha’pear (Pyrus communis L.) using VIS-NIR spectroscopy
CN108038517A (en) Based on the maize leaf disease recognition method for improving convolutional neural networks MODEL C ifar10
CN111829965A (en) Remote sensing inversion model and method for starch accumulation amount of rice overground part
CN110428121A (en) Hidden Markov model food quality appraisal procedure based on grey correlation analysis
CN110569605A (en) Non-glutinous rice leaf nitrogen content inversion model method based on NSGA2-ELM
CN111855593A (en) Remote sensing inversion model and method for starch content of rice leaf
CN115812634A (en) Pre-incubation hatching egg fertilization information nondestructive sorting method and device
Niu et al. Effects of harvest maturity and storage time on storage quality of Korla fragrant pear based on GRNN and ANFIS models: Part I Firmness study
CN113049499A (en) Indirect remote sensing inversion method for water total nitrogen concentration, storage medium and terminal equipment
CN111855592A (en) Remote sensing inversion model and method for upper dry matter weight in unit area of rice
Yang et al. A deep learning approach to improving spectral analysis of fruit quality under interseason variation
CN109145685A (en) Fruits and vegetables EO-1 hyperion quality detecting method based on integrated study
CN113537645B (en) Soybean yield prediction method based on machine learning fusion satellite and weather data
Qi et al. Rapid and non-destructive determination of soluble solid content of crown pear by visible/near-infrared spectroscopy with deep learning regression
Kumar et al. A Novel Zero-Shot Learning Approach for Multi-Classification of Orange Sooty Mold Disease Severity Levels
Hong et al. Nondestructive prediction of rice seed viability using spectral and spatial information modeling of visible–near infrared hyperspectral images

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21963077

Country of ref document: EP

Kind code of ref document: A1