CN115294467A - Detection method and related device for tea diseases - Google Patents

Detection method and related device for tea diseases Download PDF

Info

Publication number
CN115294467A
CN115294467A CN202210868307.8A CN202210868307A CN115294467A CN 115294467 A CN115294467 A CN 115294467A CN 202210868307 A CN202210868307 A CN 202210868307A CN 115294467 A CN115294467 A CN 115294467A
Authority
CN
China
Prior art keywords
tea
image
disease
disease detection
data
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.)
Pending
Application number
CN202210868307.8A
Other languages
Chinese (zh)
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.)
Anhui University
Original Assignee
Anhui 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 Anhui University filed Critical Anhui University
Priority to CN202210868307.8A priority Critical patent/CN115294467A/en
Publication of CN115294467A publication Critical patent/CN115294467A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • 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
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4046Scaling of whole images or parts thereof, e.g. expanding or contracting using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Remote Sensing (AREA)
  • Astronomy & Astrophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a tea disease detection method and a related device, which are used for detecting tea, wherein the method comprises the following steps: and inputting the tea image to be detected into the tea disease detection model to obtain a disease detection result of the tea image to be detected. The deep learning model for training the tea disease detection model comprises a BackBone unit, a Neck unit and a Head unit, wherein an RFB module is added in the BackBone unit, a two-dimensional mixed attention module is added in the Neck unit, the two-dimensional mixed attention module is divided into an upper parallel branch and a lower parallel branch, and the two-dimensional mixed attention module is formed by mixing an upper branch channel attention submodule, a space attention submodule and a lower branch coordinate attention submodule. In addition, the remote sensing data obtained by shooting by the unmanned aerial vehicle is used for super-resolution reconstruction, and a training set is obtained by manufacturing. The unit and the module with higher average precision and higher detection speed are used in the tea disease detection model to locate the tea disease position needing attention, and the problems of time consumption, labor consumption and missed detection and false detection of the traditional detection method are solved.

Description

