CN112730269B - Aflatoxin intelligent detection method based on deep learning - Google Patents

Aflatoxin intelligent detection method based on deep learning Download PDF

Info

Publication number
CN112730269B
CN112730269B CN202011433931.2A CN202011433931A CN112730269B CN 112730269 B CN112730269 B CN 112730269B CN 202011433931 A CN202011433931 A CN 202011433931A CN 112730269 B CN112730269 B CN 112730269B
Authority
CN
China
Prior art keywords
aflatoxin
accuracy
deep learning
network
grain
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
CN202011433931.2A
Other languages
Chinese (zh)
Other versions
CN112730269A (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.)
Qingdao Dagu Agricultural Information Co ltd
Qingdao Qingnong Intelligent Technology Research Institute Co ltd
Qingdao Agricultural University
Original Assignee
Qingdao Dagu Agricultural Information Co ltd
Qingdao Qingnong Intelligent Technology Research Institute Co ltd
Qingdao Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Dagu Agricultural Information Co ltd, Qingdao Qingnong Intelligent Technology Research Institute Co ltd, Qingdao Agricultural University filed Critical Qingdao Dagu Agricultural Information Co ltd
Priority to CN202011433931.2A priority Critical patent/CN112730269B/en
Publication of CN112730269A publication Critical patent/CN112730269A/en
Application granted granted Critical
Publication of CN112730269B publication Critical patent/CN112730269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20216Image averaging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Abstract

The invention relates to an intelligent aflatoxin detection method based on deep learning, which comprises the steps of firstly, obtaining hyperspectral data of single mildewed grains, calibrating the toxin content of each grain by using a liquid chromatography, then, building a one-dimensional deep learning network, defining the number and structure of network layers, importing the average spectrum of each grain, continuously adjusting the network hyper-parameters, and selecting the hyper-parameters with the highest accuracy as a classification model.

Description

