Wheat airborne disease spore microscopic image detection method based on YOLO-CG-HS lightweight model

By introducing lightweight down-sampling ContextGuided and HS-FPN modules into the YOLOv5s model, the accuracy and real-time problems of spore detection of wheat airborne diseases are solved, and efficient and low-cost spore detection is achieved, which is suitable for embedded equipment in the field. , improving the accuracy and feasibility of disease prediction.

CN118570804AInactive Publication Date: 2024-08-30NORTHWEST A & F UNIV

Patent Information

Application Number
CN202411055047.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve accurate and lightweight real-time detection of wheat airborne disease spore microscopic images, especially when multiple diseases break out at the same time. The difficulty of spore detection increases, and it is difficult to meet the needs of low-cost, high-precision embedded field spore capture instruments. Model migration and application requirements.

Method used

A microscopic image detection method for wheat airborne disease spores based on the YOLO-CG-HS lightweight model was adopted. The lightweight down-sampling ContextGuided module and HS-FPN module were introduced into the YOLOv5s model to enhance the model's global information and multi-scale details of the spores. Feature capture and fusion reduce model complexity and improve detection efficiency and accuracy.

Benefits of technology

It achieves high-precision spore detection under different densities and multiple scenarios, reduces the number of model parameters and reduces the hardware burden. It can accurately detect different types of pathogenic spores, predict the degree and time of onset, provide scientific guidance for disease prevention and control, and support low-cost Embedded device applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570804A
    Figure CN118570804A
Patent Text Reader

Abstract

The invention relates to a wheat airborne disease spore microscopic image detection method based on a YOLO-CG-HS lightweight model. Compared with the prior art, the defect that accurate and lightweight real-time detection is difficult to carry out on a spore microscopic image is overcome. The method comprises the following steps: obtaining and preprocessing a wheat airborne disease spore microscopic image data set; constructing a lightweight germ spore detection model; training a lightweight germ spore detection model; acquiring a spore image to be detected; and obtaining a spore microscopic image detection result. According to the method, different types of pathogenic bacteria spores can be accurately detected, the parameter quantity, the efficiency and the accuracy rate are well balanced, and classified detection of different fungal spores under different densities and multiple scenes is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of microscopic image recognition, and in particular to a microscopic image detection method for wheat airborne disease spores based on a YOLO-CG-HS lightweight model. Background Art

[0002] Studies have shown that in the years of epidemics, airborne spores appear early and in relatively large numbers. The appearance of airborne spores is 10-20 days earlier than the onset of disease on the ground. Therefore, it is of great significance to accurately detect the concentration of spores of different airborne pathogens of wheat in the air at an early stage, predict the development of the disease, and take necessary prevention and control measures in time for the realization of early warning and prevention of different diseases.

[0003] So far, the main methods for detecting pathogens mediated by airborne spores include liquid chromatography, flow cytometry, real-time fluorescence quantitative PCR, and molecular chemistry. These methods have high accuracy, but the experimental steps are relatively complicated. Advances in microscopy and sample preparation technology have accumulated a large amount of image data. Although they can provide support for accurate analysis and statistics, they usually require markers to count cells or draw outlines to quantify shape and cell intensity. Morphological microscopic image recognition is also a commonly used spore detection method. It is completed by observing microscopic images with the naked eye and counting the number of spores. This method takes a long time to detect, consumes a lot of human resources, has a low degree of automation, requires high professional knowledge, and is highly subjective.

[0004] The rapid development of deep learning in recent years has led to important breakthroughs in all aspects of computer vision, especially in the field of object detection. Algorithms in the field of object detection can be mainly divided into two categories: 2-stage networks and single-stage networks. The main idea of ​​2-stage networks, such as the R-CNN series (including Fast R-CNN, Cascade RCNN, etc.), is to first generate some candidate regions through a region proposal network (RPN), and then classify and regress these regions to achieve object detection. For example, the fungal spore detection model proposed by some studies has improved the accuracy of spore detection, but its model has high computational complexity, slow inference speed, and high computational overhead.

[0005] In contrast, the main idea of ​​single-stage networks, such as the YOLO series, is to directly predict the category and location of the target in the network, eliminating the step of region proposal, thereby greatly improving the detection speed. The main advantage of single-stage networks is that they are fast and the amount of calculation is greatly reduced. They can meet the high real-time requirements of agricultural production and have certain advantages in small target detection. Researchers have used the YOLO series network for weed recognition, apple flower detection, strawberry fruit detection and other related applications. In the detection of crop pathogens, some researchers have also explored it. For example, Zhang et al. proposed the Yolov5-ECA-ASFF deep learning network for wheat fusarium spore recognition based on the Yolov5s network. Li et al. proposed the MG-YOLO detection algorithm (multi-head self-attention and Ghost optimized YOLO) by improving the original Yolov5s model to achieve rapid detection of cucumber gray mold spores.