Detection method and related device for tea diseases
Technical Field
The application relates to the technical fields of remote sensing, image detection, plant disease detection and deep learning, in particular to a tea disease detection method and a related device.
Background
The tea tree is easily infected by diseases in the growth process, the quality and the yield of the tea are seriously influenced by the diseases, the real-time and accurate monitoring of the tea diseases is beneficial to accurate prevention and control of the diseases, and the income of tea farmers is increased. At present, the detection of tea diseases mainly depends on manual identification, but many tea gardens are located in mountain areas which are rare in people, the manual identification is time-consuming and labor-consuming, and a large amount of economic cost is needed. With the development of computer technology, the detection of tea diseases has been converted from manual identification to automatic image identification. Methods for image recognition using computer vision are popular for their efficiency and accuracy. However, in a tea image of a natural background, a tea disease area and a tea planting area have high similarity in background color, texture, and the like, which leads to erroneous detection of a tea disease.
Patent CN112801991B discloses a rice bacterial leaf blight detection method based on image segmentation, which comprises the following steps: acquiring a super-pixel image corresponding to the rice leaf image according to the rice leaf image and a preset image segmentation algorithm by acquiring the rice leaf image, wherein the super-pixel image comprises a plurality of super-pixels, and each super-pixel is generated based on pixel points in the plurality of rice leaf images; and then, extracting suspected disease spots in the super-pixel image according to the super-pixel image and a preset disease spot extraction algorithm, inputting the characteristics of the suspected disease spots in the super-pixel image into a trained rice bacterial leaf blight detection model, and obtaining a bacterial leaf blight detection result of the rice leaves. This application results in relatively low measurement accuracy due to model limitations.
Based on the above, the application provides a tea disease detection method and a related device, so as to solve the defects of the prior art.
Disclosure of Invention
The application aims to provide a tea disease detection method which is used for detecting tea so as to solve the problems of time and labor consumption and missed detection and false detection of the traditional detection method.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a method for detecting a tea disease, which is used for detecting tea, and the method includes:
inputting a tea image to be detected into a tea disease detection model to obtain a disease detection result of the tea image to be detected, wherein the disease detection result of the tea image to be detected is used for indicating whether at least one leaf corresponding to the tea image to be detected has a target disease;
wherein, the training process of tea disease detection model includes:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
The technical scheme has the beneficial effects that: the step of detecting the tea image to be detected through the tea disease detection model may be inputting the tea image to be detected into the tea disease detection model to obtain a corresponding detection result. Wherein, the training process may include: firstly, a training set is obtained, wherein the training set comprises a plurality of training data, and a disease detection result of a sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease. Whether at least one leaf corresponding to the sample tea image has the target disease or not can be intuitively and efficiently displayed, and the intelligent degree is high. The sample tea images in the training data can be input into a preset deep learning model to obtain prediction data of the disease detection result of the sample tea images. And (3) acquiring a tea disease detection model through training, and detecting. The method is based on a computer vision technology, and can better fit data and actual conditions by utilizing a deep learning model. The deep learning model has strong fitting capability, can approach a complex function to reach infinite dimension, and further improves the testing precision. The method overcomes the defect of manually extracting the tea image characteristics, the identification precision is obviously improved, and the combination of the method and agricultural information perception expands a brand-new research visual angle for detecting tea diseases. The tea disease detection model can be used for rechecking tea to be detected, and is updated and adjusted, so that the disease period, disease degree and disease position of the tea can be followed globally. The method is favorable for making a thorough treatment scheme aiming at different disease conditions of different positions of the tea trees according to the detection result of the tea disease detection model.
In some optional embodiments, the obtaining the training set includes:
performing data enhancement processing on the sample tea leaf image to obtain at least one enhanced image corresponding to the sample tea leaf image;
and utilizing the sample tea image and the enhanced image thereof to manufacture the training set.
The technical scheme has the beneficial effects that: and performing data enhancement processing on the sample tea image, and enabling limited image data to generate more image data by using a computer vision method, so that the number and diversity of training samples are increased, and the robustness and generalization capability of a tea disease detection model are improved. Data enhancement processing is an important branch of digital image processing, and in view of the situation that the visual effect of image shooting is poor due to the influence of scene conditions, data enhancement on the image can improve the visual effect expressed by the image, such as highlighting certain characteristics of a target object in the image, extracting characteristic parameters of the target object from the digital image, and the like, which are beneficial to the identification, tracking and understanding of the target in the image. The main content of data enhancement processing is to highlight the interested part in the image, weaken or remove unnecessary or unimportant information, and strengthen useful information, thereby obtaining a more practical image or converting the image into an image more suitable for human or machine analysis processing, and achieving the effects of reducing image degradation caused by uneven light, color distortion and the like and enhancing the information expression of color images. If the tea image is not processed by data enhancement, the detection effect is poor due to the problems of low pixel, color distortion, insufficient image quantity and the like of the acquired image. The operation of enhancing the data of the image may further include augmenting the image, which may be, for example, flipping, translating, rotating, mirroring, mosaic (mosaics) operation, and the like, and data augmentation is a generic term of a method of augmenting data. The data amplification can increase samples of a training set, can effectively relieve the overfitting condition of the model, and can bring stronger generalization capability to the model, so that the training data is close to the test data as much as possible, thereby improving the prediction precision and enabling the network to learn more robust characteristics. Data enhancement can highlight certain characteristics of a target object in an image, extract characteristic parameters of the target object from a digital image and the like, and all the characteristics are beneficial to recognition, tracking and understanding of the target in the image. The main content of the data enhancement processing is to highlight interesting parts in the image and reduce or remove unnecessary information. This enhances the useful information to obtain a more practical image or to convert it to an image more suitable for analysis by a machine. The images are randomly scaled and then spliced in a randomly distributed mode, so that an image data set is enriched, the network robustness is better, and the loss of a GPU (graphics processing Unit) can be reduced.
In some alternative embodiments, the process of obtaining the sample tea leaf image comprises:
and carrying out image acquisition on the tea trees in the tea planting area by using remote sensing equipment loaded on the unmanned aerial vehicle to obtain a plurality of sample tea images.
The technical scheme has the beneficial effects that: the unmanned aerial vehicle is assembled with the advanced optical sensor to obtain the remote sensing image, so that the remote sensing image can adapt to different terrains and weather conditions, and a large amount of economic cost is saved. The remote sensing equipment loaded on the unmanned aerial vehicle is used for collecting images, the unmanned aerial vehicle can be used as an aerial platform, a remote sensing sensor (namely the remote sensing equipment) is used for obtaining information, a computer is used for processing image information, and the images are manufactured according to certain precision requirements. The remote sensing sensor uses corresponding airborne remote sensing equipment, such as a high-resolution CCD digital camera, a light optical camera, a multispectral imager, an infrared scanner, a laser scanner, a magnetic measuring instrument, a synthetic aperture radar and the like, according to different types of remote sensing tasks. The remote sensing sensor has the characteristics of digitalization, small volume, light weight, high precision, large storage capacity, excellent performance and the like. The remote sensing device mounted on an unmanned aerial vehicle is used for acquiring images, namely, the Unmanned Aerial Vehicle Remote Sensing (UAVRS) technology is used as an aerial remote sensing means, and the remote sensing device has the advantages of long endurance time, real-time transmission of images, detection in high-risk areas, low cost, high resolution, flexibility and the like. In this application, utilize the remote sensing equipment who loads in unmanned aerial vehicle to carry out image acquisition, can practice thrift the human cost in a large number, reduce the potential safety hazard that exists when artifical data collection, have the effect of comprehensive, high-efficient, high quality collection image.
In some optional embodiments, the performing data enhancement processing on the sample tea leaf image comprises:
cutting the sample tea image based on a preset size to obtain a specification image;
performing super-resolution reconstruction on the specification image by using a super-resolution network to obtain a super-resolution image;
and performing data enhancement on the super-resolution image to obtain at least one enhanced image.
The technical scheme has the beneficial effects that: the sample tea image can be cut based on the preset size, so that an image which meets the preset specification is obtained, image parameters required by the model can be fitted better, and the model can be trained successfully. The super-resolution reconstruction refers to a technology of reconstructing and converting one or more frames of images into images or videos with higher resolution by analyzing digital image signals and adopting a software algorithm mode. The method has the advantages that the corresponding high-resolution image can be reconstructed from the observed low-resolution image, so that the adverse effects on the image caused by the imaging environment, the imaging distance, the shape and the size of the sensor, the error of an optical system, air disturbance, object motion and lens defocusing are reduced. In the application, a clearer image can be reconstructed by using a learning-based super-resolution algorithm, and the problem of insufficient resolution of the remote sensing image of the unmanned aerial vehicle is solved. Tea tree is an important economic crop, and its main value lies in the leaves of tea tree. Compared with the leaves of poplar, phoenix tree, plantain tree and Chinese redbud tree, the leaves of tea tree are smaller, the difficulty of the tea tree in the aspect of detection is higher, and the precision of the required image is relatively higher. For detecting tea diseases, not only each tea leaf but also the position of the disease on the leaf should be located, and based on the above factors, it is essential to perform data enhancement on the collected tea leaf image. The enhanced image obtained by data enhancement can also be used as a comparison image for retest, and the difference or the same part of the tea image and the enhanced image during retest can be more intuitively displayed, so that whether the position and the condition of the tea disease change or not is judged.
In some optional embodiments, the deep learning model comprises a backsbone unit added with an RFB module, a Neck unit added with an attention module, and a Head unit;
the step of inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images includes:
utilizing the BackBone unit to perform feature extraction on the sample tea image so as to obtain feature information, wherein the feature information comprises: the low-level spatial features and the high-level semantic features corresponding to the sample tea images; the RFB module is used for extracting partial low-level spatial features and partial high-level semantic features;
inputting the low-level spatial features and the high-level semantic features to a Neck unit of the target detection network by using the BackBone unit;
performing feature fusion on the low-level spatial features and the high-level semantic features by using the Neck unit to obtain feature fusion results;
acquiring a plurality of feature maps corresponding to the feature fusion result by using the attention module;
and generating a corresponding detection frame by using the Head unit aiming at each characteristic graph so as to obtain prediction data of a disease detection result of the sample tea image.
The technical scheme has the beneficial effects that: according to the application, a multi-scale RFB module can be added in the BackBone unit, so that the extraction capability of the detail characteristics of the tea can be improved, and the problem of missed detection caused by smaller blades is reduced. The attention module is added in the Neck unit, so that the problems of missing detection and false detection caused by dense blade distribution are reduced. Tea is an important economic crop, and its main value lies in the leaves of tea. The tea tree is bush or small tree of Theaceae and Camellia, and has no hair on tender branch. She Gezhi, long round or ellipse, 4-12 cm long, 2-5 cm wide, blunt or sharp tip, wedge-shaped base, bright upper surface, no hair or soft hair at first time, 5-7 pairs of side veins, sawtooth at edge, 3-8 mm long petiole, and no hair. Compared with other economic crops such as wheat, rice, corn, sorghum, beet, beans, potatoes and highland barley, the leaves of tea trees are denser, so units and modules with higher average precision and higher detection speed are used in a tea disease detection model. And an attention module based on a human visual attention mechanism is added, so that the global and local connection can be acquired more pertinently, key information can be found, and the tea disease position needing attention can be positioned in one step.
In some optional embodiments, the annotation data is used for indicating the position information of the scab leaf in the sample tea leaf image, the type of disease corresponding to the sample tea leaf image, and the confidence corresponding to the tea leaf image;
updating the model parameters of the deep learning model based on the prediction data and the labeling data of the disease detection result of the sample tea image, wherein the updating comprises the following steps:
acquiring a loss value corresponding to the sample tea image based on the prediction data and the annotation data of the disease detection result of the sample tea image;
acquiring feature weight information of a plurality of feature maps by using the loss value and a random gradient descent mode;
and updating the model parameters of the deep learning model based on the feature weight information of the plurality of feature maps.
The technical scheme has the beneficial effects that: acquiring a loss value corresponding to the sample tea image based on the prediction data and the labeling data of the disease detection result of the sample tea image; acquiring feature weight information of a plurality of feature maps by using a random gradient descent mode; and updating the model parameters of the deep learning model based on the feature weight information of the feature maps, so that the model approaches to a real condition and has better fitting degree. The loss function can be used for measuring the quality of model prediction and can be used for expressing the difference degree between the prediction and actual data. In general, the better the loss function, the better the performance of the model.
In some optional embodiments, the process of obtaining the model parameters comprises:
the process of obtaining the model parameters comprises:
receiving a value setting operation with an interactive device, and determining a parameter value of at least one of the model parameters in response to the value setting operation.
The technical scheme has the beneficial effects that: the interactive equipment is used for receiving parameter setting operation, and the model parameters can be set in the model according to preset model parameters, such as initial learning rate parameters, training batch parameters, total iteration round number parameters and the like of the model, and the interactive equipment (such as a mouse, a keyboard and the like) is used for receiving the setting operation. The number of parameters to be adjusted is different according to the complexity of the model. The model parameters are configuration variables in the model, the values of the model parameters can be estimated according to data, and the model training performance can be improved and the model can be further optimized by receiving and setting the model parameters.
In some alternative embodiments, the attention module is a two-dimensional hybrid attention module;
the two-dimensional mixed attention module is divided into an upper branch and a lower branch, the upper branch comprises a channel attention submodule and a space attention submodule, and the lower branch comprises a coordinate attention submodule.
The technical scheme has the beneficial effects that: the channel attention submodule similarly applies a weight to the feature map of each channel to represent the correlation degree of the channel and the key information, and the larger the weight is, the higher the correlation degree is. In the neural network, the higher the dimension of the feature map, the smaller the size, the more the number of channels, and the channels represent the feature information of the whole image. The channel attention submodule can often play a good role in processing image characteristic information. The spatial attention submodule can be used for enabling the model to learn the feature representation with the character position information in a self-adaptive mode during the serialized feature extraction, enabling the model to pay more attention to the specified area in the image and obtaining the spatial feature with the two-dimensional spatial position information. The coordinate attention submodule can decompose channel attention into two parallel one-dimensional feature codes to efficiently integrate space coordinate information into a generated attention feature map, and can capture information of cross channels and further contain information of direction-aware and position-sensitive, so that the deep learning model can more accurately position and identify a target region. Compare in convolution Attention Module (CBAM, connected Block Attention Module promptly), coordinate Attention submodule has still been added to two-dimentional mixed Attention Module, can be better carry out the characteristics of focus nature extraction to the characteristics of tealeaves, has realized that diversified, high accuracy, comprehensive high efficiency extract the information of tealeaves image, has brought the promotion of matter for the performance of deep learning model.
In a second aspect, the present application provides a tea disease detection device for detecting tea, the device comprising:
the disease detection module is used for inputting a tea image to be detected into the tea disease detection model to obtain a disease detection result of the tea image to be detected, and the disease detection result of the tea image to be detected is used for indicating whether at least one blade corresponding to the tea image to be detected has a target disease;
wherein, the training process of the tea disease detection model comprises the following steps:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met or not; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
In some optional embodiments, the obtaining the training set includes:
performing data enhancement processing on the sample tea leaf image to obtain at least one enhanced image corresponding to the sample tea leaf image;
and utilizing the sample tea image and the enhanced image thereof to manufacture the training set.
In some alternative embodiments, the process of obtaining the sample tea leaf image comprises:
and carrying out image acquisition on the tea trees in the tea planting area by using remote sensing equipment loaded on an unmanned aerial vehicle to obtain a plurality of sample tea images.
In some optional embodiments, the performing data enhancement processing on the sample tea leaf image comprises:
cutting the sample tea image based on a preset size to obtain a specification image;
performing super-resolution reconstruction on the specification image by using a super-resolution network to obtain a super-resolution image;
and performing data enhancement on the super-resolution image to obtain at least one enhanced image.
In some optional embodiments, the deep learning model comprises a backsbone unit added with an RFB module, a Neck unit added with an attention module, and a Head unit;
the inputting of the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images includes:
utilizing the BackBone unit to perform feature extraction on the sample tea image so as to obtain feature information, wherein the feature information comprises: the low-level spatial features and the high-level semantic features corresponding to the sample tea images; the RFB module is used for extracting partial low-level spatial features and partial high-level semantic features;
inputting the low-level spatial features and the high-level semantic features to a Neck unit of the target detection network by using the BackBone unit;
performing feature fusion on the low-layer spatial features and the high-layer semantic features by using the Neck unit to obtain feature fusion results;
acquiring a plurality of feature maps corresponding to the feature fusion result by using the attention module;
and generating a corresponding detection frame by using the Head unit aiming at each characteristic graph so as to obtain prediction data of a disease detection result of the sample tea image.
In some optional embodiments, the annotation data is used to indicate the position information of the scab leaf in the sample tea leaf image, the type of disease corresponding to the sample tea leaf image, and the confidence corresponding to the tea leaf image;
updating the model parameters of the deep learning model based on the prediction data and the labeling data of the disease detection result of the sample tea image, wherein the updating comprises the following steps:
acquiring a loss value corresponding to the sample tea image based on the prediction data and the labeling data of the disease detection result of the sample tea image;
acquiring feature weight information of a plurality of feature maps by using the loss value and a random gradient descent mode;
and updating the model parameters of the deep learning model based on the feature weight information of the plurality of feature maps.
In some optional embodiments, the process of obtaining the model parameters comprises:
receiving a value setting operation with an interactive device, and determining a parameter value of at least one of the model parameters in response to the value setting operation.
In some alternative embodiments, the attention module is a two-dimensional hybrid attention module;
the two-dimensional mixed attention module is divided into an upper branch and a lower branch, the upper branch comprises a channel attention submodule and a space attention submodule, and the lower branch comprises a coordinate attention submodule.
In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of any of the methods described above.
Drawings
The present application is further described below with reference to the accompanying drawings and embodiments.
Fig. 1 shows a flow chart of a detection method for tea diseases provided by the present application.
Fig. 2 shows a schematic flowchart of acquiring a training set according to the present application.
Fig. 3 shows a schematic flow chart of a data enhancement process performed on a sample tea leaf image according to the present application.
Fig. 4 shows a schematic structural diagram of a tea disease detection device provided by the present application.
Fig. 5 shows a block diagram of an electronic device provided in the present application.
Fig. 6 shows a schematic structural diagram of a program product provided in the present application.
Fig. 7 shows a schematic structural diagram of a tea disease detection model provided by the present application.
Fig. 8 shows a schematic structural diagram of a two-dimensional attention mixing module provided in the present application.
Detailed Description
The technical solutions in the present application will be described below with reference to the drawings and the detailed description of the present application, and it should be noted that, in the present application, new embodiments can be formed by any combination of the following described embodiments or technical features without conflict.
In this application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, a and b and c, wherein a, b and c can be single or multiple. It is to be noted that "at least one item" may also be interpreted as "one or more item(s)".
It is also noted that the terms "exemplary" or "such as" and the like are used herein to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion.
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the present application, the embodiments or technical features described below may be arbitrarily combined to form a new embodiment without conflict.
Method embodiment
Referring to fig. 1, fig. 1 shows a schematic flow chart of a detection method for tea diseases provided by the present application.
The detection method of the tea disease is used for detecting tea, and the method comprises the following steps:
step S101: inputting a tea image to be detected into a tea disease detection model to obtain a disease detection result of the tea image to be detected, wherein the disease detection result of the tea image to be detected is used for indicating whether at least one leaf corresponding to the tea image to be detected has a target disease;
wherein, the training process of the tea disease detection model comprises the following steps:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
Therefore, the step of detecting the tea image to be detected through the tea disease detection model may be to input the tea image to be detected into the tea disease detection model to obtain a corresponding detection result. Wherein, the training process may include: firstly, a training set is obtained, wherein the training set comprises a plurality of training data, and a disease detection result of a sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease. Whether at least one leaf corresponding to the sample tea image has the target disease or not can be intuitively and efficiently displayed, and the intelligent degree is high. The sample tea images in the training data can be input into a preset deep learning model to obtain prediction data of the disease detection result of the sample tea images. And (3) acquiring a tea disease detection model through training, and detecting. The method is based on a computer vision technology, and can better fit data and actual conditions by utilizing a deep learning model. The deep learning model has strong fitting capability, can approach a complex function to reach infinite dimension, and further improves the testing precision. The method overcomes the defect of manually extracting the image characteristics of the tea, obviously improves the identification precision, and expands a brand new research visual angle for detecting the tea diseases by combining the method with agricultural information perception. The tea disease detection model can be used for rechecking tea to be detected, and is updated and adjusted, so that the disease period, disease degree and disease position of the tea can be followed globally. The method is favorable for making a thorough treatment scheme aiming at different disease conditions of different positions of the tea trees according to the detection result of the tea disease detection model.
In some optional embodiments, treatment measures such as pesticide spraying and diseased leaf removing can be taken according to the detection result of the tea disease detection model. Can judge the position of sick blade according to the testing result to planning the navigation route, transmitting to unmanned aerial vehicle or removing the end, adopting unmanned aerial vehicle or the artifical mode of spraying the pesticide, carrying out the pertinence treatment to sick blade. The disease degree of the diseased leaves can be judged according to the detection result, pesticide preparation with different concentrations is carried out according to different disease degrees, and the pesticide is applied according to the symptoms, so that the resources are saved, and the environment is protected. The planned navigation route can also be used for tea disease rechecking to verify pesticide effect and make adaptive adjustment according to the rechecking result, for example, if the ill degree of ill leaves is weakened, the pesticide concentration can be reduced, the spraying frequency can be reduced or further treatment can not be carried out; if the degree of the disease of the diseased leaves is not changed, the pesticide concentration can be increased, the spraying times can be increased or the next round of targeted treatment can be carried out.
The target disease is not limited in the embodiments of the present application, and refers to a plant disease and insect pest, which may be, for example, tea leaf clouding leaf blight, tea anthracnose, tea leaf cake disease, tea leaf black rot, tea leaf brown spot, tea wheel spot, tea tarsal mite, tea aphid, and the like.
The number of leaves with the target disease corresponding to each tea image to be detected is not limited in the embodiment of the present application, and may be, for example, 1, 2, 3, 4, 5, 10, 50, 100, 200, 500, 1000, 10000, 10000000, and the like.
The number of training data in the training set is not limited in the embodiment of the present application, and may be, for example, 200, 500, 1000, 10000, 10000000, and the like.
The format of the sample tea image is not limited in the embodiment of the present application, and may be BMP, JPG, PNG, JPEG, TIF, GIF, or the like, for example.
The size of the sample tea leaf image is not limited in the embodiments of the present application, and may be, for example, 10KB, 11KB, 15KB, 1MB, 7MB, or the like.
The method for acquiring the annotation data in the embodiment of the present application is not limited, and for example, a manual annotation method may be adopted, and an automatic annotation method or a semi-automatic annotation method may also be adopted.
The embodiment of the present application is not limited to the marking data, and the marking data may be one or more of chinese, letters, numbers, symbols, shapes, and colors, for example.
In some optional embodiments, the method may further comprise: a verification set and a test set are obtained. The verification set is used for verifying whether sample tea leaves are diseased or not, and the test set is used for testing whether tea leaves to be tested are diseased or not.
Referring to fig. 2, fig. 2 shows a schematic flowchart of a process for acquiring a training set provided in the present application.
In some optional embodiments, the acquiring the training set may include:
step S201: performing data enhancement processing on the sample tea leaf image to obtain at least one enhanced image corresponding to the sample tea leaf image;
step S202: and utilizing the sample tea image and the enhanced image thereof to manufacture the training set.
Therefore, data enhancement processing is carried out on the sample tea image, more image data are generated from limited image data by using a computer vision method, the number and diversity of training samples are increased, and the robustness and generalization capability of a tea disease detection model are improved. Data enhancement processing is an important branch of digital image processing, and in view of the situation that the visual effect of image shooting is poor due to the influence of scene conditions, data enhancement on the image can improve the visual effect expressed by the image, such as highlighting certain characteristics of a target object in the image, extracting characteristic parameters of the target object from the digital image, and the like, which are beneficial to the identification, tracking and understanding of the target in the image.
The main content of data enhancement processing is to highlight the interested part in the image, weaken or remove unnecessary or unimportant information, and strengthen useful information, thereby obtaining a more practical image or converting the image into an image more suitable for human or machine analysis processing, and achieving the effects of reducing image degradation caused by uneven light, color distortion and the like and enhancing the information expression effect of a color image. If the tea image is not processed by data enhancement, the detection effect is poor due to the problems of low pixel, color distortion, insufficient image quantity and the like of the acquired image.
The operation of enhancing the data of the image may further include augmenting the image, which may be, for example, flipping, translating, rotating, mirroring, mosaic (mosaics) operation, and the like, and data augmentation is a generic term of a method of augmenting data. The data amplification can increase samples of a training set, can effectively relieve the overfitting condition of the model, and can bring stronger generalization capability to the model, so that the training data is close to the test data as much as possible, thereby improving the prediction precision and enabling the network to learn more robust characteristics. Data enhancement can highlight certain characteristics of a target object in an image, extract characteristic parameters of the target object from a digital image and the like, and the characteristics, the tracking and the understanding of the target in the image are facilitated.
The main content of the data enhancement processing is to highlight interesting parts in the image and reduce or remove unnecessary information. This enhances the useful information to obtain a more practical image or to convert it to an image more suitable for analysis by a machine. The images are randomly scaled and then spliced in a randomly distributed mode, so that an image data set is enriched, the network robustness is better, and the loss of a GPU (graphics processing Unit) can be reduced.
The data enhancement mode of the embodiment of the present application is not limited, and can be, for example, supervised data enhancement such as geometric transformation (flipping, rotating, clipping, deforming, scaling), color transformation (noise, blurring, discoloring, erasing, filling) and unsupervised data enhancement.
In other alternative embodiments, the process of obtaining the sample tea leaf image comprises:
and carrying out image acquisition on the tea trees in the tea planting area by using remote sensing equipment loaded on an unmanned aerial vehicle to obtain a plurality of sample tea images.
Therefore, the remote sensing equipment loaded on the unmanned aerial vehicle is used for collecting images, the unmanned aerial vehicle can be used as an aerial platform, the remote sensing sensor (namely the remote sensing equipment) is used for acquiring information, the image information is processed by the computer, and the images are manufactured according to certain precision requirements.
The remote sensing sensor uses corresponding airborne remote sensing equipment, such as a high-resolution CCD digital camera, a light optical camera, a multispectral imager, an infrared scanner, a laser scanner, a magnetic measuring instrument, a synthetic aperture radar and the like, according to different types of remote sensing tasks. The remote sensing sensor has the characteristics of digitalization, small volume, light weight, high precision, large storage capacity, excellent performance and the like.
The remote sensing device mounted on an unmanned aerial vehicle is used for acquiring images, namely, the Unmanned Aerial Vehicle Remote Sensing (UAVRS) technology is used as an aerial remote sensing means, and the remote sensing device has the advantages of long endurance time, real-time transmission of images, detection in high-risk areas, low cost, high resolution, flexibility and the like.
In this application, utilize the remote sensing equipment who loads in unmanned aerial vehicle to carry out image acquisition, can practice thrift the human cost in a large number, reduce the potential safety hazard that exists when artifical data collection, have the effect of comprehensive, high-efficient, high quality collection image.
The remote sensing device is not limited in kind in the embodiments of the present application, and may be, for example, a high-resolution CCD digital camera, a light optical camera, a multispectral imager, an infrared imager, and the like.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a data enhancement process performed on a sample tea image according to the present application.
In some optional embodiments, the performing data enhancement processing on the sample tea leaf image comprises:
step S301: cutting the sample tea image based on a preset size to obtain a specification image;
step S302: performing super-resolution reconstruction on the specification image by using a super-resolution network to obtain a super-resolution image;
step S303: and performing data enhancement on the super-resolution image to obtain at least one enhanced image.
Therefore, the sample tea image can be cut based on the preset size, so that an image which meets the preset specification is obtained, image parameters required by the model can be fitted better, and the model can be trained successfully. The super-resolution reconstruction refers to a technology of reconstructing and converting one or more frames of images into images or videos with higher resolution by analyzing digital image signals and adopting a software algorithm mode.
The method has the advantages that the corresponding high-resolution image can be reconstructed from the observed low-resolution image, so that the adverse effects on the image caused by the imaging environment, the imaging distance, the shape and the size of the sensor, the error of an optical system, air disturbance, object motion and lens defocusing are reduced. In the application, a clearer image can be reconstructed by using a learning-based super-resolution algorithm, and the problem of insufficient resolution of the remote sensing image of the unmanned aerial vehicle is solved.
Tea tree is an important economic crop, and its main value lies in the leaves of tea tree. Compared with the leaves of poplar, phoenix tree, plantain tree and Chinese redbud tree, the leaves of tea tree are smaller, the difficulty of the tea tree in the aspect of detection is higher, and the precision of the required image is relatively higher. For detecting tea diseases, not only each tea leaf but also the position of the disease on the leaf should be located, and based on the above factors, it is essential to perform data enhancement on the collected tea leaf image. The enhanced image obtained by data enhancement can also be used as a comparison image for retest, and the difference or the same part of the tea image and the enhanced image during retest can be more intuitively displayed, so that whether the position and the condition of the tea disease change or not is judged.
Cutting the tea image, for example, reading the image by opencv, cutting the image by tensireflow, and finally displaying the picture by matplotlib, wherein the cutting size can be set first, the image is cut according to the preset size, and the BGR format set by opencv of the image is converted into the RGB format.
The super-resolution reconstruction of the tea image by using the super-resolution network can comprise the following steps:
(1) Image I with resolution H x W LR Performing convolution operation to extract shallow feature F with resolution of H × W 0
F 0 =H SF (I LR )
Wherein H SF (. Cndot.) denotes the convolution operation.
(2) F is to be 0 Extracting deep features from RIR module to obtain deep features F with resolution H × W DF
F DF =H RIR (F 0 )
Wherein H RIR (. Cndot.) represents a very deep RIR structure, which contains G Residual Groups (RGs).
(3) By an up-sampling module pair F DF Performing up-sampling to obtain up-sampling features F with the resolution of 2H x 2W UP
(4) Up-sampling feature F UP Reconstructing super-resolution image I with resolution of 2H x 2W through convolution layer SR
The method for optimizing the super-resolution network can be as follows:
(1) Calculating the loss of the super-resolution algorithm can use L 1 Loss function calculation I SR And I FR Error between, L 1 The formula for the loss function is as follows:
Figure BDA0003759422140000131
where N represents the number of pixel points in an image, x i ' and x i Pixel values respectively representing relative positions on two images needing error calculation;
(2) According to the loss L 1 The value of the random gradient is subjected to reverse propagation to optimize a super-resolution network;
the super-resolution image is subjected to data enhancement, the influence of uneven illumination on the brightness and contrast of a tea picture can be reduced, for example, an illumination uneven image self-adaptive correction algorithm based on a two-dimensional gamma function can be used, a multi-scale Gaussian surrounding function is used for extracting an illumination component of a scene, then the two-dimensional gamma function is constructed, the parameters of the two-dimensional gamma function are adjusted by using the distribution characteristics of the illumination component, the brightness value of an image in an over-strong illumination area is reduced, the brightness value of the image in the over-dark illumination area is improved, and finally self-adaptive correction processing of the illumination uneven image is achieved. The specific steps can be as follows:
(1) Dividing the super-resolution image I (x, y) into R, G, B three channels;
(2) Constructing a gaussian surround function G (x, y):
Figure BDA0003759422140000141
when the sigma is smaller, the detail information of the edge can be better kept, the dynamic range is enlarged, but the color cannot be kept; when the sigma is larger, the color recovery effect is good, but the dynamic range becomes smaller, and the detail information of the edge cannot be well maintained.
(3) Obtaining an illumination component L (x, y) by utilizing convolution of a Gaussian surrounding function and the enhanced image I (x, y);
L(x,y)=I(x,y)*G(x,y)
(4) Subtracting the super-resolution image and the illumination component in a logarithmic domain to obtain a reflection component as an output result image r (x, y);
Figure BDA0003759422140000142
the data enhancement operation on the image may further include expanding the image, for example, turning, translating, rotating, mirroring, mosaic operation, etc. may be performed on the image. In some alternative embodiments, image flipping may be accomplished using call function flip () in OpenCV; by defining a translation matrix M, calling a warpAffine () function to realize image translation; rotation around the center of the image is achieved using getroto matrix2D () function and warpaffin () function, and mirror image swapping in the horizontal, vertical, etc. directions is performed on the image using cv2.Flip ().
In some optional embodiments, the operation of performing Mosaic processing on the image may be: firstly, reading data information of a picture, generating random coordinates to indicate the directions of the upper part, the lower part, the left part and the right part, acquiring position parameters of a rectangular cutting area, setting the width of a mosaic block, covering the mosaic block with vertex colors, and enabling a result image to contain mosaic blocks with different or same degrees so as to carry out fuzzy processing on the image. The Mosaic processing can randomly zoom the pictures and then splice the pictures in a randomly distributed mode, so that an image data set is enriched, the network robustness is better, and the loss of a GPU can be reduced.
In some optional embodiments, the deep learning model comprises a backsbone unit added with an RFB module, a Neck unit added with an attention module, and a Head unit;
the inputting of the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images includes:
performing feature extraction on the sample tea image by using the BackBone unit to acquire feature information, wherein the feature information comprises: the low-level spatial features and the high-level semantic features corresponding to the sample tea images; the RFB module is used for extracting partial low-level spatial features and partial high-level semantic features;
inputting the low-level spatial features and the high-level semantic features to a Neck unit of the target detection network by using the BackBone unit;
performing feature fusion on the low-level spatial features and the high-level semantic features by using the Neck unit to obtain feature fusion results;
acquiring a plurality of feature maps corresponding to the feature fusion result by using the attention module;
and generating a corresponding detection frame by using the Head unit aiming at each characteristic graph so as to obtain prediction data of a disease detection result of the sample tea image.
Therefore, a multi-scale RFB module can be added in the BackBone unit, the extraction capability of the detail characteristics of the tea can be improved, and the problem of missing detection caused by smaller blades is reduced. Wherein, add (independently designed) attention module in the tack unit, reduce because of the dense missed measure and the false retrieval problem that leads to of blade distribution. Tea tree is an important economic crop, and its main value lies in the leaves of tea tree. The tea tree is bush or small tree of Theaceae and Camellia, and has no hair on tender branch. She Gezhi, long round or ellipse, 4-12 cm long, 2-5 cm wide, blunt or sharp tip, wedge-shaped base, bright upper surface, no hair or soft hair at first time, 5-7 pairs of side veins, sawtooth at edge, 3-8 mm long petiole, and no hair. Compared with other economic crops such as wheat, rice, corn, sorghum, beet, beans, potatoes and highland barley, the leaves of tea trees are denser, so units and modules with higher average precision and higher detection speed are used in a tea disease detection model. And an attention module based on a human visual attention mechanism is added, so that global and local connection can be acquired in a more targeted manner, key information can be found, and the tea disease position needing attention can be positioned in one step.
In the embodiment of the present application, the tea disease detection model may be constructed based on a YOLO series network such as a YOLO 3 network, a YOLO 4 network, a YOLO 5 network, and a YOLO network.
In the embodiment of the present application, the constructed tea disease detection model may also be referred to as: DDMA-YOLO. DDMA refers to the attention module in the embodiments of this application.
In the embodiment of the present application, constructing the tea disease detection model may include: as an example, a tea disease detection model can be constructed on the basis of a YOLOv5 network, and the tea disease detection model consists of a backhaul unit, a Neck unit and a Head unit, wherein the backhaul unit is used for feature extraction, the Neck unit is used for bidirectional fusion of low-level spatial features and high-level semantic features, the Head unit generates a detection frame, and information such as detection category, coordinates and confidence coefficient is generated by applying an anchor frame to a feature map of the Neck unit in three dimensions; the RFB module takes the features extracted by the trunk as input and divides the features into three scales, and each scale firstly reduces the dimension of the input features through a convolution layer of 1 multiplied by 1. Then, the feature maps with different receptive field sizes are generated from the convolution of holes with the hole rates of 1,3 and 5 through 1 × 5 convolution layers of 1 × 1,3 × 3 and 5 × 5 respectively, feature fusion is carried out through Concat and convolution of 1 × 1, and finally, output results are obtained by using shortcut in ResNet and the summation.
Referring to fig. 7 and 8, fig. 7 shows a schematic structural diagram of a tea disease detection model provided by the present application, and fig. 8 shows a schematic structural diagram of a two-dimensional attention mixing module provided by the present application.
In the embodiment of the application, an attention module is added in a hack unit of a tea disease detection model, wherein the attention module can be a two-dimensional mixed attention module, for example, the two-dimensional mixed attention module is divided into an upper branch and a lower branch in parallel, the upper branch is composed of a channel attention submodule and a space attention submodule, and the lower branch is composed of a coordinate attention submodule. The upper branch channel attention submodule respectively carries out 2D global pooling on the input feature map F to obtain two groups of feature vectors, and then the two groups of feature vectors are sent into a weight sharing multilayer perceptron (MLP) network with a hidden layer to generate a channel attention feature map W c (F):
W c (F)=σ{MLP[AvgPool(F)]+MLP[MaxPool(F)]}
Wherein AvgPool and MaxPool represent average pooling and maximum pooling, and σ represents sigmoid activation function.
Next, the channel attention feature map W is c (F) Performing 2D global pooling and stitching on channel dimensions to obtain a feature map with a size of h × w × 2, and then using a convolution kernel k 7×7 Reducing the dimension of the channel to 1, and generating a space attention characteristic diagram W after biasing S (F):
W S (F)=σ{k 7×7 [AvgPool(W c );MaxPool(W c )]}
Wherein { } represents the feature map after the splicing pooling.
Finally, multiplying the obtained spatial feature information by the input channel attention feature map to obtain the attention feature map W output by the upper branch U (F)。
The coordinate attention submodule of the lower branch is to generate two directional perceptual vectors z in the vertical and horizontal directions using two 1D global pooling X 、z Y Then, z is further substituted X 、z Y Feature aggregation is performed in two spatial directions, returning a directional perceptual attention map F':
z X =X AvgPool(F)
z Y =Y AvgPool(F)
Figure BDA0003759422140000161
wherein X AvgPool and Y AvgPool represent average pooling along the horizontal and vertical axes of the feature map, respectively.
Figure BDA0003759422140000162
Representing 1*1 convolution, BN, sigmoid operation.
Next, F 'is separated into two directional perceptual vectors z' X And z' Y To z' X And z' Y After convolution and nonlinear processing, multiplying the original characteristic diagram F to obtain the attention characteristic diagram W of the output of the lower branch D (F)。
And finally, fusing and offsetting the attention feature maps obtained by the upper branch and the lower branch to obtain a feature map W (F) which is weighted by a two-dimensional mixed attention module:
W(F)=0[W u (F)+W D (F)]
the deep learning model training process is not limited in the present application, and for example, a supervised learning training mode may be adopted.
In an embodiment of the present application, the attention module may be a two-dimensional hybrid attention module, which may include a channel attention sub-module, a coordinate attention sub-module, and the like.
In some optional embodiments, the annotation data is used to indicate the position information of the scab leaf in the sample tea leaf image, the type of disease corresponding to the sample tea leaf image, and the confidence corresponding to the tea leaf image;
the updating of the model parameters of the deep learning model based on the prediction data and the annotation data of the disease detection result of the sample tea image comprises:
acquiring a loss value corresponding to the sample tea image based on the prediction data and the labeling data of the disease detection result of the sample tea image;
acquiring feature weight information of a plurality of feature maps by using the loss value and a random gradient descent mode;
and updating the model parameters of the deep learning model based on the feature weight information of the plurality of feature maps.
Therefore, a loss value corresponding to the sample tea image is obtained based on the prediction data and the labeling data of the disease detection result of the sample tea image; acquiring feature weight information of a plurality of feature maps by using a random gradient descent mode; and updating the model parameters of the deep learning model based on the feature weight information of the feature maps, so that the model approaches to a real condition and has better fitting degree. The loss function can be used for measuring the quality of model prediction and can be used for expressing the difference degree between the prediction and actual data. In general, the better the loss function, the better the performance of the model.
Through design, a proper amount of neuron calculation nodes and a multilayer operation hierarchical structure are established, a proper input layer and a proper output layer are selected, a preset deep learning model can be obtained, through learning and optimization of the preset deep learning model, a functional relation from input to output is established, although the functional relation between input and output cannot be found 100%, the functional relation can be close to a real association relation as far as possible, the disease detection model obtained through training can obtain disease detection information of a tea image based on disease detection data of the tea image, and the accuracy and the reliability of a calculation result are high.
In one embodiment of the application, the training process of the deep learning model may be:
(1) And (3) marking operation: labeling the tea image by using a labeling tool Labelimg to obtain the position information of the scab blade;
(2) Setting the hyper-parameters of training: setting the initial learning rate to be 0.01, each training batch to be 8 and the total iteration number to be 200 rounds;
(3) Inputting the tea image labeled in the step (1) into a deep learning model for feature extraction, and obtaining three different prediction data through an RFB module, a two-dimensional mixed attention module and a Head unit of the deep learning model, wherein the three different prediction data comprise: predicting frame coordinate information, category information and confidence coefficient information;
(4) Calculating the loss: the category loss and the confidence loss adopt a cross entropy loss function, the position loss adopts CIOU loss, and the difference L between the position and the real position is calculated respectively loc The difference L between category and real category cls And the difference L between the confidence and the true confidence cof From L to L loc 、L cls And L cof Summing to obtain the loss L D
(5) Gradient back propagation optimization deep learning model: according to the loss L D The gradient is calculated, the gradient is subjected to back propagation by adopting a random gradient descent algorithm, the weight is updated, and finally the weight W is obtained.
In some optional embodiments, the process of obtaining the model parameters comprises:
receiving a value setting operation with an interactive device, and determining a parameter value of at least one of the model parameters in response to the value setting operation.
Therefore, the interactive equipment is used for receiving parameter setting operation, and the model parameters can be set in the model according to preset model parameters, such as initial learning rate parameters, training batch parameters, total iteration round number parameters and the like of the model, and the interactive equipment (such as a mouse, a keyboard and the like) is used for receiving the setting operation. The number of parameters to be adjusted is different according to the complexity of the model. The model parameters are configuration variables in the model, the values of the model parameters can be estimated according to data, and the model training performance can be improved and the model can be further optimized by receiving and setting the model parameters.
The preset training end condition is not limited in the present application, and may be, for example, that the training frequency reaches the preset frequency (the preset frequency is, for example, 1 time, 3 times, 10 times, 100 times, 1000 times, 10000 times, etc.), or that training data in a training set all complete one or more times of training, or that a total loss value obtained by this training is not greater than a preset loss value.
The preset similarity threshold is not limited in the present application, and may be, for example, 81%, 83%, 92%, 95%, 99.9%, or the like.
The application does not limit the type of the interactive device, and the interactive device can be a mouse, a keyboard, an intelligent touch pad, an intelligent touch pen, a mobile phone, a tablet computer, an intelligent wearable device and the like.
The method for receiving various parameter setting operations by using the interactive device is not limited, and the operations are divided according to the input mode, and may include, for example, text input operation, number input operation, key operation, mouse operation, keyboard operation, intelligent touch pen operation, and the like.
In some alternative embodiments, the attention module is a two-dimensional hybrid attention module;
the two-dimensional mixed attention module is divided into an upper branch and a lower branch, the upper branch comprises a channel attention submodule and a space attention submodule, and the lower branch comprises a coordinate attention submodule.
Therefore, the channel attention submodule similarly applies a weight to the feature map of each channel to represent the correlation degree of the channel and the key information, and the larger the weight is, the higher the correlation degree is. In the neural network, the higher the dimension of the feature map, the smaller the dimension, the more the number of channels, and the channels represent the feature information of the whole image.
The channel attention submodule can often play a good role in processing image characteristic information. The space attention submodule can be used for enabling the model to adaptively learn the feature representation with the character position information during the serialized feature extraction, enabling the model to pay more attention to the specified area in the image, and obtaining the space feature with the two-dimensional space position information.
The coordinate attention mechanism can decompose channel attention into two parallel one-dimensional feature codes to efficiently integrate space coordinate information into a generated attention feature map, can capture information across channels, and further comprises direction-aware and position-sensitive information, so that the deep learning model can more accurately position and identify a target region.
Compared with a convolution Attention mechanism Module (namely CBAM (Convolitional Block Attention Module)), the two-dimensional mixed Attention Module is additionally provided with a coordinate Attention mechanism Module, so that the characteristics of tea leaves can be better subjected to focus extraction, the information of the tea leaf image can be extracted in a multi-azimuth, high-precision and comprehensive and high-efficiency manner, and the performance of a deep learning model is improved.
In an embodiment of the present application, the tea disease detection module includes:
a BackBone unit, wherein Focus refers to a Focus module and is used for carrying out slicing operation on the image; CPS refers to CSP module, which is used to divide the input into two branches, and respectively carry out convolution operation to reduce the number of channels by half; CBL refers to a CBL module, i.e., conv + BN + Leaky Relu.
A hack unit, wherein UP _ Sample refers to upsampling for completing the "decompression" operation of the picture; concat refers to a concatemate operation for merging the feature matrix matrices in a preset direction.
Head unit, where Conv refers to the convolutional layer, large-scale detection layer refers to the detection layer at the Large scale, medium-scale detection layer refers to the detection layer at the Medium scale, and Small-scale detection layer refers to the detection layer at the Small scale.
In a specific application scene, a remote sensing device loaded on an unmanned aerial vehicle can be used for shooting sample tea images in training data of a training set, the sample tea images are manually marked, and after the training set is manufactured, a preset deep learning model is trained by the training set to obtain a tea disease detection model.
When tea leaves are detected, a remote sensing device loaded on an unmanned aerial vehicle is used for shooting each area (each area corresponds to one or more tea trees or corresponds to part of one tea tree) to obtain a plurality of tea leaf images to be detected, and the tea leaf images to be detected are respectively input into a tea leaf disease detection model, so that a disease detection result corresponding to each tea leaf image to be detected can be obtained. If the disease detection result corresponding to at least one to-be-detected tea image is used for indicating that the corresponding leaf has the target disease, preliminarily judging that the leaf corresponding to the area possibly has the target disease, at the moment, a remote sensing device with higher precision or a high-resolution camera is needed to shoot one or more to-be-detected tea images in the area again, inputting the newly-shot to-be-detected tea images into the tea disease detection model again to obtain corresponding disease detection results, and if the disease detection result corresponding to at least one image in the newly-shot to-be-detected tea images is used for indicating that the corresponding leaf has the target disease, determining that the leaf corresponding to the area has the target disease. The tea disease detection method has the advantages that the tea disease detection process is divided into two stages, the possibility of diseases is detected in the first stage, whether the diseases exist or not is confirmed in the second stage, and compared with the prior art that whether the diseases exist or not is confirmed in a single detection step, the accuracy of tea disease detection in a single area can be improved by verifying the disease detection result in the first stage through the disease detection result in the second stage.
When the target diseases of the leaves corresponding to the area are confirmed, generating a medicine spraying strategy corresponding to the area based on a disease detection result of the tea image to be detected, wherein the medicine spraying strategy comprises a medicine type, a medicine concentration, a spraying time, a spraying dosage, a spraying frequency, a spraying route and the like. And (3) executing a medicine spraying task corresponding to the medicine spraying strategy by using a medicine spraying device loaded on the unmanned aerial vehicle (or using a medicine spraying robot with a self-moving function) so as to treat the target diseases of the blades corresponding to the area. That is to say, after detecting out the blade and have target disease, can utilize unmanned aerial vehicle or robot automatic execution medicine to spray the tea tree of task in order to treat this region, further use manpower sparingly cost promotes and sprays efficiency.
After the medicine spraying task is executed, after a preset time (for example, 1 day, 1 week or 1 month), shooting again by using a remote sensing device loaded on an unmanned aerial vehicle to obtain a tea image to be detected in the area, inputting the tea image to be detected, which is obtained by shooting again, into the tea disease detection model to obtain a disease detection result, if at least one image in the tea image to be detected, which is obtained by shooting again, is used for indicating that the leaves have target diseases, it is indicated that the previous medicine spraying strategy is possibly not applicable, the medicine dosage needs to be increased, at this time, the medicine spraying strategy can be readjusted by combining with the opinion of a tea specialist, and the automatic spraying task is continuously executed according to the adjusted medicine spraying strategy. And after the preset time interval or the shorter time interval, shooting the tea image to be detected in the area again, detecting the disease again, judging whether the medicine spraying strategy needs to be continuously adjusted according to the disease detection result, and repeating the steps until the disease detection result of the tea image to be detected in the area is used for indicating that the corresponding leaf does not suffer from the target disease. The tea tree spraying device has the advantages that the medicine spraying strategy can be adjusted in time according to the treatment effect after medicine spraying, the problem that tea leaves suffer from target diseases is solved as soon as possible, and the tea tree can be guaranteed to bring expected economic benefits to planters. In addition, the medicine spraying process adopts an intelligent and manual processing mode, and the guiding effect of high efficiency and the experience of experts with old qualification for many years is considered.
In a specific application scenario, the unmanned aerial vehicle refers to an unmanned aerial vehicle, generally refers to an unmanned aerial vehicle, such as various types of unmanned aerial vehicle piloted airplanes, unmanned helicopters, unmanned multi-rotor aircrafts (multi-rotor/multi-shaft aircrafts), and the technical field to which the unmanned aerial vehicle relates is very wide, and includes a sensor technology, a communication technology, an information processing technology, an intelligent control technology, an aviation power propulsion technology and the like, and is a product with high technical content in the information era. The unmanned aerial vehicle can not only meet working requirements as a flight working platform, but also easily go deep into the fields of plant protection, electric power inspection, disaster rescue, aerial photography and the like by virtue of the aerial operation capability of the unmanned aerial vehicle. Simultaneously, unmanned aerial vehicle also possesses outstanding data acquisition ability, consequently also can regard as the connection port of internet.
In a specific application scenario, when the drone executes a specific flight task, instruments, devices and systems for the specific task need to be loaded, which is called a task load of the drone. The unmanned aerial vehicle task load can be used for collecting data, monitoring, patrolling, stringing, airdrop articles, carrying out atmospheric monitoring, sampling, communication, experiments, relaying and the like. The task load equipment for collecting the images is a high-resolution CCD digital camera, a light optical camera and the like; photoelectric task load devices used for reconnaissance, monitoring and patrol include visible light loads, thermal infrared imagers, thermal ultraviolet imagers, synthetic aperture radars, laser radars, multispectral cameras, and the like. The drone performs different tasks to configure the photovoltaic load according to the desired use.
In a specific application scenario, the step of remotely sensing and acquiring the tea image by using the unmanned aerial vehicle can be as follows: planning a flight route of the unmanned aerial vehicle based on basic geographic information and tea tree distribution information of the area to be measured; setting at least two information acquisition modes and corresponding trigger conditions (such as remote control trigger, electric signal trigger, optical signal trigger, sound trigger, instruction trigger and the like); acquiring tea images based on at least one information acquisition mode, analyzing the acquired tea images in real time, and judging and triggering different information acquisition modes according to an analysis result; the method comprises the steps of collecting and analyzing collected tea images in real time, judging and triggering different tea image collecting modes according to analysis results, collecting and storing the collected tea images and transmitting the collected tea images to a preset mobile device or an application end. This application adopts unmanned aerial vehicle remote sensing's tealeaves image acquisition method, and it can utilize unmanned aerial vehicle to realize reciprocal flight, the nimble advantage of equipment adjustment in the short time, is showing the remote sensing precision that promotes different terrain environment. In order to implement the tea image acquisition method based on unmanned aerial vehicle remote sensing, an acquisition route, an acquisition mode, a trigger condition, a cruise mode and the like can be reasonably planned, airborne equipment resources on the unmanned aerial vehicle can be utilized to the maximum degree, and the tea image in a complex-terrain tea tree planting environment can be quickly and conveniently acquired by combining an additionally-installed remote sensing device, so that subsequent tea disease detection operation can be conveniently and smoothly carried out.
Device embodiments
Referring to fig. 4, fig. 4 shows a schematic structural diagram of a tea disease detection device provided by the present application.
The application also provides a tea disease detection device, the specific implementation mode of which is consistent with the implementation mode and the achieved technical effect recorded in the implementation mode of the method, and part of the content is not repeated.
Tea disease detection device for detect tealeaves, the device includes:
the disease detection module 101 is configured to input a tea image to be detected to a tea disease detection model to obtain a disease detection result of the tea image to be detected, where the disease detection result of the tea image to be detected is used to indicate whether at least one leaf corresponding to the tea image to be detected has a target disease;
wherein, the training process of the tea disease detection model comprises the following steps:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
In some optional embodiments, the obtaining the training set includes:
performing data enhancement processing on the sample tea leaf image to obtain at least one enhanced image corresponding to the sample tea leaf image;
and utilizing the sample tea image and the enhanced image thereof to manufacture the training set.
In some alternative embodiments, the process of obtaining the sample tea leaf image comprises:
and carrying out image acquisition on the tea trees in the tea planting area by using remote sensing equipment loaded on an unmanned aerial vehicle to obtain a plurality of sample tea images.
In some optional embodiments, the performing data enhancement processing on the sample tea leaf image comprises:
cutting the sample tea image based on a preset size to obtain a specification image;
performing super-resolution reconstruction on the specification image by using a super-resolution network to obtain a super-resolution image;
and performing data enhancement on the super-resolution image to obtain at least one enhanced image.
In some optional embodiments, the deep learning model comprises a backsbone unit added with an RFB module, a Neck unit added with an attention module, and a Head unit;
the step of inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images includes:
utilizing the BackBone unit to perform feature extraction on the sample tea image so as to obtain feature information, wherein the feature information comprises: the low-level spatial features and the high-level semantic features corresponding to the sample tea images; the RFB module is used for extracting partial low-level spatial features and partial high-level semantic features;
inputting the low-level spatial features and the high-level semantic features to a Neck unit of the target detection network by using the BackBone unit;
performing feature fusion on the low-level spatial features and the high-level semantic features by using the Neck unit to obtain feature fusion results;
acquiring a plurality of feature maps corresponding to the feature fusion result by using the attention module;
and generating a corresponding detection frame by using the Head unit aiming at each characteristic graph so as to obtain prediction data of a disease detection result of the sample tea image.
In some optional embodiments, the annotation data is used for indicating the position information of the scab leaf in the sample tea leaf image, the type of disease corresponding to the sample tea leaf image, and the confidence corresponding to the tea leaf image;
the updating of the model parameters of the deep learning model based on the prediction data and the annotation data of the disease detection result of the sample tea image comprises:
acquiring a loss value corresponding to the sample tea image based on the prediction data and the labeling data of the disease detection result of the sample tea image;
acquiring feature weight information of a plurality of feature maps by using the loss value and a random gradient descent mode;
and updating the model parameters of the deep learning model based on the feature weight information of the plurality of feature maps.
In some optional embodiments, the process of obtaining the model parameters comprises:
receiving a value setting operation with an interactive device, and determining a parameter value of at least one of the model parameters in response to the value setting operation.
In some alternative embodiments, the attention module is a two-dimensional hybrid attention module;
the two-dimensional mixed attention module is divided into an upper branch and a lower branch, the upper branch comprises a channel attention submodule and a space attention submodule, and the lower branch comprises a coordinate attention submodule.
Device embodiments
The present application further provides an electronic device, where the electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the steps of any one of the methods described above when executing the computer program, where a specific implementation manner of the steps is consistent with the implementation manner and the achieved technical effect described in the implementation manner of the method, and details of some of the steps are not repeated.
Referring to fig. 5, fig. 5 is a block diagram illustrating a structure of an electronic device 200 provided in the present application. The electronic device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
The memory 210 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 211 and/or cache memory 212, and may further include Read Only Memory (ROM) 213.
The memory 210 further stores a computer program, and the computer program can be executed by the processor 220, so that the processor 220 implements the steps of any one of the methods, and the specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the implementation manner of the method, and some contents are not described again.
Memory 210 may also include a utility 214 having at least one program module 215, such program modules 215 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Accordingly, the processor 220 may execute the computer programs described above, and may execute the utility 214.
The processor 220 may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable Logic Devices (PLDs), complex Programmable Logic Devices (CPLDs), field-Programmable Gate arrays (FPGAs), or other electronic components.
Bus 230 may be one or more of any of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 240, such as a keyboard, pointing device, bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the electronic device 200, and/or with any devices (e.g., routers, modems, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may be through input-output interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The present application further provides a computer-readable storage medium, where the computer-readable storage medium is used for storing a computer program, and when the computer program is executed, the steps of any one of the methods are implemented, and a specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the implementation manner of the method, and some details are not repeated.
Media embodiments
The present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the methods are implemented, and a specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the implementation manner of the method, and some details are not repeated.
Referring to fig. 6, fig. 6 shows a schematic structural diagram of a program product 300 of a detection method for tea diseases provided by the present application. The program product 300 may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not so limited, and in this application, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 300 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that can communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the C programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
While the present application is described in terms of various aspects, features, and advantages, it is to be understood that such aspects are merely illustrative of and not restrictive on the broad application, and that all changes and modifications that come within the spirit and scope of the appended claims are desired to be protected by the following claims.

Claims (10)

1. A tea disease detection method is used for detecting tea, and comprises the following steps:
inputting a tea image to be detected into a tea disease detection model to obtain a disease detection result of the tea image to be detected, wherein the disease detection result of the tea image to be detected is used for indicating whether at least one leaf corresponding to the tea image to be detected has a target disease;
wherein, the training process of tea disease detection model includes:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
2. The method for detecting tea disease according to claim 1, wherein the obtaining of the training set includes:
performing data enhancement processing on the sample tea leaf image to obtain at least one enhanced image corresponding to the sample tea leaf image;
and utilizing the sample tea image and the enhanced image thereof to manufacture the training set.
3. The method for detecting tea disease according to claim 2, wherein the process of obtaining the sample tea image comprises:
and carrying out image acquisition on the tea trees in the tea planting area by using remote sensing equipment loaded on the unmanned aerial vehicle to obtain a plurality of sample tea images.
4. The method for detecting tea disease according to claim 2, wherein the performing data enhancement processing on the sample tea image includes:
cutting the sample tea image based on a preset size to obtain a specification image;
performing super-resolution reconstruction on the specification image by using a super-resolution network to obtain a super-resolution image;
and performing data enhancement on the super-resolution image to obtain at least one enhanced image.
5. The method for detecting tea diseases according to claim 1, wherein the deep learning model comprises a BackBone unit added with an RFB module, a Neck unit added with an attention module, and a Head unit;
the step of inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images includes:
utilizing the BackBone unit to perform feature extraction on the sample tea image so as to obtain feature information, wherein the feature information comprises: the low-level spatial features and the high-level semantic features corresponding to the sample tea images; the RFB module is used for extracting partial low-level spatial features and partial high-level semantic features;
inputting the low-level spatial features and the high-level semantic features to a Neck unit of the target detection network by using the BackBone unit;
performing feature fusion on the low-level spatial features and the high-level semantic features by using the Neck unit to obtain feature fusion results;
acquiring a plurality of feature maps corresponding to the feature fusion result by using the attention module;
and generating a corresponding detection frame by using the Head unit aiming at each characteristic graph so as to obtain prediction data of a disease detection result of the sample tea image.
6. The method for detecting a tea disease according to claim 5, wherein the annotation data is used for indicating position information of a scab leaf in the sample tea image, a disease type corresponding to the sample tea image, and a confidence corresponding to the tea image;
updating the model parameters of the deep learning model based on the prediction data and the labeling data of the disease detection result of the sample tea image, wherein the updating comprises the following steps:
acquiring a loss value corresponding to the sample tea image based on the prediction data and the annotation data of the disease detection result of the sample tea image;
acquiring feature weight information of a plurality of feature maps by using the loss value and a random gradient descent mode;
and updating the model parameters of the deep learning model based on the feature weight information of the plurality of feature maps.
7. The method for detecting tea disease according to claim 5, wherein the attention module is a two-dimensional hybrid attention module;
the two-dimensional mixed attention module is divided into an upper branch and a lower branch, the upper branch comprises a channel attention submodule and a space attention submodule, and the lower branch comprises a coordinate attention submodule.
8. A detection device of tealeaves disease for detect tealeaves, the device includes:
the disease detection module is used for inputting a tea image to be detected into the tea disease detection model to obtain a disease detection result of the tea image to be detected, and the disease detection result of the tea image to be detected is used for indicating whether at least one blade corresponding to the tea image to be detected has a target disease;
wherein, the training process of the tea disease detection model comprises the following steps:
acquiring a training set, wherein the training set comprises a plurality of training data, each training data comprises a sample tea image and label data of a disease detection result of the sample tea image, and the disease detection result of the sample tea image is used for indicating whether at least one leaf corresponding to the sample tea image has the target disease;
for each training data in the training set, performing the following:
inputting the sample tea images in the training data into a preset deep learning model to obtain prediction data of disease detection results of the sample tea images;
updating model parameters of the deep learning model based on prediction data and marking data of a disease detection result of the sample tea image;
detecting whether a preset training end condition is met or not; if yes, taking the trained deep learning model as the tea disease detection model; and if not, continuing to train the deep learning model by using the next training data.
9. An electronic device, characterized in that the electronic device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of claims 1-7 when the processor executes the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202210868307.8A 2022-07-22 2022-07-22 Detection method and related device for tea diseases Pending CN115294467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210868307.8A CN115294467A (en) 2022-07-22 2022-07-22 Detection method and related device for tea diseases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210868307.8A CN115294467A (en) 2022-07-22 2022-07-22 Detection method and related device for tea diseases

Publications (1)

Publication Number Publication Date
CN115294467A true CN115294467A (en) 2022-11-04

Family

ID=83824707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210868307.8A Pending CN115294467A (en) 2022-07-22 2022-07-22 Detection method and related device for tea diseases

Country Status (1)

Country Link
CN (1) CN115294467A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117152083A (en) * 2023-08-31 2023-12-01 哈尔滨工业大学 Ground penetrating radar road disease image prediction visualization method based on category activation mapping

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117152083A (en) * 2023-08-31 2023-12-01 哈尔滨工业大学 Ground penetrating radar road disease image prediction visualization method based on category activation mapping
CN117152083B (en) * 2023-08-31 2024-04-09 哈尔滨工业大学 Ground penetrating radar road disease image prediction visualization method based on category activation mapping

Similar Documents

Publication Publication Date Title
CN113065558B (en) Lightweight small target detection method combined with attention mechanism
Yang et al. Visual perception enabled industry intelligence: state of the art, challenges and prospects
CN109584248B (en) Infrared target instance segmentation method based on feature fusion and dense connection network
Ocer et al. Tree extraction from multi-scale UAV images using Mask R-CNN with FPN
CN104851099B (en) A kind of image interfusion method based on expression study
CN107918776B (en) Land planning method and system based on machine vision and electronic equipment
CN111126287B (en) Remote sensing image dense target deep learning detection method
CN111079739B (en) Multi-scale attention feature detection method
Bao et al. UAV remote sensing detection of tea leaf blight based on DDMA-YOLO
Wang et al. Side-view apple flower mapping using edge-based fully convolutional networks for variable rate chemical thinning
Wang et al. Application of convolutional neural network-based detection methods in fresh fruit production: a comprehensive review
CN112419333B (en) Remote sensing image self-adaptive feature selection segmentation method and system
CN112950780A (en) Intelligent network map generation method and system based on remote sensing image
CN116385902A (en) Remote sensing big data processing method, system and cloud platform
CN112861755A (en) Method and system for real-time segmentation of multiple classes of targets
CN114140637B (en) Image classification method, storage medium and electronic device
Liu et al. IntegrateNet: A deep learning network for maize stand counting from UAV imagery by integrating density and local count maps
Lin et al. A novel convolutional neural network architecture of multispectral remote sensing images for automatic material classification
CN115294467A (en) Detection method and related device for tea diseases
Lu et al. Citrus green fruit detection via improved feature network extraction
CN116543165B (en) Remote sensing image fruit tree segmentation method based on dual-channel composite depth network
CN112418112A (en) Orchard disease and pest monitoring and early warning method and system
Zhang et al. An improved target detection method based on YOLOv5 in natural orchard environments
CN113723833B (en) Method, system, terminal equipment and storage medium for evaluating quality of forestation actual results
Kalmukov et al. Methods for Automated Remote Sensing and Counting of Animals

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