Aflatoxin intelligent detection method based on deep learning
Technical Field
The invention discloses an aflatoxin intelligent detection method based on deep learning, and belongs to the field of artificial intelligent detection of food safety.
Background
Aspergillus flavus is classified as a naturally occurring carcinogen by the World Health Organization (WHO) cancer research institution, and the detection method thereof is developed from the beginning mainly by biochemical methods such as thin layer chromatography to the common application of various methods such as high performance liquid chromatography, microcolumn method, enzyme-linked immunosorbent assay and the like, but the methods need long-time experiments by professionals.
The deep learning is a neural network system based on convolution operation, has strong calculation power and self-learning capability, has high accuracy and high calculation speed, is well known in the field of digital image processing at first, and can well process two-dimensional image data classification tasks. A proper network structure can be constructed according to different classification targets and data characteristics thereof, and the hyper-parameters of the neural network need to be adjusted according to a target data set.
The hyperspectral imaging technology can collect images of hundreds of wave bands of an object, different performances of different substances under different wave band spectrum signals can be drawn into a curve related to the spectrum wave bands and the spectrum values by each pixel, each pixel is classified according to the difference of the curve and can be realized through a one-dimensional convolutional neural network (1D-CNN), toxin identification is carried out by analyzing whether the spectrum characteristics of aflatoxin exist in a single pixel in the hyperspectral images, the toxin content can be calculated by accumulation, and the aflatoxin has the distribution characteristics of a surface layer and a shallow surface layer, so that deep learning and hyperspectral are matched, and the defects of complex operation, long time and high detection cost of the traditional method can be overcome.
Disclosure of Invention
The invention mainly aims to overcome the defects of the problems and discloses an aflatoxin intelligent method based on 1D-CNN deep learning.
The technical scheme of the invention is an aflatoxin intelligent detection method based on deep learning, which comprises the following steps:
step 1: acquiring hyperspectral data of the front side and the back side of a single mildewed grain;
step 2: obtaining a binary image of the grains and the background by utilizing the spectrum obtained in the step 1 and Gaussian clustering, and calculating an average spectrum of the single-sided grains;
and step 3: adding the hyperspectral data of the front side and the back side of the single grain obtained in the step 2, and taking an average value as the spectral data of the single grain;
and 4, step 4: calibrating the toxin content of the single grain in the step 1 by using a liquid chromatography to obtain a label for judging whether the aflatoxin of the single grain exceeds the standard or not;
and 5: normalizing the input data;
step 6: building a one-dimensional deep learning network, and defining the number of network layers and structure;
and 7: introducing the average spectrum and toxin content of each grain, continuously adjusting network hyper-parameters, and recording the accuracy of each training network model;
and 8: and selecting the optimal parameters of the hyper-parameters to configure the optimal parameters into a final hyperspectral aspergillus flavus sorting network.
Wherein:
(1) the specific steps of the step 2 are as follows:
step 2-1: setting the clustering number to be 2 by using a Gaussian clustering method for the whole hyperspectral cube, and accurately classifying the background and the grains;
step 2-2: expressing the grain picture by using a binary image, wherein a white area represents the grain, and a black area represents the background;
step 2-3: and taking the average spectrum of the white area as the hyperspectral data of the single-sided grains.
(2) The concrete steps of the step 6 are as follows:
step 6-1: establishing a 7-layer one-dimensional information convolution model: each of the first four layers is a convolution layer with a largest pooling layer, and the last three layers are full-connection layers;
step 6-2: keeping the basic network structure in the step 6-1 unchanged, and setting initial values of three hyper-parameters of iteration times, learning rate and activation function. The number of iterations is set to 30, the learning rate is set to 0.005, and the activation function is set to relu.
(3) The specific steps of step 7 are:
step 7-1: the number of fixed iterations is 30 and the learning rate is 0.005. And replacing the activation function with sigmoid and tanh, importing the activation function into a data training network, and recording the accuracy of the verification set. Recording the accuracy of the activation functions of relu, sigmoid and tanh;
step 7-2: the fixed learning rate is 0.005 and the activation function is relu. And replacing the iteration times with 50 and 100, importing the data training network and recording the accuracy of the verification set. Recording the accuracy rates of 30, 50 and 100 of the iteration times;
and 7-3: the fixed number of iterations is 30 and the activation function is relu. The learning rate was replaced with 0.0005, 0.00005, and 0.000005, the data training network was imported and the validation set accuracy was recorded. Accuracy rates of replacement of learning rates by 0.0005, 0.00005, and 0.000005 are recorded;
and 7-4: and applying the model with the highest target identification accuracy to the aflatoxin of the grains according to the parameters with the highest iteration times, learning rate and the highest accuracy in the activation function.
A1D-CNN deep learning model in the aflatoxin intelligent method based on 1D-CNN deep learning can be one of Alexnet, VGG-16 or models.
Drawings
FIG. 1 is a general schematic diagram of an aflatoxin intelligent detection method based on deep learning.
FIG. 2 shows the result of aflatoxin detection of peanut kernels.
FIG. 3 shows the result of aflatoxin detection of corn kernels.
Detailed Description
The following describes specific embodiments of the present apparatus and method with reference to fig. 1-3, wherein fig. 2 and 3 are the detection results of the specifically implemented peanut and corn kernel using Alexnet and VGG-16 models, respectively:
step 1: acquiring hyperspectral data of the front side and the back side of a single mildewed grain;
step 2: obtaining a binary image of the grains and the background by Gaussian clustering by using the spectrum obtained in the step 1, and calculating an average spectrum of single-sided grains;
and step 3: adding the hyperspectral data of the front side and the back side of the single grain obtained in the step 2, and taking an average value as the spectral data of the single grain;
and 4, step 4: performing toxin content calibration on the single grains in the step 1 by using a liquid chromatography method to obtain a label indicating whether aflatoxin of the single grains exceeds the standard or not;
and 5: normalizing the input data;
step 6: building a one-dimensional deep learning network, and defining the number of network layers and structure;
and 7: introducing the average spectrum and toxin content of each grain, continuously adjusting network hyper-parameters, and recording the accuracy of each training network model;
and 8: and selecting the optimal parameters of the hyper-parameters to configure the optimal parameters into a final hyperspectral aspergillus flavus sorting network.
Wherein:
(1) the specific steps of the step 2 are as follows:
step 2-1: setting the clustering number to be 2 by using a Gaussian clustering method for the whole hyperspectral cube, and accurately classifying the background and the grains;
step 2-2: expressing the grain picture by using a binary image, wherein a white area represents the grain, and a black area represents the background;
step 2-3: and taking the average spectrum of the white area as the hyperspectral data of the single-sided grains.
(2) The concrete steps of the step 6 are as follows:
step 6-1: establishing a 7-layer one-dimensional information convolution model: each of the first four layers is a convolution layer with a largest pooling layer, and the last three layers are full-connection layers;
step 6-2: keeping the basic network structure in the step 6-1 unchanged, and setting initial values of three hyper-parameters of iteration times, learning rate and activation function. The number of iterations is set to 30, the learning rate is set to 0.005, and the activation function is set to relu.
(3) The specific steps of the step 7 are as follows:
step 7-1: the number of fixed iterations is 30 and the learning rate is 0.005. And replacing the activation function with sigmoid and tanh, importing the activation function into a data training network, and recording the accuracy of the verification set. Recording the accuracy of the activation functions of relu, sigmoid and tanh;
step 7-2: the fixed learning rate is 0.005 and the activation function is relu. And replacing the iteration times with 50 and 100, importing the data training network and recording the accuracy of the verification set. Recording the accuracy rates of 30, 50 and 100 of the iteration times;
and 7-3: the fixed number of iterations is 30 and the activation function is relu. The learning rate was replaced with 0.0005, 0.00005, and 0.000005, the data training network was imported and the validation set accuracy was recorded. Recording the accuracy rate of replacing the learning rate by 0.0005, 0.00005 and 0.000005;
and 7-4: and applying the model with the highest target identification accuracy to the aflatoxin of the grains according to the parameters with the highest iteration times, learning rate and the highest accuracy in the activation function.

