CN116109994A - Lightweight disease identification method - Google Patents
Lightweight disease identification method Download PDFInfo
- Publication number
- CN116109994A CN116109994A CN202310108111.3A CN202310108111A CN116109994A CN 116109994 A CN116109994 A CN 116109994A CN 202310108111 A CN202310108111 A CN 202310108111A CN 116109994 A CN116109994 A CN 116109994A
- Authority
- CN
- China
- Prior art keywords
- disease
- module
- feature map
- identification
- classification
- 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
Links
- 201000010099 disease Diseases 0.000 title claims abstract description 160
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 title claims abstract description 160
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000005070 sampling Methods 0.000 claims abstract description 32
- 238000010586 diagram Methods 0.000 claims abstract description 24
- 238000012549 training Methods 0.000 claims abstract description 14
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000012360 testing method Methods 0.000 claims abstract description 7
- 238000007781 pre-processing Methods 0.000 claims abstract description 4
- 239000011159 matrix material Substances 0.000 claims description 12
- 230000004927 fusion Effects 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 6
- 238000011176 pooling Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 4
- 230000009467 reduction Effects 0.000 claims description 4
- 241000764238 Isis Species 0.000 claims description 3
- 208000037919 acquired disease Diseases 0.000 claims description 3
- 230000008859 change Effects 0.000 claims description 3
- 230000007306 turnover Effects 0.000 claims description 3
- 230000002708 enhancing effect Effects 0.000 claims description 2
- 230000002787 reinforcement Effects 0.000 claims description 2
- 238000013519 translation Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006806 disease prevention Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/02—Agriculture; Fishing; Forestry; Mining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
- G06V10/765—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing 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/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing 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/776—Validation; Performance evaluation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Business, Economics & Management (AREA)
- Biophysics (AREA)
- Mining & Mineral Resources (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Agronomy & Crop Science (AREA)
- Animal Husbandry (AREA)
- Marine Sciences & Fisheries (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Economics (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a light disease identification method, which comprises the following steps: acquiring a disease image dataset: preprocessing the acquired original disease image; constructing a disease identification light module; constructing a disease classification and identification model; the training set is input into a disease classification and identification model, the disease classification and identification model is trained, the test set is input into the trained disease classification and identification model, and a disease image identification result is output. According to the invention, a disease recognition lightweight module is constructed for extracting disease classification characteristic information, then a disease characteristic diagram with rich information is obtained through sampling and characteristic processing of 3 stages, and finally final disease classification recognition information is obtained through a classification module; compared with the current disease identification method, the method has the advantages that the identification accuracy is obviously improved, and the model size can be reduced to one fourth of the identification model with the same level, so that the method can be fully used for identifying the agricultural disease under the multi-category and complex background.
Description
Technical Field
The invention relates to the technical field of disease classification and identification, in particular to a lightweight disease identification method.
Background
The disease of crops has great influence on the agricultural yield, and if the type of the agricultural disease cannot be timely identified, the agricultural yield is greatly impacted. Especially, if the crop with higher environmental requirements is not found in time, the yield reduction can reach more than 50%, and timely and accurately identifying the crop is a key of disease prevention and control.
The traditional machine vision method for identifying the disease image has a plurality of problems, such as large workload and poor identification effect. In addition, the traditional disease identification mainly depends on manpower, and the disease category is judged according to subjective observation and historical experience of a grower, and the method has small problems for small-scale planting, but the current crop planting scale is large, and the traditional manual mode is used for identifying, preventing and controlling the disease, so that the time and the labor are wasted, and the method is limited by the defects of professional knowledge and experience of farmers, and is easy to misjudge and miss judge.
And rapid and accurate identification and prediction are key steps in the prevention and control of crop disease. In general, the monitoring of diseases is almost dependent on the experience of farmers or agricultural personnel, which experience is subjective, laborious, time-consuming and unreliable. Therefore, there is an urgent need to explore an automatic, accurate and convenient disease identification method, which has important practical significance.
Disclosure of Invention
In order to solve the problem of disease identification precision at the present stage, the invention aims to provide a lightweight disease identification method which uses data to process disease images and combines a converter as a backbone network to improve the identification efficiency and accuracy of diseases.
In order to achieve the above purpose, the present invention adopts the following technical scheme: a lightweight disease identification method comprising the sequential steps of:
(1) Acquiring a disease image dataset: preprocessing the acquired disease original image, forming a disease image data set by the preprocessed disease image, and performing a process of 7:3, dividing the ratio into a training set and a testing set;
(2) Constructing a disease identification light module;
(3) Constructing a disease classification and identification model based on a disease identification light module;
(4) Obtaining disease image classification and identification results: the training set is input into a disease classification and identification model, the disease classification and identification model is trained, the test set is input into the trained disease classification and identification model, and a disease image identification result is output.
In step (1), the pretreatment specifically includes the following steps:
(1a) Denoising processing is carried out to remove irrelevant quantity in the image;
(1b) Adopting a turnover and scaling method to enhance the number of the data sets;
(1c) Adopting the reinforcement of the cutoff data, filling a square area in the disease image by 0 pixel value, and realizing random shielding; performing center normalization operation on the disease image shielded randomly to eliminate the influence of 0 value filling on training;
(1d) And enhancing by using Mosai data, namely arbitrarily selecting 4 pictures to zoom and then splicing.
The step (2) specifically refers to: the disease identification light module consists of three standard convolution products and a global strategy, wherein the three standard convolution products comprise an n multiplied by n standard convolution product and two 1 multiplied by 1 standard convolution products; firstly, inputting a feature map with the size of h multiplied by w multiplied by c, firstly modeling local information through n multiplied by n standard convolution, and then mapping the local information through 1 multiplied by 1 standard convolution to obtain a local modeling feature map; assuming that the dimension of the mapping is d, the size of the local modeling feature map is h×w×d; the disease identification light module carries out global information modeling through a global strategy, and the size of a local modeling feature map is kept unchanged after the local modeling feature map passes through the global strategy, namely h multiplied by w multiplied by d; finally, performing dimension reduction processing through 1×1 standard convolution, outputting a lightweight feature map, and restoring the size of the lightweight feature map to h×w×c;
the global strategy comprises an unfolding module, a self-attention calculating module and a restoring module, when the global strategy is passed, the local modeling feature diagram is firstly divided into blocks with the size of n multiplied by n, each block consists of n multiplied by n elements, and each element in each block is the same as the elements in the same positions of other blocks, namely the elements with the same color in the diagram, and the self-attention calculating module carries out self-attention calculating operation; the unfolding module tiles each element in the local modeling feature map into a sequence, and the restoring module restores the sequence.
The step (3) specifically refers to: the disease classification recognition model consists of four disease recognition light-weight modules, three sampling modules and a classification module, wherein the four disease recognition light-weight modules are a first disease recognition light-weight module, a second disease recognition light-weight module, a third disease recognition light-weight module and a fourth disease recognition light-weight module respectively, and the three sampling modules are a first sampling module, a second sampling module and a third sampling module respectively;
firstly dividing a disease image with an input size of H multiplied by W multiplied by 3 into non-overlapping blocks through standard convolution, wherein 3 is the dimension of the input; each block is set to 4×4 in size, and each block has 4×4×3=48 elements, resulting in a size ofIs a block feature map of (1);
firstly, the block feature map passes through a disease identification light-weight module, and the disease identification light-weight module does not change the size of the input block feature map, namelyThen, a standard convolution is carried out to enable the input dimension of the block feature map to be changed into C, and finally a first feature map is output;
the first characteristic diagram is firstly subjected to downsampling by a first sampling module, and then the second characteristic diagram is subjected to output resolution ratio of a second disease identification light-weight moduleIs a second feature map of (2);
the second characteristic diagram is firstly subjected to downsampling by a second sampling module, and then the third disease identification light-weight module outputs the resolution of which the size isIs a third feature map of (2);
the third feature map is firstly subjected to downsampling through a third sampling module, and then the fourth disease identification light weight module outputs the resolution of the third feature map as followsIs a fourth feature map of (2);
the first feature map, the second feature map, the third feature map and the fourth feature map are isomorphic and layered disease feature maps;
inputting the obtained layered disease feature map into a classification module, and outputting classification identification information of the disease by the classification module;
the sampling module is used for realizing downsampling of the feature images by a channel fusion and a linear layer, the channel fusion divides each 2 multiplied by 2 adjacent pixel in the first feature image into a block, then pixels at the same position in each block are spliced together, the linear layer is used for splicing in the dimension direction, the sampling feature images are finally obtained, and the second, third and fourth feature images are obtained by a second, third and fourth disease identification light-weight module;
the classification module consists of an LN standardization layer and a global average pooling layer, and the LN standardization layer is adopted to carry out integral standardization on the extracted characteristic data of the layered disease characteristic map after translation and scaling; the global average pooling layer averages the two-dimensional images of each channel in the feature map, outputs a C multiplied by 1 feature matrix, multiplies the feature matrix by a t multiplied by C weight matrix G to obtain the probability of each disease class, wherein the weight matrix G is obtained through training, t is the disease class number, and finally outputs classification identification information through a classification module.
According to the technical scheme, the beneficial effects of the invention are as follows: firstly, the invention is used for extracting disease classification characteristic information by constructing a disease recognition lightweight module, obtaining a disease characteristic diagram with rich information through sampling and characteristic processing of 3 stages, and finally obtaining final disease classification recognition information through a classification module; secondly, through experimental verification, the method has obviously improved recognition accuracy compared with the current disease recognition method, and the size of the model can be reduced to one fourth of the recognition model of the same level, which fully proves that the method can be applied to the agricultural disease recognition work under multi-category and complex background.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of a process of the disease recognition lightweight module of the present invention;
fig. 3 is a schematic diagram of a global strategy method of a disease identification lightweight module in the present invention.
Detailed Description
As shown in fig. 1, a lightweight disease recognition method includes the following sequential steps:
(1) Acquiring a disease image dataset: preprocessing the acquired disease original image, forming a disease image data set by the preprocessed disease image, and performing a process of 7:3, dividing the ratio into a training set and a testing set;
(2) Constructing a disease identification light module;
(3) Constructing a disease classification and identification model based on a disease identification light module;
(4) Obtaining disease image classification and identification results: the training set is input into a disease classification and identification model, the disease classification and identification model is trained, the test set is input into the trained disease classification and identification model, and a disease image identification result is output.
In step (1), the pretreatment specifically includes the following steps:
(1a) Denoising processing is carried out to remove irrelevant quantity in the image;
(1b) Adopting a turnover and scaling method to enhance the number of the data sets; the contrast and intensity of the disease image are enhanced, noise is processed to remove irrelevant amount in the image, and the data amount of each disease of the original disease image is unbalanced, so that the number of the data sets is enhanced by adopting methods such as overturning, scaling and the like, and the problem of overfitting possibly caused by overlarge difference of the number of disease types in the training process is solved;
(1c) In order to improve generalization capability of various data of a disease data set, adopting cutoff data enhancement, filling a square area of a certain block in a disease image by 0 pixel value, and realizing random shielding; performing center normalization operation on the disease image shielded randomly to eliminate the influence of 0 value filling on training;
(1d) In order to improve the richness of various data of the disease data set, mosai data enhancement is adopted, namely 4 pictures are selected at will for zooming and then spliced, so that the detection data set is greatly enriched, a plurality of small targets are added through random zooming, the robustness of a network is better, the data of the 4 pictures can be directly calculated, the batch size is reduced, and the purpose of reducing the GPU is achieved.
As shown in fig. 2, the step (2) specifically refers to: the disease identification light module consists of three standard convolution products and a global strategy, wherein the three standard convolution products comprise an n multiplied by n standard convolution product and two 1 multiplied by 1 standard convolution products; firstly, inputting a characteristic diagram with the size of h multiplied by w multiplied by c, wherein the characteristic diagram can be a block characteristic diagram, a first characteristic diagram, a second characteristic diagram or a third characteristic diagram; firstly modeling local information through n×n standard convolution, and then mapping the local information through 1×1 standard convolution to obtain a local modeling feature map; assuming that the dimension of the mapping is d, the size of the local modeling feature map is h×w×d; the disease identification light module carries out global information modeling through a global strategy, and the size of a local modeling feature map is kept unchanged after the local modeling feature map passes through the global strategy, namely h multiplied by w multiplied by d; finally, performing dimension reduction processing through 1×1 standard convolution, outputting a lightweight feature map, and restoring the size of the lightweight feature map to h×w×c;
as shown in fig. 3, the global strategy includes an unfolding module, a self-attention calculating module and a restoring module, when the global strategy is passed, the local modeling feature diagram is firstly divided into blocks with n×n size, each block is composed of n×n elements, and the self-attention calculating operation is performed by the self-attention calculating module on the elements in the same position as the other blocks, namely on the elements with the same color in the diagram; the unfolding module tiles each element in the local modeling feature map into a sequence, and the restoring module restores the sequence.
The purpose of the disease recognition lightweight module is to accomplish local and global feature modeling with less input. From the form, an original feature map with the size of h×w×c is input, local information modeling is firstly carried out through n×n standard convolution, then local information is mapped through 1×1 standard convolution, and a local modeling feature map is obtained. Assuming the dimension of the map is d, the size of the local modeling feature map is h×w×d.
The step (3) specifically refers to: the disease classification recognition model consists of four disease recognition light-weight modules, three sampling modules and a classification module, wherein the four disease recognition light-weight modules are a first disease recognition light-weight module, a second disease recognition light-weight module, a third disease recognition light-weight module and a fourth disease recognition light-weight module respectively, and the three sampling modules are a first sampling module, a second sampling module and a third sampling module respectively;
firstly dividing a disease image with an input size of H multiplied by W multiplied by 3 into non-overlapping blocks through standard convolution, wherein 3 is the dimension of the input; each block is set to 4×4 in size, and each block has 4×4×3=48 elements, resulting in a size ofIs a block feature map of (1);
firstly, the block feature map passes through a disease identification light-weight module, and the disease identification light-weight module does not change the size of the input block feature map, namelyThen, a standard convolution is carried out to enable the input dimension of the block feature map to be changed into C, and finally a first feature map is output;
the first characteristic diagram is firstly subjected to downsampling by a first sampling module, and then the second characteristic diagram is subjected to output resolution ratio of a second disease identification light-weight moduleIs a second feature map of (2);
the second characteristic diagram is firstly subjected to downsampling by a second sampling module, and then the third disease identification light-weight module outputs the resolution of which the size isIs a third feature map of (2);
the third feature map is firstly subjected to downsampling through a third sampling module, and then the fourth disease identification light weight module outputs the resolution of the third feature map as followsIs a fourth feature map of (2);
the first feature map, the second feature map, the third feature map and the fourth feature map are isomorphic and layered disease feature maps;
inputting the obtained layered disease feature map into a classification module, and outputting classification identification information of the disease by the classification module;
the sampling module is used for realizing downsampling of the feature images by a channel fusion and a linear layer, the channel fusion divides each 2 multiplied by 2 adjacent pixel in the first feature image into a block, then pixels at the same position in each block are spliced together, the linear layer is used for splicing in the dimension direction, the sampling feature images are finally obtained, and the second, third and fourth feature images are obtained by a second, third and fourth disease identification light-weight module;
the classification module consists of a LN (Layer Normalization) standardization layer and a global average pooling layer, and adopts an LN standardization layer to carry out integral standardization on the characteristic data of the extracted layered disease characteristic map after translational scaling; the global average pooling layer averages the two-dimensional images of each channel in the feature map, outputs a C multiplied by 1 feature matrix, multiplies the feature matrix by a t multiplied by C weight matrix G to obtain the probability of each disease class, wherein the weight matrix G is obtained through training, t is the disease class number, and finally outputs classification identification information through a classification module.
Table 1 shows the results of experimental comparison of the method of the present invention with several conventional classification methods
Table 1 shows the experimental results of the present invention compared with other classification methods. Obviously, compared with other methods, the method has the highest recognition precision, which reaches 99.10 percent, and the recall rate, the precision and the F-Measure (comprehensive evaluation index) reach 97.36 percent, 97.32 percent and 97.3 percent respectively. The method reduces the parameters of the model, and improves the recognition accuracy by 1% compared with Swin transducer. This is due to the lightweight design of the present invention, which combines the advantages of a transducer and convolution. The method has the advantages of good effect in disease monitoring of multiple varieties and high complexity, more stable and lighter model and capability of well solving the related problems of disease identification.
The foregoing has outlined the principles, main features and advantages of the present invention in comparison with the state-of-the-art classification and identification method. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made therein without departing from the spirit and scope of the invention, which is defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (4)
1. A lightweight disease identification method is characterized in that: the method comprises the following steps in sequence:
(1) Acquiring a disease image dataset: preprocessing the acquired disease original image, forming a disease image data set by the preprocessed disease image, and performing a process of 7:3, dividing the ratio into a training set and a testing set;
(2) Constructing a disease identification light module;
(3) Constructing a disease classification and identification model based on a disease identification light module;
(4) Obtaining disease image classification and identification results: the training set is input into a disease classification and identification model, the disease classification and identification model is trained, the test set is input into the trained disease classification and identification model, and a disease image identification result is output.
2. The lightweight disease recognition method according to claim 1, characterized in that: in step (1), the pretreatment specifically includes the following steps:
(1a) Denoising processing is carried out to remove irrelevant quantity in the image;
(1b) Adopting a turnover and scaling method to enhance the number of the data sets;
(1c) Adopting the reinforcement of the cutoff data, filling a square area in the disease image by 0 pixel value, and realizing random shielding; performing center normalization operation on the disease image shielded randomly to eliminate the influence of 0 value filling on training;
(1d) And enhancing by using Mosai data, namely arbitrarily selecting 4 pictures to zoom and then splicing.
3. The lightweight disease recognition method according to claim 1, characterized in that: the step (2) specifically refers to: the disease identification light module consists of three standard convolution products and a global strategy, wherein the three standard convolution products comprise an n multiplied by n standard convolution product and two 1 multiplied by 1 standard convolution products; firstly, inputting a feature map with the size of h multiplied by w multiplied by c, firstly modeling local information through n multiplied by n standard convolution, and then mapping the local information through 1 multiplied by 1 standard convolution to obtain a local modeling feature map; assuming that the dimension of the mapping is d, the size of the local modeling feature map is h×w×d; the disease identification light module carries out global information modeling through a global strategy, and the size of a local modeling feature map is kept unchanged after the local modeling feature map passes through the global strategy, namely h multiplied by w multiplied by d; finally, performing dimension reduction processing through 1×1 standard convolution, outputting a lightweight feature map, and restoring the size of the lightweight feature map to h×w×c;
the global strategy comprises an unfolding module, a self-attention calculating module and a restoring module, when the global strategy is passed, the local modeling feature diagram is firstly divided into blocks with the size of n multiplied by n, each block consists of n multiplied by n elements, and each element in each block is the same as the elements in the same positions of other blocks, namely the elements with the same color in the diagram, and the self-attention calculating module carries out self-attention calculating operation; the unfolding module tiles each element in the local modeling feature map into a sequence, and the restoring module restores the sequence.
4. The lightweight disease recognition method according to claim 1, characterized in that: the step (3) specifically refers to: the disease classification recognition model consists of four disease recognition light-weight modules, three sampling modules and a classification module, wherein the four disease recognition light-weight modules are a first disease recognition light-weight module, a second disease recognition light-weight module, a third disease recognition light-weight module and a fourth disease recognition light-weight module respectively, and the three sampling modules are a first sampling module, a second sampling module and a third sampling module respectively;
firstly dividing a disease image with an input size of H multiplied by W multiplied by 3 into non-overlapping blocks through standard convolution, wherein 3 is the dimension of the input; each block is set to 4×4 in size, and each block has 4×4×3=48 elements, resulting in a size ofIs a block feature map of (1);
firstly, the block feature map passes through a disease identification light-weight module, and the disease identification light-weight module does not change the size of the input block feature map, namelyThen, a standard convolution is carried out to enable the input dimension of the block feature map to be changed into C, and finally a first feature map is output;
the first characteristic diagram is firstly subjected to downsampling by a first sampling module, and then the second characteristic diagram is subjected to output resolution ratio of a second disease identification light-weight moduleIs a second feature map of (2);
the second characteristic diagram is firstly subjected to downsampling by a second sampling module, and then the third disease identification light-weight module outputs the resolution of which the size isIs a third feature map of (2);
the third feature map is firstly subjected to downsampling through a third sampling module, and then the fourth disease identification light weight module outputs the resolution of the third feature map as followsIs a fourth feature map of (2);
the first feature map, the second feature map, the third feature map and the fourth feature map are isomorphic and layered disease feature maps;
inputting the obtained layered disease feature map into a classification module, and outputting classification identification information of the disease by the classification module;
the sampling module is used for realizing downsampling of the feature images by a channel fusion and a linear layer, the channel fusion divides each 2 multiplied by 2 adjacent pixel in the first feature image into a block, then pixels at the same position in each block are spliced together, the linear layer is used for splicing in the dimension direction, the sampling feature images are finally obtained, and the second, third and fourth feature images are obtained by a second, third and fourth disease identification light-weight module;
the classification module consists of an LN standardization layer and a global average pooling layer, and the LN standardization layer is adopted to carry out integral standardization on the extracted characteristic data of the layered disease characteristic map after translation and scaling; the global average pooling layer averages the two-dimensional images of each channel in the feature map, outputs a C multiplied by 1 feature matrix, multiplies the feature matrix by a t multiplied by C weight matrix G to obtain the probability of each disease class, wherein the weight matrix G is obtained through training, t is the disease class number, and finally outputs classification identification information through a classification module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310108111.3A CN116109994A (en) | 2023-02-14 | 2023-02-14 | Lightweight disease identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310108111.3A CN116109994A (en) | 2023-02-14 | 2023-02-14 | Lightweight disease identification method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116109994A true CN116109994A (en) | 2023-05-12 |
Family
ID=86259546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310108111.3A Pending CN116109994A (en) | 2023-02-14 | 2023-02-14 | Lightweight disease identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116109994A (en) |
-
2023
- 2023-02-14 CN CN202310108111.3A patent/CN116109994A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110533084B (en) | Multi-scale target detection method based on self-attention mechanism | |
CN109033998B (en) | Remote sensing image ground object labeling method based on attention mechanism convolutional neural network | |
CN107239751B (en) | High-resolution SAR image classification method based on non-subsampled contourlet full convolution network | |
WO2021139258A1 (en) | Image recognition based cell recognition and counting method and apparatus, and computer device | |
CN109523470B (en) | Depth image super-resolution reconstruction method and system | |
CN111860351B (en) | Remote sensing image fishpond extraction method based on line-row self-attention full convolution neural network | |
CN111368825B (en) | Pointer positioning method based on semantic segmentation | |
CN111178177A (en) | Cucumber disease identification method based on convolutional neural network | |
EP3971767A1 (en) | Method for constructing farmland image-based convolutional neural network model, and system thereof | |
CN115331104A (en) | Crop planting information extraction method based on convolutional neural network | |
CN111598869A (en) | Method, equipment and storage medium for detecting Mura of display screen | |
CN114898359B (en) | Litchi plant diseases and insect pests detection method based on improvement EFFICIENTDET | |
CN116912674A (en) | Target detection method and system based on improved YOLOv5s network model under complex water environment | |
CN112164030A (en) | Method and device for quickly detecting rice panicle grains, computer equipment and storage medium | |
CN116012700A (en) | Real-time fish disease detection system based on YOLO-v5 | |
CN116884036A (en) | Live pig posture detection method, device, equipment and medium based on YOLOv5DA | |
CN116721385A (en) | Machine learning-based RGB camera data cyanobacteria bloom monitoring method | |
CN113435389B (en) | Chlorella and golden algae classification and identification method based on image feature deep learning | |
CN110992267A (en) | Abrasive particle identification method based on DPSR and Lightweight CNN | |
CN116109994A (en) | Lightweight disease identification method | |
CN115661544A (en) | N-MobileNetXt-based spinach seedling water stress level classification system and method | |
CN112465821A (en) | Multi-scale pest image detection method based on boundary key point perception | |
CN117765410B (en) | Remote sensing image double-branch feature fusion solid waste identification method and system and electronic equipment | |
CN106326846B (en) | The forest plant parallel extraction method of unmanned plane image | |
CN116188774B (en) | Hyperspectral image instance segmentation method and building instance segmentation method |
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 |