CN113516647A - Method for detecting disease of micro-fungus crops - Google Patents

Method for detecting disease of micro-fungus crops Download PDF

Info

Publication number
CN113516647A
CN113516647A CN202110849619.XA CN202110849619A CN113516647A CN 113516647 A CN113516647 A CN 113516647A CN 202110849619 A CN202110849619 A CN 202110849619A CN 113516647 A CN113516647 A CN 113516647A
Authority
CN
China
Prior art keywords
micro
model
crops
fungal
steps
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.)
Granted
Application number
CN202110849619.XA
Other languages
Chinese (zh)
Other versions
CN113516647B (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.)
Shandong Inspur Scientific Research Institute Co Ltd
Original Assignee
Shandong Inspur Scientific Research Institute Co Ltd
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 Shandong Inspur Scientific Research Institute Co Ltd filed Critical Shandong Inspur Scientific Research Institute Co Ltd
Priority to CN202110849619.XA priority Critical patent/CN113516647B/en
Publication of CN113516647A publication Critical patent/CN113516647A/en
Application granted granted Critical
Publication of CN113516647B publication Critical patent/CN113516647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Quality & Reliability (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

The invention provides a method for detecting diseases of micro fungal crops, which realizes the disease detection of the fungal crops by running a deep learning algorithm on an ARM architecture microcontroller chip with low power consumption and low calculation power. A method for detecting diseases of micro fungal crops comprises the following steps: s1, collecting images of fungus crops eroded by diseases; s2, screening data and marking categories; s3, performing model training by using a deep learning framework; s4, leading out the model to be in a universal format; s5, calculating a quantization parameter according to the data, and then quantizing the model; s6, compiling the model code into a format which can be identified by an ARM, and deploying the model code to hardware; and S7, acquiring data through the camera, calling the model to perform reasoning, and displaying the result.

Description

Method for detecting disease of micro-fungus crops
Technical Field
The invention relates to a disease detection method, in particular to a disease detection method for micro fungal crops.
Background
The current crop pest detection method is mainly realized through image classification and a target detection algorithm on a cloud server, and generally, a universal model has huge parameter quantity, consumes a lot of computing resources and has larger power consumption. This is because there are generally no power consumption and computational limitations in the server in order to adapt to the wider models and algorithms. In fact, under the specific scene of fungus disease and pest detection, the number of model parameters is small, tasks are not complex, and large-scale calculation is not needed. Therefore, low power consumption and low cost are currently the best choice for portable and deployable devices.
It is well known in the art to reduce the parameter calculation through matrix factorization, such as where a layer of normal convolution is factorized into depth convolution and point-by-point convolution. In addition, the memory consumption can be reduced by quantizing the model parameters and the input data. Fixed point quantization of fp32 to int8 is typically employed.
Disclosure of Invention
The invention provides a method for detecting diseases of micro fungal crops, which realizes the disease detection of the fungal crops by running a deep learning algorithm on an ARM architecture microcontroller chip with low power consumption and low calculation power.
In order to achieve the purpose, the invention is realized by the following technical scheme:
a method for detecting diseases of micro fungal crops comprises the following steps:
s1, collecting images of fungus crops eroded by diseases;
s2, screening data and marking categories;
s3, performing model training by using a deep learning framework;
s4, leading out the model to be in a universal format;
s5, calculating a quantization parameter according to the data, and then quantizing the model;
s6, compiling the model code into a format which can be identified by an ARM, and deploying the model code to hardware;
and S7, acquiring data through the camera, calling the model to perform reasoning, and displaying the result.
On the basis of the detection method for the diseases of the micro fungal crops, the quantitative formula is as follows:
Figure RE-GDA0003258760180000011
the quantization result, where Z is a real number 0, is commonly referred to as a zero, r is any real number to be quantized,
Figure RE-GDA0003258760180000012
wherein r ismaxIs the maximum of the values to be quantized, rminAnd k is the minimum value of the real number to be quantized, and the quantized digit.
On the basis of the disease detection method for the micro-fungal crops, the compiling process comprises code verification to ensure that correct c + + codes are generated; compiling the readable codes generated in the last step into target files which can be identified by a machine through an avr-gcc compiler; and the target file and the standard library file are linked together through a linker to generate a Hex file, and the Hex file is uploaded to a programmable memory of the development board to be stored and executed.
On the basis of the disease detection method for the micro fungal crops, the structure of MobileNet v1 is adopted for deep learning, the traditional convolution is replaced by deep separable convolution and fixed-point quantification is carried out, and the parameters of the deep separable convolution are as follows: dk Dk 1 m Df +1 m Df D, Dk is the convolution kernel size, m is the number of convolution kernel channels, n is the number of convolution kernels, and Df is the feature map size.
On the basis of the detection method for the diseases of the micro fungi crops, deep learning is carried out on an ARM architecture microcontroller chip, and the ARM architecture microcontroller is an ARM Cortex M0/M4/M7 series.
On the basis of the detection method for the diseases of the micro fungal crops, the single-channel imaging with the definition of QVGA is adopted for the image by adopting a camera.
The invention has the advantages that: disease detection of fungus crops is realized by running a deep learning algorithm on an ARM architecture microcontroller chip with low power consumption and low calculation power, the algorithm uses image classification based on Mobilene v1, and the acceleration and the reduction of memory consumption are performed by combining quantification, so that the power consumption of the whole process is low, the equipment cost is low, the reasoning speed is high, and the deployment is easy.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of the disease detection method for micro fungal crops according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for detecting diseases of micro fungal crops comprises the following steps:
s1, collecting images of fungus crops eroded by diseases;
s2, screening data and marking categories;
s3, performing model training by using a deep learning framework;
s4, leading out a model in a universal onnx/npz format;
s5, calculating a quantization parameter according to the data, and then quantizing the model;
s6, compiling the model code into a format which can be identified by an ARM, and deploying the model code to hardware;
and S7, acquiring data through the camera, calling the model to perform reasoning, and displaying the result.
In this embodiment, the quantization formula is:
Figure RE-GDA0003258760180000031
the quantization result, where Z is a real number 0, is commonly referred to as a zero, r is any real number to be quantized,
Figure RE-GDA0003258760180000032
wherein r ismaxIs the maximum of the values to be quantized, rminAnd k is the minimum value of the real number to be quantized, and the quantized digit.
In this embodiment, the compiling process includes code verification to ensure that a correct c + + code is generated; compiling the readable codes generated in the last step into target files which can be identified by a machine through an avr-gcc compiler; and the target file and the standard library file are linked together through a linker to generate a Hex file, and the Hex file is uploaded to a programmable memory of the development board to be stored and executed.
In this embodiment, the structure of MobileNet v1 is adopted for deep learning, and the conventional convolution is replaced by the depth separable convolution and is subjected to fixed-point quantization, where the parameters of the conventional convolution are: dk m Df, parameters of the depth separable convolution are: dk Dk 1 m Df +1 m Df D, Dk is the convolution kernel size, m is the number of convolution kernel channels, n is the number of convolution kernels, and Df is the feature map size.
In the embodiment, the deep learning is performed on an ARM architecture microcontroller chip, the ARM architecture microcontroller is an ARM Cortex M0/M4/M7 series, the Cortex M0 is a basic version, a high-performance single chip microcomputer of the STM32 cannot be produced, the Cortex M4 operates floating-point data, the Cortex M4 can greatly improve the performance and the operation speed of a processor, the Cortex M7 has good performance and high power consumption, and the method is suitable for environments requiring extreme performance.
In this embodiment, the image is a single-channel image with a resolution of QVGA using a camera.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method for detecting diseases of micro fungal crops is characterized by comprising the following steps: the method comprises the following steps:
s1, collecting images of fungal crops eroded by diseases;
s2, screening and labeling the data;
s3, performing model training by using a deep learning framework;
s4, leading out the model into a universal format;
s5, calculating a quantized parameter according to the data, and then quantizing the model;
s6, compiling the model code into a format which can be identified by an ARM, and deploying the model code to hardware;
and S7, acquiring data through the camera, calling the model to perform reasoning, and displaying the result.
2. The method for detecting diseases of micro fungal crops according to claim 1, wherein the method comprises the following steps: the quantization formula is:
Figure RE-FDA0003258760170000011
the quantization result, where Z is a real number 0, is commonly referred to as a zero, r is any real number to be quantized,
Figure RE-FDA0003258760170000012
wherein r ismaxIs the maximum of the values to be quantized, rminAnd k is the minimum value of the real number to be quantized, and the quantized digit.
3. The method for detecting diseases of micro fungal crops according to claim 1, wherein the method comprises the following steps: the compiling process comprises code verification to ensure that a correct c + + code is generated; compiling the readable codes generated in the last step into target files which can be identified by a machine through an avr-gcc compiler; and the target file and the standard library file are linked together through a linker to generate a Hex file, and the Hex file is uploaded to a programmable memory of the development board to be stored and executed.
4. The method for detecting diseases of micro fungal crops according to claim 1, wherein the method comprises the following steps: the structure of MobileNet v1 is adopted in deep learning, the traditional convolution is replaced by the depth separable convolution and fixed point quantization is carried out, and the parameters of the depth separable convolution are as follows: dk Dk 1 m Df +1 m Df D, Dk is the convolution kernel size, m is the number of convolution kernel channels, n is the number of convolution kernels, and Df is the feature map size.
5. The method for detecting diseases of micro fungal crops according to claim 1, wherein the method comprises the following steps: deep learning is performed on an ARM architecture microcontroller chip, which is the ARM Cortex M0/M4/M7 family.
6. The disease detection method for micro fungal crops according to any one of claims 1 to 5, wherein: the image adopts a camera, and the definition is single-channel imaging of QVGA.
CN202110849619.XA 2021-07-27 2021-07-27 Method for detecting diseases of miniature fungus crops Active CN113516647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110849619.XA CN113516647B (en) 2021-07-27 2021-07-27 Method for detecting diseases of miniature fungus crops

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110849619.XA CN113516647B (en) 2021-07-27 2021-07-27 Method for detecting diseases of miniature fungus crops

Publications (2)

Publication Number Publication Date
CN113516647A true CN113516647A (en) 2021-10-19
CN113516647B CN113516647B (en) 2023-06-13

Family

ID=78067605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110849619.XA Active CN113516647B (en) 2021-07-27 2021-07-27 Method for detecting diseases of miniature fungus crops

Country Status (1)

Country Link
CN (1) CN113516647B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800806A (en) * 2019-01-14 2019-05-24 中山大学 A kind of corps diseases detection algorithm based on deep learning
CN110766041A (en) * 2019-09-04 2020-02-07 江苏大学 Deep learning-based pest detection method
CN112396072A (en) * 2019-08-14 2021-02-23 上海大学 Image classification acceleration method and device based on ASIC and VGG16

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800806A (en) * 2019-01-14 2019-05-24 中山大学 A kind of corps diseases detection algorithm based on deep learning
CN112396072A (en) * 2019-08-14 2021-02-23 上海大学 Image classification acceleration method and device based on ASIC and VGG16
CN110766041A (en) * 2019-09-04 2020-02-07 江苏大学 Deep learning-based pest detection method

Also Published As

Publication number Publication date
CN113516647B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN112418392A (en) Neural network construction method and device
CN110222718B (en) Image processing method and device
CN111105017B (en) Neural network quantization method and device and electronic equipment
WO2022111617A1 (en) Model training method and apparatus
WO2023231794A1 (en) Neural network parameter quantification method and apparatus
CN113240079A (en) Model training method and device
WO2022111387A1 (en) Data processing method and related apparatus
US20240185568A1 (en) Image Classification Method and Related Device Thereof
CN114266897A (en) Method and device for predicting pox types, electronic equipment and storage medium
CN113869496A (en) Acquisition method of neural network, data processing method and related equipment
CN113449548A (en) Method and apparatus for updating object recognition model
CN113627421A (en) Image processing method, model training method and related equipment
CN114612681A (en) GCN-based multi-label image classification method, model construction method and device
CN113065634A (en) Image processing method, neural network training method and related equipment
WO2024046144A1 (en) Video processing method and related device thereof
CN113516647A (en) Method for detecting disease of micro-fungus crops
EP4375872A1 (en) Image classification method and related device
CN114998643A (en) Method for acquiring characteristic information of category description, method and equipment for processing image
CN113065638A (en) Neural network compression method and related equipment thereof
Wang Motion recognition based on deep learning and human joint points
CN114365155A (en) Efficient inference with fast point-by-point convolution
CN113159081B (en) Image processing method and related equipment
CN111797970B (en) Method and device for training neural network
WO2021129668A1 (en) Neural network training method and device
WO2023236900A1 (en) Item recommendation method and related device thereof

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