[0006] Most previous studies only studied one type of airborne fungal spore of the research object, without considering that when one disease occurs in the crop, other airborne fungal spores may appear at the same time, which will affect the accuracy of spore detection. Fusarium spores are sickle-shaped, and sickle-shaped spores in the field environment have various shapes (different rotation angles), and powdery mildew spores are elliptical. Both spores have a three-dimensional structure. When two types of diseases break out at the same time, the spore density is high and they are stuck together, which greatly increases the difficulty of spore detection and poses certain challenges. At the same time, most current spore detection models are difficult to meet the model migration and application requirements of low-cost, high-precision embedded field spore capture instruments.

[0007] Therefore, how to establish a low-complexity and high-precision lightweight spore detection model for wheat airborne fungal disease spores has become a technical problem that needs to be solved urgently. Summary of the invention

[0008] The purpose of the present invention is to solve the defect that it is difficult to perform accurate and lightweight real-time detection of spore microscopic images in the prior art, and to provide a wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model to solve the above problem.

[0009] In order to achieve the above object, the technical solution of the present invention is as follows:

[0010] A method for detecting wheat airborne disease spores using microscopic images based on a YOLO-CG-HS lightweight model, comprising the following steps:

[0011] Acquisition and preprocessing of wheat airborne disease spore microscopic image dataset: Acquire wheat airborne disease spore microscopic images, perform data enhancement and data annotation on them, and save them in YOLO format;

[0012] Construction of lightweight pathogen spore detection model: Based on YOLOv5s as the baseline model, a lightweight pathogen spore detection model was constructed through improvements;

[0013] Training of lightweight pathogen spore detection model: Input spore microscopic images in YOLO format into lightweight pathogen spore detection model for training;

[0014] Acquisition of the image of the spores to be detected: acquiring the image of the spores to be detected and performing preprocessing;

[0015] Acquisition of spore microscopic image detection results: The preprocessed spore image to be detected is input into the trained lightweight pathogen spore detection model to obtain the spore microscopic image detection results.

[0016] The construction of the lightweight pathogen spore detection model includes the following steps:

[0017] Set YOLOv5s to include Backbone module, Neck module and Head module;

[0018] Replace the original C3 module in the Backbone module with a lightweight downsampling ContextGuided module to make the model focus on the global information of the entire spore image;

[0019] The feature pyramid in the Neck module is replaced with HS-FPN, which is used to enhance the information fusion capability of the Neck module by fusing different morphological and multi-scale detail features of spores, that is, fusing high-level features and low-level features of spores. High-level features include spore category and contour information, and low-level features include spore size, shape, and texture information.

[0020] Set up the lightweight downsampling ContextGuided module;

[0021] Set up the HS-FPN module.

[0022] The training of the lightweight pathogen spore detection model includes the following steps:

[0023] The training environment is configured as follows: the GPU is NVIDIA GeForce RTX 3080 Ti, the CPU is i7 11700k, and it runs on Windows 10 system with Pytorch framework and Python 3.8 programming language;

[0024] Training parameter settings: model input size is 640×640, the number of samples per batch is 8, the multilinear process is 3, the stochastic gradient descent method SGD is used to optimize the network parameters, the momentum is set to 0.937, the initial learning rate of the weight is 0.01, the weight decay is 0.0005, and a total of 100 rounds of training;

[0025] The spore image dataset is input into the Backbone module of the lightweight pathogen spore detection model. The image is processed by the lightweight downsampling ContextGuided module, which aggregates context information from the bottom layer to the top layer and captures context information at the deep semantic level and shallow spatial level. It captures the global information of the spore image and the edge information of the spore, further enhances and extracts the abstract features of the spore image, and outputs multi-level feature maps. These multi-level feature maps include feature information of different levels extracted from the spore image.

[0026] The Neck module receives the multi-level feature map from the Backbone module, and the lightweight downsampling ContextGuided module captures the feature information of different levels from the spore image. It further uses HS-FPN to fuse the different morphological and multi-scale detail features of the spores, enhance the semantic information of the features, and retain the spatial information at the same time, and outputs the feature map that fuses the multi-level spore features.

