The invention discloses a rapid
nondestructive testing method and
system for the
lipid content and deterioration degree of
red pine nuts based on
hyperspectral imaging and
deep learning, and belongs to the technical field of
nondestructive testing of the quality and safety of agricultural and
forestry products. The method is provided for solving the problems that an existing method for detecting the
lipid content and the oxidation degree in the
red pine nut kernels is generally complex in operation process, high in large-batch detection cost, long in consumed time and difficult to achieve detection in the whole storage and transportation process. The method is characterized by comprising the following steps: acquiring original near
infrared spectrum data of a pine nut sample through a collected hyperspectrum; determining the lipid reference content
truth value and the oxidation deterioration reference degree of the pine nut samples at different sampling times, and establishing a
database according to the values; the method comprises the following steps: preprocessing collected original near
infrared spectrum data of
red pine nuts, and dividing red pine nut sample data collected in different batches into a
training set and a
verification set; and designing an improved one-dimensional cavity convolutional network based on a dynamic
weight distribution module to construct a
deep learning model, wherein the
deep learning model is used for constructing a deep learning structure suitable for spectral feature analysis of the red pine nuts. And a
back propagation algorithm is adopted to
train the constructed model, and reverse updating of network weight parameters is realized by minimizing a
loss function. When the performance of the constructed model meets the
rapid detection requirement, the method is used for efficient and lossless
synchronous detection of the
lipid content and the oxidative rancidity degree of the red pine nuts.