CN114062305B - Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network - Google Patents

Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network Download PDF

Info

Publication number
CN114062305B
CN114062305B CN202111204576.6A CN202111204576A CN114062305B CN 114062305 B CN114062305 B CN 114062305B CN 202111204576 A CN202111204576 A CN 202111204576A CN 114062305 B CN114062305 B CN 114062305B
Authority
CN
China
Prior art keywords
near infrared
infrared spectrum
resnet network
data
network model
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
CN202111204576.6A
Other languages
Chinese (zh)
Other versions
CN114062305A (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.)
Hefei Institutes of Physical Science of CAS
Original Assignee
Hefei Institutes of Physical Science of CAS
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 Hefei Institutes of Physical Science of CAS filed Critical Hefei Institutes of Physical Science of CAS
Priority to CN202111204576.6A priority Critical patent/CN114062305B/en
Publication of CN114062305A publication Critical patent/CN114062305A/en
Application granted granted Critical
Publication of CN114062305B publication Critical patent/CN114062305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • 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/84Systems specially adapted for particular applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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
    • 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/84Systems specially adapted for particular applications
    • G01N2021/8466Investigation of vegetal material, e.g. leaves, plants, fruits

Landscapes

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

Abstract

A single seed variety identification method and system based on near infrared spectrum and 1D-In-Resnet network belongs to the technical field of crop authenticity identification, and solves the problems of complex, time-consuming and low precision of the single seed variety identification method In the prior art; obtaining near infrared spectrum of single crop seed to be identified; carrying out normalization pretreatment on the near infrared spectrum data; training the constructed 1D-In-Resnet network model by utilizing the near infrared spectrum; carrying out variety authenticity identification on the single grain spectrum of the crop to be classified through the trained 1D-In-Resnet network model to obtain a variety authenticity prediction result; the method can realize rapid and accurate discrimination of the authenticity of a plurality of crop varieties simultaneously, extracts the characteristics of different scales through the multi-branch convolution layer, and improves the accuracy of identifying the authenticity of the crop seeds of the varieties simultaneously by the model.