[0027] The Head module receives the feature map of the fused multi-level spore features processed by the Neck module, and performs detection and classification of spores of different airborne diseases on the fused feature map.

[0028] The setting of the lightweight downsampling ContextGuided module includes the following steps: Set the local feature extractor Instantiate a 3×3 standard convolutional layer to learn the local features of the input spore feature map; The surrounding context extractor Instantiated as a 3×3 dilated convolutional layer to learn the surrounding context features of the input spore feature map; Setting up the joint feature extractor It is a connection layer that concatenates local features and surrounding context features, and obtains joint features through batch normalization BN and parameterized ReLU operations. The joint features contain rich information about the spore target area itself and its surrounding environment; The global context extractor Instantiated as a global average pooling layer, the entire feature map is pooled, global context information is aggregated, and the global context information is further extracted and compressed through a multi-layer perceptron;

[0029] The output of the multilayer perceptron is multiplied channel by channel with the joint features to obtain the final enhanced features, and the channel reorganization operation uses the global context information to weight the joint features.

[0030] The setting of the HS-FPN module comprises the following steps:

[0031] The HS-FPN module is set to include a feature selection module and a feature fusion module;

[0032] Set up a feature selection module, which includes a channel attention module CA and a dimension matching module DM. The channel attention module CA performs global average pooling and global maximum pooling on the input feature map, extracts the feature information of each channel, combines the pooled features, and obtains the weight of each channel through the Sigmoid activation function. The feature map is weighted using the weight information to obtain the filtered feature map; the dimension matching module DM is used to unify the number of channels of feature maps of different scales;

[0033] The feature fusion module is set up to combine the selected low-level features and high-level features through the selective feature fusion (SFF) mechanism to enhance the feature expression ability of the model in the spore detection task and improve the detection effect and performance. The low-level features include spore size, shape and texture, and the high-level features include spore category and contour. The specific steps are as follows:

[0034] Perform feature upsampling: Use transposed convolution and bilinear interpolation to convert spore high-level features Upsampling to low-level features related to spores Same size, spore advanced features Expanded by transposed convolution , and then the feature is obtained by up- or down-sampling through bilinear interpolation ;

[0035] Channel attention mechanism: Through the channel attention module, high-level features are converted into attention weights to filter important semantic information in low-level features;

[0036] Feature fusion: Add the filtered low-level features to the high-level features element by element, so as to realize the transmission of high-level semantic information to low-level features, enhance the expression ability of low-level features, and obtain ;

[0037] Output: Finally, multi-level spore features are output as feature input for subsequent tasks.

[0038] The expression of feature selection fusion is as follows:

[0039]

[0040] ,

[0041] in, It is an advanced feature of spores. It is a low-level characteristic of spores. is the feature after up- or down-sampling by bilinear interpolation, is the bilinear interpolation method, is the transposed convolution and CA is the channel attention.

[0042] Beneficial Effects

[0043] Compared with the prior art, the wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model of the present invention can effectively solve the needs for low-complexity, high-precision lightweight detection models and real-time accurate detection. By designing a YOLO-CG-HS lightweight pathogen spore detection model, it is possible to reduce excessive unnecessary parameters, reduce model complexity, reduce hardware burden, and make the model more focused on studying the characteristics of airborne disease spores.

[0044] The present invention uses YOLOv5s as the baseline model, introduces a lightweight downsampling CG module in Backbone, and introduces a lightweight pathogen spore detection model of the HS-FPN module in the Neck part. This method has the characteristics of deep learning technology, and can continuously optimize the network through training to improve detection capabilities.

[0045] The present invention can accurately detect different types of pathogen spores, well balance the parameter quantity, efficiency and accuracy, realize the classification detection of different fungal spores under different densities and multiple scenarios, further analyze the concentration of pathogens, and more accurately predict the degree of disease, time of disease onset, and even the disease area, providing important guidance for the scientific and precise prevention and control of diseases. At the same time, it provides important technical support for the model migration and application of low-cost, high-precision embedded field spore capture instruments.

[0046] The present invention also has the following advantages:

[0047] (1) The designed YOLO-CG-HS algorithm introduces a lightweight downsampling ContextGuided module (CG) in Backbone and a lightweight High-level Screening-feature Pyramid Networks (HS-FPN) module in Head. This algorithm has a good balance between parameter quantity, efficiency and accuracy.

[0048] (2) In various scenarios such as different morphologies, different densities, and different background complexities, the spore detection method designed by the present invention can effectively solve the problem of difficult identification and missed identification caused by the adhesion and overlap of different spores, indicating that the improved spore detection method has good robustness;

