Plant disease image classification method, device, system, equipment and storage medium
By generating a plant disease image dataset using the CitrusGAN network model and training a classification network, the problem of insufficient datasets in plant disease identification using deep learning is solved, and accurate identification in real-world environments is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2026-03-24
AI Technical Summary
Deep learning in plant disease identification is limited by the quality and quantity of datasets, resulting in insufficient classification accuracy.
The CitrusGAN network model is used to generate a dataset of plant disease images through generative adversarial networks, and the generated image dataset is used to train a classification network model to achieve image classification.
With limited real-world datasets, it successfully identified plant disease images in real-world environments, providing an application solution for scenarios with insufficient data.
Smart Images

Figure CN116597221B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a plant disease image classification method, device, system, equipment and storage medium, and belongs to the field of plant disease identification. BACKGROUND
[0002] Plant diseases are harmful to the agricultural and forestry industry, and can cause the entire agricultural and forestry area to be destroyed in severe cases. Therefore, rapid and accurate identification and diagnosis of plant diseases has become an urgent problem to be solved in the current agricultural and forestry industry. However, due to the small number of plant disease samples and uneven distribution, it is difficult to collect a large amount of data set. Deep learning requires a large amount of data to support in plant disease identification applications, and the quality and quantity of the data set directly affect the classification accuracy of the deep learning model. SUMMARY
[0003] Therefore, the present application provides a plant disease image classification method, device, system, terminal equipment and readable storage medium, which can solve the technical problem of being limited by the quality and quantity of the data set when deep learning algorithm is applied to the field of plant disease identification.
[0004] The first object of the present application is to provide a plant disease image classification method.
[0005] The second object of the present application is to provide a plant disease image classification device.
[0006] The third object of the present application is to provide a plant disease image classification system.
[0007] The fourth object of the present application is to provide a terminal equipment.
[0008] The fifth object of the present application is to provide a readable storage medium.
[0009] The first object of the present application can be achieved by adopting the following technical scheme:
[0010] A plant disease image classification method, the method comprising:
[0011] Obtaining an original image data set, the original image data set comprising a plurality of plant disease images;
[0012] Training a generative adversarial network model according to the original image data set, the generative adversarial network model comprising a generator, a skip layer module and a discriminator;
[0013] Generating a plant disease image through the trained generative adversarial network model to construct a generated image data set;
[0014] Training a classification network model according to the generated image data set, and further realizing image classification.
[0015] Preferably, the adversarial network model is a CitrusGAN network model.
[0016] In the generator, the coarse feature layer uses at least one convolutional layer, the first fine feature layer uses at least one convolutional layer and at least one noise injection layer, and the second fine feature layer uses at least two convolutional layers and at least two noise injection layers, wherein the layer depth of the first fine feature layer is shallower than that of the second fine feature layer, and all the up-sampling blocks use PixelNorm layers.
[0017] Preferably, the feature processing process of the discriminator comprises:
[0018] The input image is subjected to first, second, third convolutional operations and full connection operation to obtain a first feature map;
[0019] The first feature map is subjected to small batch standard deviation operation to obtain a second feature map.
[0020] Preferably, the adversarial network model is a CitrusGAN network model.
[0021] The skip layer module replaces addition in the residual structure with multiplication;
[0022] The multiplication replacing addition in the residual structure is as follows:
[0023]
[0024] Wherein, x and y represent the input feature map and the output feature map of the skip layer module respectively, represents the operation of the function on x low , {W i} represents the skip layer module weight to be learned, x low and x high represent the low-resolution and high-resolution feature maps respectively.
[0025] Preferably, the adversarial network model further comprises an attention module, and the feature processing process of the attention module comprises:
[0026] The original image is converted into a 1×1×C feature map;
[0027] Based on the 1×1×C feature map, the importance of each channel in the 1×1×C feature map is predicted through a full connection layer;
[0028] The 1×1×C feature map is reweighted according to the importance of different channels to obtain an H×W attention map;
[0029] The H×W attention map is input into the main feature processing process of the adversarial network model for fusion.
[0030] Preferably, the acquisition process of the original image dataset comprises:
[0031] constructing an A dataset, the A dataset comprising a plurality of third images acquired in reality;
[0032] constructing a B dataset, the B dataset comprising a plurality of fourth images acquired virtually;
[0033] taking the A dataset and the B dataset as the original image dataset;
[0034] wherein the types of the plurality of third images correspond one-to-one to the types of the plurality of fourth images, and the number of images of the A dataset is less than the number of images of the B dataset;
[0035] the resolution of the third image is greater than or equal to a preset resolution;
[0036] Before the training of the generative adversarial network model, the method further comprises:
[0037] performing super-resolution processing on the fourth image with a resolution less than the preset resolution to obtain a fourth image with a resolution greater than or equal to the preset resolution.
[0038] Preferably, before the training of the classification network model according to the generated image dataset, the method further comprises:
[0039] screening and removing images in the generated image dataset that are distorted or have unrealistic disease characteristics;
[0040] identifying the generated image dataset after screening and removal by a citrus disease expert to remove images that do not conform to plant phenotypes.
[0041] The second object of the application can be achieved by adopting the following technical solution:
[0042] A plant disease image classification device, the device comprising:
[0043] an acquisition module configured to acquire an original image dataset, the original image dataset comprising a plurality of plant disease images;
[0044] a first training module configured to train a generative adversarial network model according to the original image dataset, the adversarial network model comprising a generator, a skip layer module and a discriminator;
[0045] a construction module configured to generate plant disease images by using the trained generative adversarial network model to construct a generated image dataset;
[0046] A second training and classification module is configured to train a classification network model based on the generated image dataset, thereby realizing image classification.
[0047] The third object of the present application can be achieved by adopting the following technical solution:
[0048] A plant disease image classification system, comprising:
[0049] A cloud server configured to implement the plant disease image classification method described above.
[0050] A camera unit configured to collect plant disease images to be classified.
[0051] A mini program / app is connected to the camera unit and the cloud server, respectively, and configured to display the classification results.
[0052] The fourth object of the present application can be achieved by adopting the following technical solution:
[0053] A terminal device comprising a processor and a memory storing a program executable by the processor, wherein the processor implements the plant disease image classification method described above when executing the program stored in the memory.
[0054] The fifth object of the present application can be achieved by adopting the following technical solution:
[0055] A readable storage medium storing a program, wherein the program is executed by a processor to implement the plant disease image classification method described above.
[0056] The present application has the following beneficial effects compared with the prior art:
[0057] (1) The present embodiment provides a plant disease image classification scheme based on zero real samples, wherein the classification network model used in the scheme can be trained without real plant disease images, and can identify plant images in real scenes. After being deployed in a WeChat mini program, the scheme can be used by relevant technical personnel in the agricultural and forestry industry.
[0058] (2) In the present embodiment, a plant disease image dataset capable of training a CitrusGAN network model is obtained from the Internet using a crawler and a super-resolution algorithm, under the condition that a small amount of plant disease image dataset is captured in a real environment. Only fifty real images of each category are required to complete the training of the CitrusGAN network model. The successfully trained CitrusGAN network model can generate multiple plant disease images and train a classification network model, so that the trained classification network model can successfully identify plant images in a real environment, thereby providing a new idea for the application of deep learning in image classification scenarios such as plant disease recognition with insufficient dataset. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative work based on these drawings also belong to the protection scope of the present application.
[0060] Figure 1 The flow chart of the plant disease image classification method of the embodiment 1 of the present application.
[0061] Figure 2 The partial image schematic diagram of the A data set of the embodiment 1 of the present application.
[0062] Figure 3 The partial image schematic diagram of the B data set of the embodiment 1 of the present application.
[0063] Figure 4 The structure diagram of the generator of the embodiment 1 of the present application.
[0064] Figure 5 The structure diagram of the skip layer module of the embodiment 1 of the present application.
[0065] Figure 6 The structure diagram of the attention module of the embodiment 1 of the present application.
[0066] Figure 7 The structure diagram of the discriminator of the embodiment 1 of the present application.
[0067] Figure 8 The structure block diagram of the plant disease image classification device of the embodiment 2 of the present application.
[0068] Figure 9 The structure block diagram of the terminal device of the embodiment 3 of the present application.
[0069] Figure 10 、 Figure 11 The interface display diagram of the terminal device of the embodiment 1 and 3 of the present application. DETAILED DESCRIPTION
[0070] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work also belong to the protection scope of the present application.
[0071] Embodiment 1:
[0072] like Figure 1 As shown, this embodiment provides a method for classifying plant disease images. Taking citrus disease images as an example, the method includes the following steps:
[0073] S101. Obtain the original image dataset, which includes images of various plant diseases.
[0074] In this embodiment, the process of obtaining the original image dataset includes:
[0075] S11. Construct dataset A, which includes various third-party images collected in reality.
[0076] In this step, images of citrus leaves are captured from a real-world environment using an image acquisition device to construct dataset A. The image acquisition device is not limited to a mobile phone or camera. For example... Figure 2 As shown, Dataset A includes images of six categories of citrus diseases: healthy citrus leaves, citrus canker leaves, citrus anthracnose leaves, citrus zinc deficiency leaves, citrus magnesium deficiency leaves, and citrus black spot leaves. The image resolution in Dataset A must be no lower than 1024×1024 (preset resolution). The number of images for each category of citrus disease must be no less than 50.
[0077] S12. Construct dataset B, which includes multiple virtually acquired fourth images.
[0078] In this step, a web crawler is used to crawl images of healthy citrus leaves, citrus leaves with canker, citrus leaves with anthracnose, citrus leaves with zinc deficiency, citrus leaves with magnesium deficiency, and citrus leaves with black spot disease from Baidu, Google, and Bing, and then construct dataset B. The number of images crawled for each type is set to 300. After crawling, the images are filtered, for example, images with poor quality and images that do not match the target features are deleted.
[0079] For example, images are randomly downloaded according to the crawler, specifically including:
[0080] Step 1: In the web crawler program, enter the category of the image to be crawled. For example, the keywords entered are healthy citrus leaves, citrus canker leaves, citrus anthracnose leaves, citrus zinc-deficient leaves, citrus magnesium-deficient leaves, and citrus black spot leaves.
[0081] Step 2: In the web crawler program, input the number of images to be crawled. The input is 300 for all images.
[0082] After completing steps 1 and 2, the crawler automatically creates folders named after the categories of the images to be crawled, and automatically names and formats each image. The format consists of the input image category plus the image number. Then, it checks if the number of images downloaded matches the number of images to be crawled. If they do, it displays "Download complete"; otherwise, it continues downloading until complete. The crawled images are as follows: Figure 3 As shown.
[0083] S13. Use the A dataset and the B dataset as the original image dataset.
[0084] Prior to this step, data augmentation operations (flipping, noise suppression, contrast adjustment, and color saturation adjustment) were performed on all images in dataset A using the OpenCV library; after the data augmentation operations, dataset A was expanded to 5 times its original size.
[0085] Before this step or before training the generative adversarial network model, because the images downloaded by the crawler have inconsistent resolutions and many images from various search engines are blurry, super-resolution processing is performed on the fourth image with a resolution lower than the preset resolution to obtain a fourth image with a resolution greater than or equal to the preset resolution. For example, the Real-ESRGAN algorithm can be used for super-resolution processing.
[0086] It should be noted that the terms "first," "second," etc., are used to distinguish similar objects and not to describe a specified order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, and the number of objects is not limited; for example, the first object can be one or more.
[0087] S102. Based on the original image dataset, train a generative adversarial network model, which includes a generator, a skip-layer module, and a discriminator.
[0088] In this step, the improved CitrusGAN network model is used as a generative adversarial network model.
[0089] The CitrusGAN network model consists of three main parts: a generator, a skip module, and a discriminator.
[0090] like Figure 4 As shown, in the generator, different strategies are used for upsampling blocks of different pixels. For the 4 pixels representing coarse features... 2 -32 2 The layer uses a single convolutional layer, representing 64 of the first fine features. 2-256 2 The layer employs a convolutional layer and a noise injection layer, representing 512 of the second fine feature. 2 -1024 2 The layer employs two convolutional layers and two noise injection layers. A PixelNorm layer is used for all upsampling blocks, as follows:
[0091]
[0092] Where N is the number of feature maps and the original loss function, a x,y and b x,y These are the original and normalized feature vectors of pixel (x, y), ∈ = 10 -8 , where j represents the dimension of the pixel tensor.
[0093] like Figure 5 As shown, in the Skip Layer Module (SLE), multiplication is used instead of addition in the residual structure, as shown in the following equation:
[0094]
[0095] Where x and y represent the input and output feature maps of the skip module, respectively. Represents the function with respect to x low Operation, {W i} represents the weights of the skip modules to be learned, x low and x high These represent low-resolution and high-resolution feature maps, respectively. Specifically, the low-resolution map is 8×8, and the high-resolution map is 128×128.
[0096] Generative Adversarial Network (GAN) models also include an Attention Module (ATT). In the Attention Module, the original image first passes through an AdaptiveAvgPool layer, transforming the original H×W×C (H: High, W: Weight, C: Channel) feature map into a 1×1×C feature map, thus expanding the sensory field of view. This allows for better acquisition of global information and preservation of texture features. The importance (degree of importance) of each channel in the 1×1×C feature map is predicted by a fully connected layer. The feature map is then reweighted according to the importance of different channels to obtain an H×W attention map, which is finally fused with the GAN operation (i.e., fused with the backbone feature processing of the GAN model). The Attention Module preserves high-weight features in leaf regions and removes some noise interference from the background, thereby improving network speed and reducing parameter requirements.
[0097] like Figure 7As shown, the discriminator consists of three conv-layers, two ReLU activation functions, one Tanh activation function, one fully connected layer (FC), and a minibatch standard deviation layer. The minibatch standard deviation layer divides a batch-size image into 'a' parts, each containing batch-size / 'a' images. It calculates the standard deviation of the feature map of each image at different spatial locations to obtain a new feature map. Then, it averages the feature maps to obtain a value, expands this value to the size of a new feature map, and concatenates it with the original feature map as the input for the next layer.
[0098] In this embodiment, training a generative adversarial network model based on the original image dataset includes:
[0099] Images of each type of citrus disease were stored in a separate folder. Model parameters were adjusted based on generator-generated images saved at checkpoints during training, and a separate weight file was generated for each citrus disease. The number of epochs was set to 30,000, the batch size to 8, the input image size to 1024, the learning rate for the generator and discriminator to be 0.0002, and the optimizer to Adam. The system was run on Ubuntu 20.04 with Python 3.8, PyTorch 1.10.0, CUDA 11.3, an RTX 3090 graphics card with 24GB of VRAM, and an AMD EPYC 7543 CPU.
[0100] S103. Generate plant disease images using the trained generative adversarial network model to construct a generated image dataset.
[0101] In this step, 3000 images are generated for each type of citrus leaf using the weight file for each type of citrus leaf. Specifically, the corresponding .pth file is loaded into the corresponding folder, the n_sample parameter is set to 3000, and the size is set to 1024×1024. The generated images must be identified by citrus disease experts, and the number of images whose features do not conform to the real leaf images is counted and deleted. After deletion, the images are regenerated to supplement the number of images for each category to 3000.
[0102] S104. Train a classification network model based on the generated image dataset to achieve image classification.
[0103] Before this step, the following also applies:
[0104] S21. Filter and remove distorted images and images with unrealistic disease features from the generated image dataset.
[0105] S22. Citrus disease experts will identify the generated image dataset after screening and elimination to remove images that do not conform to the plant phenotype.
[0106] S21 and S22 can be understood as data cleaning. It should be noted that if expert evaluation was performed in S103, then S22 is not necessary.
[0107] Before this step, when building the classification network models, the PyTorch framework was imported into PyCharm software to build nine classification network models: Densenet121, ResNet50, ShuffleNetv2, Mlp-Mixer, MobileNetv3, EfficientNet-B3, EfficientNet-B5, Vision Transformer, and Swin Transformer.
[0108] S104 includes the following steps:
[0109] S1042. Use the generated image dataset as the training set to train the classification network model, and use the original image dataset as the test set to test the classification accuracy.
[0110] In this step, when training the classification network, the training set path is the file path of the generated image dataset, the test set path is the file path of the combined dataset A and dataset B, num_classes is set to 6, batchsize is set to 16, the input image size is 256×256, the cosine annealing learning rate strategy is used, the optimizer is AdamW, num_workers is set to 4, pretrained_flag is set to False, and epoch is set to 102.
[0111] S1043. Deploy the trained classification network model to a WeChat mini program.
[0112] This process includes the following steps:
[0113] (1) Select the network with the highest accuracy among the nine trained classification networks and export it as the deployable ONNX format.
[0114] (2) Set up backend services: Use the Flask backend framework to build an API that can receive images and return classification results.
[0115] (3) Load the model into the backend service: Load the trained model into the backend service so that it can be used for classification when images are received.
[0116] (4) Deploy backend services: Deploy backend services to Tencent Cloud platform and obtain their URLs for mini-programs to call.
[0117] (5) Calling backend services in mini-program: Use the network request API provided by WeChat in mini-program to send image data to backend service, parse the classification results returned by service, and finally display them on mini-program interface.
[0118] When deploying an image classification network to a WeChat mini-program, it is necessary to consider the performance and stability of network requests, and to ensure the privacy and security of user-uploaded image data during transmission and processing.
[0119] The deployed mini-program, such as Figure 10 and Figure 11 As shown, users can click the "Disease Identification" button to upload images from local files for identification.
[0120] This embodiment also provides a plant disease image classification system, which includes:
[0121] The cloud is used to implement the aforementioned plant disease image classification method;
[0122] The camera unit is used to acquire images of plant diseases to be classified.
[0123] The mini-program / app interface connects to the camera unit and the cloud respectively to display the classification results.
[0124] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium.
[0125] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the order of execution of the described steps may be changed. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0126] Example 2:
[0127] like Figure 8 As shown, this embodiment provides a plant disease image classification device, which includes an acquisition module 801, a first training module 802, a construction module 803, and a second training and classification module 804. The specific functions of each module are as follows:
[0128] The acquisition module 801 is used to acquire a raw image dataset, which includes images of various plant diseases;
[0129] The first training module 802 is used to train a generative adversarial network model based on the original image dataset. The adversarial network model includes a generator, a skip-layer module, and a discriminator.
[0130] Module 803 is used to generate plant disease images through the trained generative adversarial network model to construct a generated image dataset;
[0131] The second training and classification module 804 is used to train a classification network model based on the generated image dataset, thereby achieving image classification.
[0132] Example 3:
[0133] like Figure 9 As shown, this embodiment provides a terminal device, which includes a processor 902, a memory, an input device 903, a display device 904, and a network interface 905 connected via a system bus 901. The processor 902 provides computing and control capabilities. The memory includes a non-volatile storage medium 906 and internal memory 907. The non-volatile storage medium 906 stores an operating system, computer programs, and a database. The internal memory 907 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium 906. When the computer program is executed by the processor 902, it implements the plant disease image classification method of Embodiment 1 described above, as follows:
[0134] Obtain the original image dataset, which includes images of various plant diseases;
[0135] Based on the original image dataset, a generative adversarial network model is trained, the adversarial network model including a generator, a skip-layer module and a discriminator;
[0136] Plant disease images are generated using the trained generative adversarial network model to construct a generated image dataset;
[0137] A classification network model is trained based on the generated image dataset to achieve image classification.
[0138] Display device 904 displays as follows Figure 10 and Figure 11 The mini-program interface shown.
[0139] Example 4:
[0140] This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, it implements the plant disease image classification method of Embodiment 1 above, as follows:
[0141] Obtain the original image dataset, which includes images of various plant diseases;
[0142] Based on the original image dataset, a generative adversarial network model is trained, the adversarial network model including a generator, a skip-layer module and a discriminator;
[0143] Plant disease images are generated using the trained generative adversarial network model to construct a generated image dataset;
[0144] A classification network model is trained based on the generated image dataset to achieve image classification.
[0145] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0146] In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this embodiment, the computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0147] The computer-readable storage medium described above can be used to write computer programs for executing this embodiment in one or more programming languages or combinations thereof. These programming languages include object-oriented programming languages—such as Java, Python, and C++—and conventional procedural programming languages—such as C or similar programming languages. The program can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] In summary, this invention can solve the technical problem that the application of deep learning algorithms to the field of plant disease identification is limited by the quality and quantity of datasets.
[0149] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A method for classifying plant disease images, characterized in that, The method includes: acquiring a raw image dataset, wherein the raw image dataset includes images of various plant diseases; Based on the original image dataset, a generative adversarial network model is trained. The adversarial network model includes a generator, skip-layer modules, and a discriminator. The adversarial network model is a CitrusGAN network model. The skip-level module replaces addition in the residual structure with multiplication; The substitution of multiplication for addition in the residual structure is as follows: ; in, x and y These represent the input and output feature maps of the skip module, respectively. Represents the operation on function pairs, { W i } represents the weight of the skip module to be learned. x low and x high These represent feature maps at low and high resolutions, respectively. Plant disease images are generated using the trained generative adversarial network model to construct a generated image dataset; A classification network model is trained based on the generated image dataset to achieve image classification.
2. The method according to claim 1, characterized in that, The adversarial network model is the CitrusGAN network model; In the generator, the coarse feature layer uses at least one convolutional layer, the first fine feature layer uses at least one convolutional layer and at least one noise injection layer, and the second fine feature layer uses at least two convolutional layers and at least two noise injection layers, wherein the depth of the first fine feature layer is shallower than the depth of the second fine feature layer, and all upsampling blocks use PixelNorm layers.
3. The method according to any one of claims 1-2, characterized in that, The feature processing procedure of the discriminator includes: The first feature map is obtained by performing a first convolution operation, a second convolution operation, a third convolution operation, and a fully connected operation on the input image. Perform mini-batch standard deviation operation on the first feature map to obtain the second feature map.
4. The method according to any one of claims 1 and 2, characterized in that, The adversarial network model also includes an attention module, the feature processing of which includes: Transform the original image into a 1×1×C feature map; Based on the feature map, the importance of each channel in the feature map is predicted through a fully connected layer; The 1×1×C feature map is reweighted according to the importance of different channels to obtain the H×W attention map; The H×W attention map is input into the backbone feature processing of the adversarial network model for fusion.
5. The method according to claim 1, characterized in that, The process of obtaining the original image dataset includes: Construct dataset A, which includes various third-party images collected in reality; Construct dataset B, which includes multiple virtually acquired fourth images; Dataset A and Dataset B are used as the original image dataset; wherein, the various types of the third images correspond one-to-one with the various types of the fourth images, the number of images in Dataset A is less than the number of images in Dataset B, and the resolution of the third images is greater than or equal to a preset resolution; Before training the generative adversarial network model, the following is also included: Super-resolution processing is performed on the fourth image whose resolution is lower than the preset resolution to obtain a fourth image with a resolution greater than or equal to the preset resolution.
6. A plant disease image classification device, characterized in that, The apparatus, using the method of any one of claims 1-5, comprises: The acquisition module is used to acquire the original image dataset, which includes images of various plant diseases; The first training module is used to train a generative adversarial network model based on the original image dataset. The adversarial network model includes a generator, a skip-layer module, and a discriminator. A construction module is used to generate plant disease images through the trained generative adversarial network model to construct a generated image dataset; The second training and classification module is used to train a classification network model based on the generated image dataset, thereby achieving image classification.
7. A plant disease image classification system, characterized in that, The system includes: The cloud is used to implement the method of any one of claims 1-5; The camera unit is used to acquire images of plant diseases to be classified. The mini-program / app interface connects to the camera unit and the cloud respectively to display the classification results.
8. A terminal device, comprising a processor and a memory for storing a processor-executable program, characterized in that, When the processor executes the program stored in the memory, it implements the method of any one of claims 1-5.
9. A readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1-5.
Citation Information
Patent Citations
A method for classifying small sample skin images
CN109359522A
Small sample plant disease identification method and system
CN110188824A
Style-based architecture for generative neural networks
US20200151559A1