Description

Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network
Technical Field
The invention belongs to the technical field of crop authenticity identification, and relates to a single seed variety identification method and system based on near infrared spectrum and a 1D-In-Resnet network.
Background
Rice, wheat and corn are the main food crops in china. Varieties greatly affect the quality and yield of seeds and processed products of these crops. The number of rice varieties is thousands, wheat and corn varieties in the current market is numerous, the phenomenon of false adulteration occurs when the rice varieties are secondary, the quality safety of processed seeds produced by practitioners in related seed industries is damaged, and meanwhile, the grain safety in the downstream grain industry and the formation of good market order according to quality arguments are also not facilitated. In order to ensure the quality safety of seeds and grains, the formation of a good market price-based mechanism is guided, and the method is necessary for variety identification of crop seeds. However, conventional crop variety authenticity identification technologies such as methods of DNA molecular identification, isozyme identification, field identification and the like have the defects of complex operation, time-consuming detection results, sample damage, environmental pollution and hysteresis of detection results, and particularly, when a plurality of samples to be detected are more and multiple varieties are required to be distinguished simultaneously, the methods have huge workload. The large number of common rice varieties existing in the market brings difficulty to the quality control during the breeding and planting of representative high-quality rice varieties. Therefore, there is a need to develop new analytical techniques that are accurate, do not damage the sample, and can efficiently identify a large number of rice varieties at the same time.
At present, the near infrared spectrum technology is used as an emerging material component detection technology, and has the characteristics of rapidness, no damage, high sensitivity and the like. The organic components of the detection product are adopted as the principle, and the organic components among the conventional rice seeds, the wheat seeds and the corn seeds of different varieties are different in degree, so that the variety authenticity judgment of the crop seeds based on near infrared is feasible. Document Innovative and rapid analysis for rice authenticity using hand-held NIRspectrometry and chemometrics, publication No. 2019, month 2, discloses the use of a hand-held spectrometer for the authenticity verification of rice in 3 different producing areas. The publication "rice variety discrimination based on near infrared Spectrum and SIMCA and PLS-DA" of publication date 2018 discloses discrimination of 4 rice varieties by near infrared Spectroscopy in combination with SIMCA and partial least squares discriminant analysis (PLS-DA), respectively.
However, previous studies are mainly based on discrimination of few varieties, and there are few reports of simultaneous accurate spectrum discrimination of more varieties. Therefore, to meet the need of the seed and grain industries to identify variety authenticity of a large number of crops at the same time, there is also a need to develop new and more efficient analysis algorithms suitable for resolving spectral big data. Due to the rapid development of computer technology and machine learning technology, convolutional neural networks have been increasingly applied to near infrared spectrum analysis as an effective deep learning algorithm, so that simultaneous discrimination of the authenticity of a plurality of crop varieties based on near infrared spectrum big data is possible. On the basis, by further optimizing the network structure and parameters, the identification accuracy is improved, meanwhile, more varieties can be simultaneously identified than those reported by the former, and the method has wider application prospect.
Disclosure of Invention
The invention aims at designing a single seed variety identification method and a system based on a near infrared spectrum and a 1D-In-Resnet network so as to solve the problems of complex, time-consuming and low precision of the single seed variety identification method In the prior art.
The invention solves the technical problems through the following technical scheme:
the single grain variety identification method based on the near infrared spectrum and the 1D-In-Resnet network comprises the following steps:
acquiring a near infrared spectrum of a single seed of a crop to be identified, and carrying out normalization pretreatment on near infrared spectrum data;
constructing a 1D-In-Resnet network model, wherein the 1D-In-Resnet network model comprises the following steps: the system comprises an input layer, a convolution layer, a pooling layer, 3 full-connection layers and an output layer, wherein the convolution layer comprises 2 branches, a first branch is 1 convolution layer, a second branch is 2 convolution layers, BN regularization is added behind each convolution layer, outputs of the two branches are combined through a Relu activation function, output results are added with original data, the original data are flattened after pooling to the maximum extent, the full-connection layers are input, the total number of the full-connection layers is 3, the number of nodes of each layer is selected to be between 0 and 1000, and finally classification results are output;
training a 1D-In-Resnet network model by utilizing a near infrared spectrum;
and carrying out authenticity prediction and identification on the single grain spectrum to be identified by using the trained 1D-In-Resnet network model to obtain an authenticity prediction result.
According to the technical scheme, near infrared spectrums of single crop seeds to be identified are obtained; carrying out normalization pretreatment on the near infrared spectrum data; training the constructed 1D-In-Resnet network model by utilizing the near infrared spectrum; carrying out variety authenticity identification on the single grain spectrum of the crop to be classified through the trained 1D-In-Resnet network model to obtain a variety authenticity prediction result; the method can realize rapid and accurate discrimination of the authenticity of a plurality of crop varieties simultaneously, extracts the characteristics of different scales through the multi-branch convolution layer, and improves the accuracy of identifying the authenticity of the crop seeds of the varieties simultaneously by the model.
As a further improvement of the technical scheme of the invention, the method for carrying out normalization pretreatment on the near infrared spectrum data comprises the following steps:
preprocessing input near infrared spectrum data, adopting Z-score standardization, calculating the mean value and standard deviation of each column of data of a data set, carrying out data standardization based on the mean value and standard deviation of original data, and calculating the new data= (original data-mean value)/standard deviation by the following calculation formulas:
(1)
(2)
wherein,is->No. H of individual cultivars>Data of strip spectra>For the number of varieties, ->For mean value->Is the standard deviation.
As a further improvement of the technical scheme of the invention, the method for training the 1D-In-Resnet network model by utilizing the near infrared spectrum comprises the following steps: and (3) carrying out initial normalization processing on the data set before each training, adopting a random gradient descent algorithm In the training of the 1D-In-Resnet network model, and learning the parameters of the established convolutional neural network by continuously reducing the function value of the loss function, so that the training is finished when the iteration number reaches 500 epoch.
As a further improvement of the technical scheme of the invention, the formula of the loss function is as follows:
(3)
wherein,is->True value of individual samples->Is->Predicted values for each sample.
As a further improvement of the technical scheme of the invention, the random gradient descent method specifically comprises the following steps: the sample is used for learning parameters and updating in each iteration, and the formulas of the learning parameters and updating of each generation are as follows:
(4)
(5)
where t is the number of iterations,is->Parameters of the time update->For the model parameters at time t, +.>For learning rate->As a cost function->Representing a randomly selected one of the gradient directions.
A single grain variety identification system based on near infrared spectroscopy and 1D-In-reset network, comprising: the system comprises a near infrared spectrum acquisition and normalization processing module, a network model construction module and a network model training and prediction module;
the near infrared spectrum acquisition and normalization processing module is used for acquiring the near infrared spectrum of the single crop grain to be identified and performing normalization pretreatment on near infrared spectrum data;
the network model construction module is used for constructing a 1D-In-Resnet network model, and the 1D-In-Resnet network model comprises: the system comprises an input layer, a convolution layer, a pooling layer, 3 full-connection layers and an output layer, wherein the convolution layer comprises 2 branches, a first branch is 1 convolution layer, a second branch is 2 convolution layers, BN regularization is added behind each convolution layer, outputs of the two branches are combined through a Relu activation function, output results are added with original data, the original data are flattened after pooling to the maximum extent, the full-connection layers are input, the total number of the full-connection layers is 3, the number of nodes of each layer is selected to be between 0 and 1000, and finally classification results are output;
the network model training and predicting module is used for training the 1D-In-Resnet network model by utilizing the near infrared spectrum, and carrying out authenticity prediction recognition on the single grain spectrum to be identified by utilizing the trained 1D-In-Resnet network model to obtain an authenticity prediction result.
As a further improvement of the technical scheme of the invention, the method for carrying out normalization pretreatment on the near infrared spectrum data comprises the following steps:
preprocessing input near infrared spectrum data, adopting Z-score standardization, calculating the mean value and standard deviation of each column of data of a data set, carrying out data standardization based on the mean value and standard deviation of original data, and calculating the new data= (original data-mean value)/standard deviation by the following calculation formulas:
(1)
(2)
wherein,is->No. H of individual cultivars>Data of strip spectra>For the number of varieties, ->For mean value->Is the standard deviation.
As a further improvement of the technical scheme of the invention, the method for training the 1D-In-Resnet network model by utilizing the near infrared spectrum comprises the following steps: and (3) carrying out initial normalization processing on the data set before each training, adopting a random gradient descent algorithm In the training of the 1D-In-Resnet network model, and learning the parameters of the established convolutional neural network by continuously reducing the function value of the loss function, so that the training is finished when the iteration number reaches 500 epoch.
As a further improvement of the technical scheme of the invention, the formula of the loss function is as follows:
(3)
wherein,is->True value of individual samples->Is->Predicted values for each sample.
As a further improvement of the technical scheme of the invention, the random gradient descent method specifically comprises the following steps: the sample is used for learning parameters and updating in each iteration, and the formulas of the learning parameters and updating of each generation are as follows:
(4)
(5)
where t is the number of iterations,is->Parameters of the time update->For the model parameters at time t, +.>For learning rate->As a cost function->Representing a randomly selected one of the gradient directions.
The invention has the advantages that:
(1) According to the technical scheme, near infrared spectrums of single crop seeds to be identified are obtained; carrying out normalization pretreatment on the near infrared spectrum data; training the constructed 1D-In-Resnet network model by utilizing the near infrared spectrum; carrying out variety authenticity identification on the single grain spectrum of the crop to be classified through the trained 1D-In-Resnet network model to obtain a variety authenticity prediction result; the method can realize rapid and accurate discrimination of the authenticity of a plurality of crop varieties simultaneously, extracts the characteristics of different scales through the multi-branch convolution layer, and improves the accuracy of identifying the authenticity of the crop seeds of the varieties simultaneously by the model.
(2) The invention provides a 1D-In-Resnet network model which takes an acceptance network as an infrastructure, and is different from the acceptance network In that the model removes two branches of 1X 1 convolution and maxpooling In the acceptance network, because the two branches are used for fusing multi-channel information, and the number of spectrum data channels is 1, so that the complexity of the model is reduced. Meanwhile, in order to improve the training speed of the model, residual error elements in a Resnet network are added, and the combined result is added with the original input, so that the information loss is reduced, the prediction accuracy of the model is improved, and more accurate variety authenticity judgment is facilitated.
Drawings
FIG. 1 is a flow chart of a single grain variety identification method based on near infrared spectrum and 1D-In-Resnet network according to an embodiment of the invention;
FIG. 2 is a near infrared spectrum of rice grain according to the first embodiment of the present invention;
FIG. 3 is a diagram of a 1D-In-reset network architecture according to a first embodiment of the present invention;
fig. 4 is a confusion matrix thermodynamic diagram of spectrum discrimination results of 24 wheat varieties according to the first embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are 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.
The technical scheme of the invention is further described below with reference to the attached drawings and specific embodiments:
example 1
As shown In fig. 1, the single grain variety identification method based on the near infrared spectrum and the 1D-In-Resnet network comprises the following steps:
1. acquiring a near infrared spectrum of a single seed of a crop to be identified;
the crop single seed to be identified is rice, wheat and corn single seed or progeny thereof, wherein the rice variety is conventional rice variety.
In the following, a detailed description will be given of taking wheat as an example, and Shan Zi samples of the wheat with known, full and mature varieties are collected, and 100 seeds are adopted as detection objects for each variety, and spectrum acquisition is performed in a near-infrared high-flux spectrum acquisition system. The acquisition range of the spectrometer is 1100-2500nm, and the acquisition gate width is 1ms. A spectrum was collected for each seed. A total of 2400 pieces of wheat near infrared spectrum data were obtained. 80% of each variety was randomly taken as training set and 20% as test set. The training set is used for constructing a model, and the testing set is used for verifying the prediction effect of the model. Near infrared spectra collected in the near infrared high flux spectrum collection system for 24 varieties of wheat samples are shown in fig. 2.
2. The method for carrying out normalization pretreatment on the near infrared spectrum data specifically comprises the following steps:
preprocessing the input spectrum data, adopting Z-score standardization, solving the mean value and standard deviation of each column of data of the data set, carrying out data standardization based on the mean value and standard deviation of the original data, and calculating the new data= (original data-mean value)/standard deviation by the following calculation formulas:
(1)
(2)
wherein,is->No. H of individual cultivars>Data of strip spectra>For the number of varieties, ->For mean value->Is the standard deviation.
3. Construction of 1D-In-Resnet network model
The construction of the 1D-In-Resnet network model comprises the following steps: the device comprises an input layer, a convolution layer, a pooling layer, 3 full-connection layers and an output layer, wherein the convolution layer is 2 branches, the first branch is 1 multiplied by 5 multiplied by 8 convolution layers, the second branch is 2 multiplied by 1 multiplied by 5 multiplied by 8 convolution layers, BN regularization is added behind each convolution layer, outputs of the two branches are combined (localization) through a Relu activation function, an output result is added (Add) with original data, and the output result is flattened after being subjected to maximum pooling of 1 multiplied by 2 (s=1), and the output result is input into the full-connection layer. The total connection layers are 3 layers, the parameters are 500, 250 and 250 respectively, and finally the classification result is output.
As shown In fig. 3, the 1D-In-reset network model is based on an acceptance network, and is different from the acceptance network In that the model removes two branches of 1×1 convolution and maxpooling In the acceptance network, because the two branches are used for fusing multi-channel information, and the number of spectrum data channels is 1, so as to reduce the complexity of the model. Meanwhile, in order to improve the accuracy of the model, residual error elements in a Resnet network are added, and the combination result is added with the original input.
4. Training the constructed 1D-In-Resnet network model by utilizing the near infrared spectrum, and specifically comprising the following steps of:
carrying out initial normalization processing on the data set before each training, adopting a random gradient descent algorithm In the training of the 1D-In-Resnet network model, and learning the parameters of the established convolutional neural network by continuously reducing the function value of the loss function, so that the training is finished when the iteration number reaches 500 epoch;
wherein the loss functionlossThe expression formula is as follows:
(3)
wherein,is->True value of individual samples->Is->Predicted values for each sample.
The random gradient descent method adopted in the convolutional neural network model training refers to that the sample is used for learning parameters and updating in each iteration, and the learning parameters and updating of each generation can be expressed as formulas (4) and (5):
(4)
(5)
where t is the number of iterations,is->Parameters of the time update->For the model parameters at time t, +.>For learning rate->As a cost function->Representing a randomly selected one of the gradient directions.
5. And carrying out authenticity prediction recognition on the single grain spectrum of the crop to be identified by using the trained 1D-In-Resnet network model to obtain a crop authenticity prediction result. During prediction, the spectra of crop seeds to be detected are collected under the same conditions as in the step 1, the spectra are preprocessed by the method in the step 2, and the preprocessed spectra are predicted by the model constructed in the step 3-4, so that the category attribution of the samples is obtained.
And predicting a test set sample by using the constructed 1D-In-resnet model to verify the identification effect of the model. The collection condition, pretreatment method and training set of the test set sample are the same.
In contrast, the present invention uses a conventional machine learning algorithm: the 1D-CNN network, the 1D-acceptance network and the traditional PLS-DA algorithm are used as comparison construction models to predict test set samples. Table 1 shows the parameter distributions of three neural network models.
Table 1 three neural network model parameter distributions
And comparing the predicted values and the true values of the varieties of the three model prediction test sets, and evaluating the recognition performance of the model.
The recognition performance of the model is evaluated by Accuracy (ACC), precision (PRE), recall (REC) and F1 scores, and the calculation formula is as follows:
the Accuracy (ACC) calculation formula is:
(6)
the Precision (PRE) calculation formula is:
(7)
the Recall (REC) calculation formula is:
(8)
the calculation formula is as follows:
(9)
wherein,the number of seeds correctly judged by the model for the target variety; />Misjudging the seeds of the target variety as the number of the seeds of the non-target variety by the model; />Misjudging the seeds of the non-target variety as the number of the seeds of the target variety by the model;TNthe number of seeds correctly judged by the model for the non-target variety; the F1 score is the harmonic mean between accuracy and recall.
Each network was trained 10 times, the average was taken and the predicted results are shown in table 2. As can be seen from Table 2, the 1D-In-reset network has higher accuracy than the crop authenticity identification of other network architectures, the accuracy is 95.35%, the accuracy is improved by 0.33% compared with 1D-acceptance, the accuracy is improved by 0.89% compared with 1D-CNN, and the accuracy is improved by 24.83% compared with PLS-DA. The F1 parameter is 95.42%, which is the largest in the 3 networks, and the model accuracy is the highest, which proves the effectiveness of the embodiment.
TABLE 2 prediction results
As shown In fig. 4, the 1D-In-resnet model outputs a confusion matrix thermodynamic diagram of 24 wheat varieties, in which small squares on the diagonal represent the correct number of classification per sample, small squares outside the diagonal represent the incorrect number of classification, and darker colors on the diagonal represent the more correct number of classification, with the maximum value of 20 per small square color and the minimum value of 0. In fig. 4, there are 11 categories (1,3,7,12,13,14,15,16,19, 20, 21) with classification accuracy of 100%,8 categories (0,4,5,6,9,10,17,22) with classification accuracy of 95%,3 categories (2,11,23) with classification accuracy of 90%, and 2 categories (8, 18) with classification accuracy of 80%.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The single grain variety identification method based on the near infrared spectrum and the 1D-In-Resnet network is characterized by comprising the following steps of:
acquiring near infrared spectrum of a single seed of a crop to be identified, and carrying out normalization pretreatment on near infrared spectrum data, wherein the method comprises the following steps: preprocessing input near infrared spectrum data, adopting Z-score standardization, solving the mean value and standard deviation of each column of data of a data set, and carrying out data standardization based on the mean value and standard deviation of original data, wherein new data= (original data-mean value)/standard deviation;
constructing a 1D-In-Resnet network model, wherein the 1D-In-Resnet network model takes an acceptance network as an infrastructure, two branches of 1X 1 convolution and maxpooling In the acceptance network are removed, residual elements In the Resnet network are added, and a merging result is added with an original input; the 1D-In-Resnet network model comprises: the system comprises an input layer, a convolution layer, a pooling layer, 3 full-connection layers and an output layer, wherein the convolution layer comprises 2 branches, a first branch is 1 convolution layer, a second branch is 2 convolution layers, BN regularization is added behind each convolution layer, outputs of the two branches are combined through a Relu activation function, output results are added with original data, the original data are flattened after pooling to the maximum extent, the full-connection layers are input, the total number of the full-connection layers is 3, parameters of each layer are selected to be between 0 and 1000, and finally classification results are output;
training a 1D-In-Resnet network model by utilizing near infrared spectrum, wherein the method comprises the following steps: carrying out initial normalization processing on the data set before each training, adopting a random gradient descent method In the training of the 1D-In-Resnet network model, and learning the parameters of the established convolutional neural network by continuously reducing the function value of the loss function, so that the training is finished when the iteration number reaches 500 epoch;
and carrying out authenticity prediction and identification on the single grain spectrum to be identified by using the trained 1D-In-Resnet network model to obtain an authenticity prediction result.
2. The method for identifying single grain varieties based on near infrared spectrum and 1D-In-Resnet network according to claim 1, wherein the calculation formulas of the mean and standard deviation are as follows:
(1)
(2)
wherein,is->No. H of individual cultivars>Data of strip spectra>For the number of varieties, ->For mean value->Is the standard deviation.
3. The method for identifying single grain varieties based on near infrared spectrum and 1D-In-Resnet network according to claim 2, wherein the formula of the loss function is as follows:
(3)
wherein,is->True value of individual samples->Is->Predicted values for each sample.
4. The method for identifying single grain varieties based on near infrared spectrum and 1D-In-Resnet network according to claim 3, wherein the random gradient descent method is specifically: the sample is used for learning parameters and updating in each iteration, and the formulas of the learning parameters and updating of each generation are as follows:
(4)
(5)
where t is the number of iterations,is->Parameters of the time update->For the model parameters at time t, +.>In order for the rate of learning to be high,as a cost function->Representing a randomly selected one of the gradient directions.
5. A single grain variety identification system based on near infrared spectroscopy and 1D-In-reset network, comprising: the system comprises a near infrared spectrum acquisition and normalization processing module, a network model construction module and a network model training and prediction module;
the near infrared spectrum acquisition and normalization processing module is used for acquiring the near infrared spectrum of the single grain of the crop to be identified and carrying out normalization pretreatment on near infrared spectrum data, and the method comprises the following steps: preprocessing input near infrared spectrum data, adopting Z-score standardization, solving the mean value and standard deviation of each column of data of a data set, and carrying out data standardization based on the mean value and standard deviation of original data, wherein new data= (original data-mean value)/standard deviation;
the network model construction module is used for constructing a 1D-In-Resnet network model, the 1D-In-Resnet network model takes an acceptance network as an infrastructure, two branches of 1X 1 convolution and maxpooling In the acceptance network are removed, residual error elements In the Resnet network are added, and the combination result is added with the original input; the 1D-In-Resnet network model comprises: the system comprises an input layer, a convolution layer, a pooling layer, 3 full-connection layers and an output layer, wherein the convolution layer is 2 branches, the first branch is 1 multiplied by 5 multiplied by 8 convolution layers, the second branch is 2 multiplied by 1 multiplied by 5 multiplied by 8 convolution layers, BN regularization is added behind each convolution layer, outputs of the two branches are combined through a Relu activation function, an output result is added with original data, and then the obtained result is flattened after maximum pooling, 3 layers of full-connection layers are input, the parameters are 500, 250 and 250 respectively, and finally classification results are output;
the network model training and predicting module is used for training the 1D-In-Resnet network model by utilizing the near infrared spectrum, and carrying out authenticity prediction recognition on the single grain spectrum to be identified by utilizing the trained 1D-In-Resnet network model to obtain an authenticity prediction result;
the method for training the 1D-In-Resnet network model by utilizing the near infrared spectrum comprises the following steps of: and (3) carrying out initial normalization processing on the data set before each training, adopting a random gradient descent method In the training of the 1D-In-Resnet network model, and learning the parameters of the established convolutional neural network by continuously reducing the function value of the loss function, so that the training is finished when the iteration number reaches 500 epoch.
6. The system for single grain variety identification based on near infrared spectrum and 1D-In-Resnet network according to claim 5, wherein the mean and standard deviation calculation formula is as follows:
(1)
(2)
wherein,is->No. H of individual cultivars>Data of strip spectra>For the number of varieties, ->For mean value->Is the standard deviation.
7. The system for single grain variety identification based on near infrared spectrum and 1D-In-Resnet network of claim 6, wherein the formula of the loss function is as follows:
(3)
wherein,is->True value of individual samples->Is->Predicted values for each sample.
8. The single grain variety identification system based on near infrared spectrum and 1D-In-Resnet network of claim 7, wherein the random gradient descent method is specifically: the sample is used for learning parameters and updating in each iteration, and the formulas of the learning parameters and updating of each generation are as follows:
(4)
(5)
where t is the number of iterations,is->Parameters of the time update->For the model parameters at time t, +.>In order for the rate of learning to be high,as a cost function->Representing a randomly selected one of the gradient directions.
CN202111204576.6A 2021-10-15 2021-10-15 Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network Active CN114062305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111204576.6A CN114062305B (en) 2021-10-15 2021-10-15 Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111204576.6A CN114062305B (en) 2021-10-15 2021-10-15 Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network