Claims (5)

1. An aflatoxin intelligent detection method based on deep learning is characterized by comprising the following steps:
step 1: acquiring hyperspectral data of the front side and the back side of a single mildewed grain;
step 2: obtaining a binary image of the grains and the background by Gaussian clustering by using the spectrum obtained in the step 1, and calculating an average spectrum of single-sided grains;
and step 3: adding the hyperspectral data of the front side and the back side of the single grain obtained in the step 2, and taking an average value as the spectral data of the single grain;
and 4, step 4: calibrating the toxin content of the single grain in the step 1 by using a liquid chromatography to obtain a label for judging whether the aflatoxin of the single grain exceeds the standard or not;
and 5: normalizing the input data;
step 6: building a one-dimensional deep learning network, and defining the number of network layers and structure;
and 7: introducing the average spectrum and toxin content of each grain in the step 3, continuously adjusting network hyper-parameters, and recording the accuracy of each training network model;
and step 8: and selecting the optimal parameter of each hyper-parameter to configure the hyper-spectral aspergillus flavus sorting network.
2. The intelligent aflatoxin detection method based on deep learning as claimed in claim 1, which is characterized in that the specific steps in the step 2 are as follows:
step 2-1: setting the clustering number to be 2 by using a Gaussian clustering method for the whole hyperspectral cube, and accurately classifying the background and the grains;
step 2-2: expressing the grain picture by using a binary image, wherein a white area represents the grain, and a black area represents the background;
step 2-3: and taking the average spectrum of the white area as the hyperspectral data of the single-sided grains.
3. The intelligent aflatoxin detection method based on deep learning as claimed in claim 1, which is characterized in that the specific steps of step 6 are as follows:
step 6-1: establishing a one-dimensional information convolution model with a fixed layer number: the front N-1 layers are convolution layers with the largest pooling layer, and the rear three layers are full-connection layers;
step 6-2: keeping the basic network structure in the step 6-1 unchanged, and setting initial values of three hyper-parameters of iteration times, learning rate and activation function.
4. The intelligent aflatoxin detection method based on deep learning as claimed in claim 1, which is characterized in that the specific steps of step 7 are as follows:
step 7-1: replacing the activation function with fixed iteration times and unchanged initial values of the learning rate, importing the activation function into a data training network, recording the accuracy of a verification set, and recording the accuracy of different activation functions;
step 7-2: the initial value of the fixed learning rate is unchanged, the activation function is unchanged, the iteration times are replaced by importing data to a training network, and the accuracy rate of a verification set is recorded;
and 7-3: the initial value of the fixed iteration times is unchanged, the activation function is unchanged, the learning rate is replaced, the learning rate is led into a data training network, the accuracy rate of a verification set is recorded, and the accuracy rates under different learning rates are recorded;
and 7-4: and using the model with the highest target identification accuracy for aflatoxin classification of the grains according to the parameters with the highest iteration times, learning rate and accuracy in the activation function.
5. The method for intelligently detecting aflatoxin based on deep learning of claim 1, wherein the deep learning model can be one of Alexnet and VGG-16 models.
CN202011433931.2A 2020-12-10 2020-12-10 Aflatoxin intelligent detection method based on deep learning Active CN112730269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011433931.2A CN112730269B (en) 2020-12-10 2020-12-10 Aflatoxin intelligent detection method based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011433931.2A CN112730269B (en) 2020-12-10 2020-12-10 Aflatoxin intelligent detection method based on deep learning