[0049] (3) The designed YOLO-CG-HS model is slightly lower in accuracy than advanced target algorithms such as YOLOv7, Yolov7-tiny and Yolov8n. However, the network has certain advantages in model size, sacrificing some accuracy indicators, which is more conducive to the migration and application of the model on embedded devices such as field spore capture instruments. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a method sequence diagram of the present invention;

[0051] Figure 2 This is a structural diagram of a lightweight pathogen spore detection model involved in the present invention;

[0052] Figure 3 This is a diagram of spore detection results in different forms involved in the present invention;

[0053] Figure 4 This is a diagram of spore detection at different densities involved in the present invention.

[0054] in, Figure 3 (a) is a comparison chart of Fusarium spore detection of different sizes and different rotation angles; Figure 3 (b) is a comparison of the detection of powdery mildew spores of different shapes, sizes and adhesion; Figure 3 (c) is a comparison chart of spore detection under lens blur; Figure 4 (a) is a comparison chart of the detection under the condition of sparse spores in the air when the disease has not occurred; Figure 4 (b) is a comparison diagram of detection under dense powdery mildew spores in a wheat powdery mildew outbreak scenario; Figure 4 (c) is a comparison chart of the detection of dense fusarium spores in a wheat fusarium spore outbreak scenario. DETAILED DESCRIPTION

[0055] In order to have a further understanding and recognition of the structural features and the effects achieved by the present invention, a preferred embodiment and accompanying drawings are used for detailed description as follows:

[0056] like Figure 1 As shown, the wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model of the present invention comprises the following steps:

[0057] The first step is to obtain and preprocess the wheat airborne disease spore microscopic image dataset: obtain wheat airborne disease spore microscopic images, perform data enhancement and data annotation on them, and save them in YOLO format.

[0058] In practical applications, the specific process of data preparation is as follows: the test strain stored at 4°C is purified on potato dextrose agar (PDA) medium and cultured in a dark constant temperature incubator at 28°C for 5 days. Then, an appropriate amount of bacterial disc is cut and placed in the spore-producing culture medium, and placed in a shaker at 28°C for 2 days to prepare a spore suspension. At the same time, in order to simulate the different amounts of fungal sources under different degrees of disease in the field, the two types of spore suspensions are mixed and diluted with sterile water into spore suspensions of different concentrations for later use (1 × 10 6 , 1 × 10 5 , 1 × 10 4 spores / ml). Spore image capture: A small amount of spore suspension was taken with a sterile dropper and dropped on the center of the slide and covered with a clean and dry coverslip. The Zeiss Axio Vert.A1 research-grade inverted materials microscope was used to collect spore images. During the shooting process, the target area was first located with a low-power microscope, and then the high-power microscope (magnification of 10×40) was switched to fine-tune the focus and exposure. When the system was stable and the image was clear, the spore microscopic image was captured by the ZEN3.2 software image acquisition system and stored in JPG format. Data enhancement: In order to improve the generalization ability and robustness of the model, the spore image data was enhanced by introducing noise points, changing the brightness (simulating the degree of light and dark), and random cropping. Data annotation: The spore images were manually annotated using LabelImg software and saved in YOLO format. Blurred parts of the image were not annotated to prevent overfitting during training.

[0059] The second step is to build a lightweight pathogen spore detection model: Based on YOLOv5s as the baseline model, a lightweight pathogen spore detection model is built, such as Figure 2 shown.

[0060] Aiming at the requirements of low-complexity, high-precision lightweight detection model and real-time accurate detection, the present invention designs a YOLO-CG-HS lightweight pathogen spore detection model. The model consists of three main parts: Backbone, Neck and Head. In order to better realize lightweight detection, reduce the amount of unnecessary parameters, reduce the complexity of the model, reduce the hardware burden, make the model pay more attention to the characteristics of the research object, and achieve a balance in model size, efficiency and accuracy, especially suitable for running the model on field equipment with limited resources. The present invention mainly uses YOLOv5s as the baseline model and makes the following improvements: First, a lightweight downsampling ContextGuided module (CG) is introduced in Backbone to make the model pay more attention to the global information of the entire spore image. Secondly, since the purpose of the present invention is to detect the pathogen spores of wheat airborne diseases, the acquired spore image has the characteristics of small target, different size and shape, dense spores and difficult to identify. In addition, spores are three-dimensional structures, and there will be problems of difficult identification and missed identification due to the adhesion and overlap of different spores. Therefore, High-level Screening-feature Pyramid Networks (HS-FPN) are introduced in the Neck part. The purpose is to enhance the information fusion capability of the Neck part by fusing the different morphological and multi-scale detail features of spores. The high-level features include spore category, contour and other information, and the low-level features include spore size, shape, texture and other information. This can reduce the number of model parameters and improve the detection performance of the model in spores of different shapes and sizes.