Publications (2)

Publication Number Publication Date
CN114062305A CN114062305A (en) 2022-02-18
CN114062305B true CN114062305B (en) 2024-01-26

Family

ID=80234741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111204576.6A Active CN114062305B (en) 2021-10-15 2021-10-15 Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network

Country Status (1)

Country Link
CN (1) CN114062305B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114778485B (en) * 2022-06-16 2022-09-06 中化现代农业有限公司 Variety identification method and system based on near infrared spectrum and attention mechanism network

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102179375A (en) * 2011-03-09 2011-09-14 中国科学院合肥物质科学研究院 Nondestructive detecting and screening method based on near-infrared for crop single-grain components
KR20170055753A (en) * 2015-11-12 2017-05-22 대한민국(농촌진흥청장) Method for discriminating the cultivar of forage seeds using near-infrared spectroscopy
CN107037001A (en) * 2017-06-15 2017-08-11 中国科学院半导体研究所 A kind of corn monoploid seed discrimination method based on near-infrared spectrum technique
CN107478598A (en) * 2017-09-01 2017-12-15 广东省智能制造研究所 A kind of near-infrared spectral analytical method based on one-dimensional convolutional neural networks
CN109064462A (en) * 2018-08-06 2018-12-21 长沙理工大学 A kind of detection method of surface flaw of steel rail based on deep learning
CN109253983A (en) * 2018-11-30 2019-01-22 上海海洋大学 The method of Rapid identification and detection parvalbumin based on middle infrared spectrum and nerual network technique
CN109470648A (en) * 2018-11-21 2019-03-15 中国科学院合肥物质科学研究院 A kind of single grain crop unsound grain quick nondestructive determination method
CN109883990A (en) * 2019-02-28 2019-06-14 吉林大学 A kind of medicinal fungi near-infrared spectral analytical method
CN110567889A (en) * 2019-09-12 2019-12-13 中国计量大学 Nondestructive testing method for water content of fresh cocoons based on spectral imaging and deep learning technology
CN110705372A (en) * 2019-09-10 2020-01-17 中国科学院上海技术物理研究所 LIBS multi-component quantitative inversion method based on deep learning convolutional neural network
CN110717368A (en) * 2018-07-13 2020-01-21 北京服装学院 Qualitative classification method for textiles
CN111220958A (en) * 2019-12-10 2020-06-02 西安宁远电子电工技术有限公司 Radar target Doppler image classification and identification method based on one-dimensional convolutional neural network
CN111507319A (en) * 2020-07-01 2020-08-07 南京信息工程大学 Crop disease identification method based on deep fusion convolution network model
CN111797930A (en) * 2020-07-07 2020-10-20 四川长虹电器股份有限公司 Fabric material near infrared spectrum identification and identification method based on twin network
CN112098361A (en) * 2020-08-20 2020-12-18 苏州浩旸华智能科技有限公司 Corn seed identification method based on near infrared spectrum
CN112924412A (en) * 2021-01-22 2021-06-08 中国科学院合肥物质科学研究院 Single-grain rice variety authenticity distinguishing method and device based on near infrared spectrum
CN113378971A (en) * 2021-06-28 2021-09-10 燕山大学 Near infrared spectrum classification model training method and system and classification method and system
CN113406030A (en) * 2021-08-04 2021-09-17 石河子大学 Hami melon pesticide residue identification method based on convolutional neural network

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102179375A (en) * 2011-03-09 2011-09-14 中国科学院合肥物质科学研究院 Nondestructive detecting and screening method based on near-infrared for crop single-grain components
KR20170055753A (en) * 2015-11-12 2017-05-22 대한민국(농촌진흥청장) Method for discriminating the cultivar of forage seeds using near-infrared spectroscopy
CN107037001A (en) * 2017-06-15 2017-08-11 中国科学院半导体研究所 A kind of corn monoploid seed discrimination method based on near-infrared spectrum technique
CN107478598A (en) * 2017-09-01 2017-12-15 广东省智能制造研究所 A kind of near-infrared spectral analytical method based on one-dimensional convolutional neural networks
CN110717368A (en) * 2018-07-13 2020-01-21 北京服装学院 Qualitative classification method for textiles
CN109064462A (en) * 2018-08-06 2018-12-21 长沙理工大学 A kind of detection method of surface flaw of steel rail based on deep learning
CN109470648A (en) * 2018-11-21 2019-03-15 中国科学院合肥物质科学研究院 A kind of single grain crop unsound grain quick nondestructive determination method
CN109253983A (en) * 2018-11-30 2019-01-22 上海海洋大学 The method of Rapid identification and detection parvalbumin based on middle infrared spectrum and nerual network technique
CN109883990A (en) * 2019-02-28 2019-06-14 吉林大学 A kind of medicinal fungi near-infrared spectral analytical method
CN110705372A (en) * 2019-09-10 2020-01-17 中国科学院上海技术物理研究所 LIBS multi-component quantitative inversion method based on deep learning convolutional neural network
CN110567889A (en) * 2019-09-12 2019-12-13 中国计量大学 Nondestructive testing method for water content of fresh cocoons based on spectral imaging and deep learning technology
CN111220958A (en) * 2019-12-10 2020-06-02 西安宁远电子电工技术有限公司 Radar target Doppler image classification and identification method based on one-dimensional convolutional neural network
CN111507319A (en) * 2020-07-01 2020-08-07 南京信息工程大学 Crop disease identification method based on deep fusion convolution network model
CN111797930A (en) * 2020-07-07 2020-10-20 四川长虹电器股份有限公司 Fabric material near infrared spectrum identification and identification method based on twin network
CN112098361A (en) * 2020-08-20 2020-12-18 苏州浩旸华智能科技有限公司 Corn seed identification method based on near infrared spectrum
CN112924412A (en) * 2021-01-22 2021-06-08 中国科学院合肥物质科学研究院 Single-grain rice variety authenticity distinguishing method and device based on near infrared spectrum
CN113378971A (en) * 2021-06-28 2021-09-10 燕山大学 Near infrared spectrum classification model training method and system and classification method and system
CN113406030A (en) * 2021-08-04 2021-09-17 石河子大学 Hami melon pesticide residue identification method based on convolutional neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Research on high-throughput crop authenticity identification method based on near-infrared spectroscopy and InResSpectra model ";Xiaohong Li 等;《Infrared Physics and Technology 》(第125期);全文 *
面向训练阶段的神经网络性能分析;李景军;张宸;曹强;;计算机科学与探索(第10期);全文 *