Publications (2)

Publication Number Publication Date
CN112730269A CN112730269A (en) 2021-04-30
CN112730269B true CN112730269B (en) 2022-09-13

Family

ID=75598775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011433931.2A Active CN112730269B (en) 2020-12-10 2020-12-10 Aflatoxin intelligent detection method based on deep learning

Country Status (1)

Country Link
CN (1) CN112730269B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8563934B2 (en) * 2010-09-10 2013-10-22 Mississippi State University Method and detection system for detection of aflatoxin in corn with fluorescence spectra
CN102636581A (en) * 2011-12-26 2012-08-15 湖北省农业科学院农业质量标准与检测技术研究所 Liquid chromatogram and fluorescence method for simultaneously detecting aflatoxin B1, ochratoxin A, zearalenone and citrinin in grains
CN103575694A (en) * 2013-11-11 2014-02-12 东北农业大学 Quick detection method for aflatoxin B1 of rice based on near infrared spectroscopy
CN104598886B (en) * 2015-01-23 2017-07-07 中国矿业大学(北京) A kind of method that utilization near-infrared high spectrum image recognizes the oil crops that go mouldy
CN104914052B (en) * 2015-05-12 2018-01-16 江苏大学 A kind of light spectrum image-forming detection method for the peanut that goes mouldy
TW201925777A (en) * 2017-12-08 2019-07-01 艾思博生物科技股份有限公司 Non-invasive testing method for aflatoxin, food inspection server, and food inspection system
CN108985237A (en) * 2018-07-20 2018-12-11 安徽农业大学 A kind of detection method and its system of the wheat scab based on depth mixing
CN109657653B (en) * 2019-01-21 2022-10-04 安徽大学 Wheat grain gibberellic disease identification method based on imaging hyperspectral data
CN110298396B (en) * 2019-06-25 2022-02-08 北京工业大学 Hyperspectral image classification method based on deep learning multi-feature fusion
CN110470834A (en) * 2019-09-22 2019-11-19 河南工业大学 A kind of aflatoxin B1 detection method of content based on magnetic signal

Also Published As

Publication number Publication date
CN112730269A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
Deng et al. Automatic diagnosis of rice diseases using deep learning
Campos et al. Machine learning hyperparameter selection for contrast limited adaptive histogram equalization
Khattak et al. Automatic detection of citrus fruit and leaves diseases using deep neural network model
CN107316300B (en) Tire X-ray defect detection method based on deep convolutional neural network
CN102819745B (en) Hyper-spectral remote sensing image classifying method based on AdaBoost
Luo et al. Classification of weed seeds based on visual images and deep learning
CN107657271B (en) Hyperspectral image classification method based on long memory network in short-term
CN103593670A (en) Copper sheet and strip surface defect detection method based on-line sequential extreme learning machine
CN111161362B (en) Spectral image identification method for growth state of tea tree
Weng et al. Reflectance images of effective wavelengths from hyperspectral imaging for identification of Fusarium head blight-infected wheat kernels combined with a residual attention convolution neural network
Bhargava et al. Machine learning based quality evaluation of mono-colored apples
CN104990892A (en) Spectrum image lossless identification model establishing method for seeds and seed identification method
Sanjeev et al. Early prediction of potato leaf diseases using ANN classifier
CN105320970A (en) Potato disease diagnostic device, diagnostic system and diagnostic method
Lin et al. Determination of the varieties of rice kernels based on machine vision and deep learning technology
CN111145145A (en) Image surface defect detection method based on MobileNet
Yang et al. Detection of the moldy status of the stored maize kernels using hyperspectral imaging and deep learning algorithms
CN112766161A (en) Hyperspectral target detection method based on integrated constraint multi-example learning
Shantkumari et al. Grape leaf image classification based on machine learning technique for accurate leaf disease detection
Ramamoorthy et al. Reliable and accurate plant leaf disease detection with treatment suggestions using enhanced deep learning techniques
CN112730269B (en) Aflatoxin intelligent detection method based on deep learning
CN114295556A (en) Hyperspectral physicochemical index fitting method and system based on one-dimensional convolution
Ni et al. Convolution neural network based automatic corn kernel qualification
Kumar et al. Automatic Grading of Potato Leaf using Machine learning & Computer Vision
CN116312860B (en) Agricultural product soluble solid matter prediction method based on supervised transfer learning

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