[0061] The specific steps are as follows:

[0062] (1) Set YOLOv5s to include Backbone module, Neck module and Head module.

[0063] (2) Replace the original C3 module in the Backbone module with a lightweight downsampling ContextGuided module to enable the model to focus on the global information of the entire spore image. The lightweight downsampling ContextGuided module (CG) is introduced in the Backbone of YOLOv5s to enable the model to better focus on the global information of the entire spore image. At the same time, the current high-precision model has too many parameters, and the existing small memory model ignores the essential characteristics of target detection. This module helps the network understand the global information of the entire spore image and improves the detection ability of wheat fusarium spores.

[0064] (3) The feature pyramid in the Neck module is replaced with HS-FPN. By fusing the different morphological and multi-scale detailed features of spores, that is, fusing the high-level features and low-level features of spores, the high-level features include spore category, contour and other information, and the low-level features include spore size, shape, texture and other information, it is used to enhance the information fusion ability of the Neck module. High-level Screening-feature Pyramid Networks (HS-FPN) is introduced in the Neck part of YOLOv5s. The purpose is to enhance the information fusion ability of the Neck part by fusing the different morphological and multi-scale detailed features of spores. The high-level features include spore category, contour and other information, and the low-level features include spore size, shape, texture and other information, so as to reduce the number of model parameters and improve the detection performance of the model in spores of different shapes and sizes.

[0065] (4) Set up the lightweight downsampling ContextGuided module.

[0066] The Context Guided (CG) block is used to capture the local features of spores, surrounding context, and global context, and fuse this information to improve the accuracy of semantic segmentation and object detection. It contains a local feature extractor , surrounding context extractor , Joint Feature Extractor and the global context extractor Global average pooling (GAP) is used to extract contextual information of the entire image, which is then further processed by two fully connected layers (FC). This helps the network understand the global information of the entire spore image, which is particularly important for classifying local regions in the image, especially when the categories of these local regions may depend on the global context.

[0067] The CG module uses residual learning, which helps learn complex features and improves the gradient back propagation process. In this module, there are two residual connection methods. One is local residual learning (LRL), which connects the input and the joint feature extractor. Another is global residual learning (GRL), which combines the input and the global context extractor Compared with LRL, GRL has a stronger ability to promote the flow of information in the network.

[0068] A1) Set the local feature extractor Instantiate a 3×3 standard convolutional layer to learn the local features of the input spore feature map.

[0069] A2) The surrounding context extractor Instantiated as a 3×3 dilated convolutional layer to learn the surrounding context features of the input spore feature map.

[0070] A3) Setting up the joint feature extractor It is a connection layer that concatenates the local features and the surrounding context features, and obtains the joint features through batch normalization BN and parameterized ReLU operations. The joint features contain rich information about the spore target area itself and its surrounding environment.

[0071] A4) Global context extractor Instantiated as a global average pooling layer, the entire feature map is pooled, global context information is aggregated, and the global context information is further extracted and compressed through a multi-layer perceptron;

[0072] The output of the multilayer perceptron is multiplied channel by channel with the joint features to obtain the final enhanced features, and the channel reorganization operation uses the global context information to weight the joint features.

[0073] (5) Set up the HS-FPN module.

[0074] The HS-FPN module (High-level Screening-feature Pyramid Networks) is a multi-scale feature fusion module used in the present invention for different types of disease spore detection tasks. In the task of pathogen spore detection, there is a significant multi-scale problem. Different types of spores differ in size, and even in the same type of spores, spore size and different microscope differences can lead to scale differences. This multi-scale problem poses a challenge to the model and requires an effective multi-scale feature fusion strategy to deal with it.

[0075] The design of the HS-FPN module mainly includes the following two parts:

[0076] Feature selection module: The function of this module is to filter low-level features. Specifically, the Channel Attention (CA) module is first used to filter low-level features. The Channel Attention module calculates the average and maximum values ​​of each channel through global average pooling and global maximum pooling, and combines these two values ​​to obtain the weight of each channel. Then, this weight is multiplied point by point with the feature map of the corresponding scale to filter out important low-level features. In addition, the feature selection module also includes a Dimensional Matching (DM) module, which is used to unify the number of channels of feature maps of different scales.