Also Published As

Publication number Publication date
CN114062305A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN105928901B (en) A kind of near-infrared quantitative model construction method that qualitative, quantitative combines
CN110687072B (en) Calibration set and verification set selection and modeling method based on spectral similarity
CN105630743B (en) A kind of system of selection of spectrum wave number
CN101819141B (en) Maize variety identification method based on near infrared spectrum and information processing
CN112924412B (en) Single-grain rice variety authenticity distinguishing method and device based on near infrared spectrum
CN103048273A (en) Fruit near infrared spectrum sorting method based on fuzzy clustering
CN105117734B (en) Corn seed classification hyperspectral imagery recognition methods based on model online updating
CN107679569A (en) Raman spectrum substance automatic identifying method based on adaptive hypergraph algorithm
CN102735642A (en) Method for quickly and losslessly identifying virgin olive oil and olive-residue oil
CN104374739A (en) Identification method for authenticity of varieties of seeds on basis of near-infrared quantitative analysis
CN108573105A (en) The method for building up of soil heavy metal content detection model based on depth confidence network
CN114062305B (en) Single grain variety identification method and system based on near infrared spectrum and 1D-In-Resnet network
CN109992861A (en) A kind of near infrared spectrum modeling method
CN116204831A (en) Road-to-ground analysis method based on neural network
Prasher et al. Analysis of DenseNet201 with SGD optimizer for diagnosis of multiple rice leaf diseases
CN108344701A (en) Paraffin grade qualitative classification based on hyperspectral technique and quantitative homing method
CN104990891B (en) A kind of seed near infrared spectrum and spectrum picture qualitative analysis model method for building up
CN108663334B (en) Method for searching spectral characteristic wavelength of soil nutrient based on multi-classifier fusion
CN112485238B (en) Method for identifying turmeric essential oil producing area based on Raman spectrum technology
CN114778485B (en) Variety identification method and system based on near infrared spectrum and attention mechanism network
CN113310934A (en) Method for quickly identifying milk cow milk mixed in camel milk and mixing proportion thereof
Li et al. Research on high-throughput crop authenticity identification method based on near-infrared spectroscopy and InResSpectra model
CN105974058A (en) Method for rapidly detecting potassium content of tobacco leaves based on electronic nose-artificial neural network
CN115630329A (en) Edible essence classification method based on convolutional neural network
US11525774B2 (en) Sensory evaluation method for spectral data of mainstream smoke

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