[0077] Feature fusion module: This module is responsible for fusing the filtered low-level features with high-level features. First, the high-level features are upsampled using deconvolution to expand their size. Then, the upsampled high-level feature size is adjusted through bilinear interpolation to align it with the low-level feature map. Next, the high-level features are converted into attention weights for filtering low-level features. Finally, the filtered low-level features are added point by point to the high-level features to achieve effective feature fusion.

[0078] The specific steps are as follows:

[0079] B1) Setting the HS-FPN module to include a feature selection module and a feature fusion module;

[0080] B2) Set up a feature selection module, which includes a channel attention module CA and a dimension matching module DM. The channel attention module CA performs global average pooling and global maximum pooling on the input feature map, extracts the feature information of each channel, combines the pooled features, and obtains the weight of each channel through the Sigmoid activation function. The feature map is weighted using the weight information to obtain the filtered feature map; the dimension matching module DM is used to unify the number of channels of feature maps of different scales;

[0081] B3) Setting up a feature fusion module, combining the selected low-level features with high-level features through the selective feature fusion (SFF) mechanism, to enhance the feature expression capability of the model in the spore detection task and improve the detection effect and performance. The low-level features include spore size, shape and texture, and the high-level features include spore category and outline. The specific steps are as follows:

[0082] B31) Perform feature upsampling: Use transposed convolution and bilinear interpolation to convert spore high-level features Upsampling to low-level features related to spores Same size, spore advanced features Expanded by transposed convolution , and then the feature is obtained by up- or down-sampling through bilinear interpolation ;

[0083] B32) Channel attention mechanism: Through the channel attention module, high-level features are converted into attention weights to filter important semantic information in low-level features;

[0084] B33) Feature fusion: Add the filtered low-level features to the high-level features element by element, so as to realize the transmission of high-level semantic information to low-level features, enhance the expression ability of low-level features, and obtain ;

[0085] B34) Output: The fused features are finally output as feature input for subsequent tasks.

[0086] The expression of feature selection fusion is as follows:

[0087]

[0088] ,

[0089] in, It is an advanced feature of spores. It is a low-level characteristic of spores. is the feature after up- or down-sampling by bilinear interpolation, is the bilinear interpolation method, is the transposed convolution and CA is the channel attention.

[0090] The third step is to train the lightweight pathogen spore detection model: input the spore microscopic image in YOLO format into the lightweight pathogen spore detection model for training.

[0091] (1) Configure the training environment: the GPU is NVIDIA GeForce RTX 3080 Ti, the CPU is i7 11700k, and it runs on Windows 10 system with Pytorch framework and Python 3.8 programming language.

[0092] (2) Training parameter settings: The model input size is 640×640, the number of samples per batch is 8, the number of multilinear processes is 3, the stochastic gradient descent method SGD is used to optimize the network parameters, the momentum is set to 0.937, the initial learning rate of the weight is 0.01, the weight decay is 0.0005, and a total of 100 rounds of training are performed.

[0093] (3) The spore image dataset is input into the Backbone module of the lightweight pathogen spore detection model. The image is processed by the lightweight downsampling ContextGuided module, which aggregates context information from the bottom layer to the top layer and captures context information at the deep semantic level and shallow spatial level. The global information of the spore image and the edge information of the spore are captured to extract the abstract features of the spore image and output multi-level feature maps. These multi-level feature maps include feature information of different levels extracted from the spore image.

[0094] (4) The Neck module receives the multi-level feature map from the Backbone module, which contains the feature information of different levels captured by the ContextGuided module from the spore image. It further uses HS-FPN to fuse the different morphological and multi-scale detail features of the spores, enhance the semantic information of the features, and retain the spatial information at the same time, and outputs the feature map that fuses the multi-level spore features.

[0095] (5) The Head module receives the feature map of the fused multi-level spore features processed by the Neck module, and performs detection and classification of spores of different airborne diseases on the fused feature map.

[0096] The fourth step is to obtain the image of the spores to be detected: obtain the image of the spores to be detected and perform preprocessing.

[0097] The fifth step is to obtain the spore microscopic image detection results: the pre-processed spore image to be detected is input into the trained lightweight pathogen spore detection model to obtain the spore microscopic image detection results.

[0098] like Figure 3 To verify the detection ability of the YOLO-CG-HS model in different morphological spores, the visualization results are shown in Figure 3 As shown. Figure 3 In (a), the green box shows that the YOLO-CG-HS model accurately detects fusarium spores of different sizes and rotation angles, the yellow box shows that the YOLO-CG-HS model accurately detects shriveled and dehydrated powdery mildew spores, and the blue box shows that the YOLO-CG-HS model accurately detects damaged powdery mildew spores. Figure 3 In (b), the purple box shows that the YOLO-CG-HS model accurately detects powdery mildew spores of different shapes, sizes, and adhesions. Figure 3 In (c), the scene of lens blur is simulated. At this time, only tiny spores with clear outlines and unclear textures can be observed in the image. Figure 3 In the original images of (a) and (b), the spores are much more blurred. Since the model adds the Context Guided and HS-FPN modules, the network's ability to understand the global information of the entire spore image is improved. The YOLO-CG-HS model integrates the structural information and texture details of the spores, so it can also accurately detect pathogen spores in blurred scenes.

[0099] exist Figure 4 As shown in Figure 1, it shows the results of spore detection at different densities before and after the improvement of the Yolov5s network. Figure 4 In (a), the scenario where there are sparse spores in the air and the spore density is low when the disease does not occur is simulated. Both models can accurately detect wheat fusarium spores and powdery mildew spores. Figure 4In (b), a wheat powdery mildew epidemic is simulated. The density of powdery mildew spores in the air is high, while the density of Fusarium graminearum, a wheat scab, is low (with a tendency to develop), and multiple spores are stuck together. Since spores are three-dimensional, there will be occlusion between and within classes, which can easily lead to missed detection when different spores are superimposed. Figure 4 (b) It can be seen that Yolov5s has some missed detections. The blue dotted box indicates missed detection of powdery mildew spores, and the green dotted box indicates missed detection of Fusarium graminearum, a wheat scab. In the detection results of the YOLO-CG-HS model, it is found that these two types of missed detections are mostly avoided. Figure 4 In (b), YOLO-CG-HS also missed one detection, but performed better than the previous model in most cases of spore adhesion. Figure 4 In (c), a wheat fusarium spore epidemic is simulated. The density of fusarium spores in the air is high, while the spores of wheat powdery mildew are few (with a tendency to develop), and multiple spores are stuck together. It is also found that the YOLO-CG-HS model avoids two types of missed detections well.

[0100] In summary, the YOLO-CG-HS model can well detect different types of spores at different densities. The reason is that the improved model incorporates the HS-FPN module, which can effectively solve the multi-scale difficult detection problem of spore images. By designing a channel attention module for feature screening, the high-level semantic features and low-level features of different types of spores are organically integrated. This feature fusion strategy significantly improves the model's feature expression ability in spore detection tasks.

[0101] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. A microscopic image detection method for wheat airborne disease spores based on the YOLO-CG-HS lightweight model. It is characterized in that The following steps are involved: 11) Acquisition and preprocessing of wheat airborne disease spore microscopic image dataset: Acquire wheat airborne disease spore microscopic images, perform data enhancement and data annotation on them, and save them in YOLO format; 12) Construction of lightweight pathogen spore detection model: Based on YOLOv5s as the baseline model, a lightweight pathogen spore detection model was constructed; 13) Training of lightweight pathogen spore detection model: Input the spore microscopic image in YOLO format into the lightweight pathogen spore detection model for training; 14) Acquisition of the image of the spores to be detected: acquiring the image of the spores to be detected and performing preprocessing; 15) Obtaining spore microscopic image detection results: The preprocessed spore image to be detected is input into the trained lightweight pathogen spore detection model to obtain the spore microscopic image detection results.

2. The wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model according to claim 1, It is characterized in that The construction of the lightweight pathogen spore detection model includes the following steps: 21) Set YOLOv5s to include Backbone module, Neck module and Head module; 22) Replace the original C3 module in the Backbone module with a lightweight downsampling ContextGuided module to make the model focus on the global information of the entire spore image; 23) The feature pyramid in the Neck module is replaced with HS-FPN, which is used to enhance the information fusion capability of the Neck module by fusing the different morphological and multi-scale detail features of spores, that is, fusing the high-level features and low-level features of spores. The high-level features include spore category and contour information, and the low-level features include spore size, shape, and texture information. 24) Set up the lightweight downsampling ContextGuided module; 25) Set up the HS-FPN module.

3. The wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model according to claim 1, It is characterized in that The training of the lightweight pathogen spore detection model includes the following steps: 31) Configure the training environment: GPU is NVIDIA GeForce RTX 3080 Ti, CPU is i7 11700k, and it runs on Windows 10 system with Pytorch framework and Python 3.8 programming language; 32) Training parameter settings: model input size is 640×640, the number of samples per batch is 8, the multilinear process is 3, the stochastic gradient descent method SGD is used to optimize the network parameters, the momentum is set to 0.937, the initial learning rate of the weight is 0.01, the weight decay is 0.0005, and a total of 100 rounds of training; 33) The spore image dataset is input into the Backbone module of the lightweight pathogen spore detection model. The image is processed by the lightweight downsampling ContextGuided module, which aggregates context information from the bottom layer to the top layer, and captures context information at the deep semantic level and the shallow spatial level, capturing the global information of the spore image and the edge information of the spore, further enhancing and extracting the abstract features of the spore image, and outputting multi-level feature maps, which include feature information of different levels extracted from the spore image; 34) The Neck module receives the multi-level feature map from the Backbone module, and the lightweight downsampling ContextGuided module captures the feature information of different levels from the spore image. It further uses HS-FPN to fuse the different morphological and multi-scale detail features of the spores, enhances the semantic information of the features, and retains the spatial information, and outputs the feature map that fuses the multi-level spore features. 35) The Head module receives the feature map of multi-level spore features processed by the Neck module, and performs detection and classification of spores of different airborne diseases on the fused feature map.

4. The method for detecting wheat airborne disease spores by microscopic images based on the YOLO-CG-HS lightweight model according to claim 2, It is characterized in that The setting of the lightweight downsampling ContextGuided module includes the following steps: 41) Set the local feature extractor Instantiate a 3×3 standard convolutional layer to learn the local features of the input spore feature map; 42) The surrounding context extractor Instantiated as a 3×3 dilated convolutional layer to learn the surrounding context features of the input spore feature map; 43) Setting up the joint feature extractor It is a connection layer that concatenates local features and surrounding context features, and obtains joint features through batch normalization BN and parameterized ReLU operations. The joint features contain rich information about the spore target area itself and its surrounding environment; 44) Global context extractor Instantiated as a global average pooling layer, the entire feature map is pooled, global context information is aggregated, and the global context information is further extracted and compressed through a multi-layer perceptron; 45) The output of the multilayer perceptron is multiplied by the joint feature channel by channel to obtain the final enhanced feature. The channel reorganization operation uses the global context information to weight the joint feature.

5. The wheat airborne disease spore microscopic image detection method based on the YOLO-CG-HS lightweight model according to claim 2, It is characterized in that The setting of the HS-FPN module comprises the following steps: 51) Set the HS-FPN module to include a feature selection module and a feature fusion module; 52) Set a feature selection module, which includes a channel attention module CA and a dimension matching module DM. The channel attention module CA performs global average pooling and global maximum pooling on the input feature map, extracts the feature information of each channel, combines the pooled features, and obtains the weight of each channel through the Sigmoid activation function. The feature map is weighted using the weight information to obtain the filtered feature map; the dimension matching module DM is used to unify the number of channels of feature maps of different scales; 53) Set up a feature fusion module to combine the selected low-level features and high-level features through the selective feature fusion (SFF) mechanism to enhance the feature expression ability of the model in the spore detection task and improve the detection effect and performance. The low-level features include spore size, shape and texture, and the high-level features include spore category and contour. The specific steps are as follows: 531) Feature upsampling: Use transposed convolution and bilinear interpolation to upsample spore high-level features Upsampling to low-level features related to spores Same size, spore advanced features Expanded by transposed convolution , and then the feature is obtained by up- or down-sampling through bilinear interpolation ; 532) Channel attention mechanism: Through the channel attention module, high-level features are converted into attention weights to filter important semantic information in low-level features; 533) Feature fusion: Add the filtered low-level features to the high-level features element by element, so as to realize the transmission of high-level semantic information to low-level features, enhance the expression ability of low-level features, and obtain ; 534) Output: Finally, the multi-level spore features are output as feature input for subsequent tasks. The expression of feature selection fusion is as follows: , in, It is an advanced feature of spores. It is a low-level characteristic of spores. is the feature after up- or down-sampling by bilinear interpolation, is the bilinear interpolation method, is the transposed convolution and CA is the channel attention.

Citation Information

Patent Citations

  • Yolov5s-based wheat stripe rust spore image detection method and system

    CN117274988A

Cited By

  • Traffic safety facility identification method based on attention residual fusion model

    CN119600574A

  • Enhanced YOLO-based health status early warning method for artificially cultivated shellfish larvae

    CN120375412A

  • YOLOv8-based conidium detection method

    CN121170789A

  • Walnut fruit disease type and severity intelligent diagnosis system based on deep learning

    CN122842105A