A Microscopic Image Detection Method for Uricoids of Wheat Stripe Rust Based on Rotatable Elliptical Frames
By developing a method for detecting urediniospores based on a rotatable elliptical frame, the problems of false detection and false negative detection of urediniospores from wheat stripe rust fungus microscopic images were solved, achieving efficient and accurate spore identification and counting, and suitable for real-time detection in complex environments.
Patent Information
- Application Number
- CN202211568315.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-12-08
AI Technical Summary
Existing machine vision algorithms suffer from false detection and false negative detection when detecting microscopic images of wheat stripe rust fungus urediniospores, and lack robustness in complex environments, making it difficult to achieve efficient and accurate spore identification and counting.
A method for detecting urediniospores based on rotatable elliptical boxes is adopted. By combining the improved ResNet50 Conv1-5 backbone network with jump connections, batch normalization and ReLU activation, the model is trained using heatmaps, offsets, box parameters and orientation loss functions to construct a urediniospore detection model, and the target is detected by rotatable elliptical boxes.
It achieves accurate detection and segmentation of urediniospores, with an identification accuracy of 98.61%, a segmentation rate of 85.15%, and an inference speed of 0.3254s/iter, meeting the requirements for real-time detection and showing broader application prospects in complex environments.
Smart Images

Figure CN115797928B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural image processing technology, and in particular to a method for detecting wheat stripe rust fungus urediniospores using microscopic images based on a rotatable elliptical frame. Background Technology
[0002] Wheat is a major food source for humans worldwide and one of the most important cereal crops for food security. However, the safe production of wheat faces many challenges from abiotic and biotic stresses, particularly pathogenic bacteria, among which stripe rust is the most serious. Wheat stripe rust, also known as yellow rust caused by *Puccinia striiformis* f.sp. *tritici*, is a devastating foliar fungal disease that causes significant yield losses in wheat crops. It has been found in more than 60 countries worldwide, especially in temperate regions. The urediniospores of *Puccinia striiformis* are easily dispersed over long distances by high-altitude air currents, characterized by large-scale outbreaks and epidemics. The number of airborne urediniospores in wheat fields is closely related to the occurrence of wheat diseases. Therefore, timely and accurate capture and counting of airborne urediniospores can provide fundamental data for early prediction of wheat stripe rust and is of great significance for reducing the losses caused by this disease.
[0003] The capture and counting of airborne fungal spores is a challenging problem in plant protection. Since pathogenic spores of various fungal diseases in crops are typically micrometer-sized, spore collection requires spore-capturing devices. The traditional method of counting spores by visual observation under a microscope by skilled technicians is time-consuming, labor-intensive, and inefficient, sometimes leading to significant errors. Laboratory chemical methods based on real-time PCR can achieve quantitative detection of spore concentration, but due to their high technical requirements, complex preprocessing, and operational complexity, online on-site spore identification is difficult. In recent years, machine vision algorithms have been widely applied to spore identification research in various crops; however, combining traditional machine vision algorithms for spore detection typically involves image preprocessing, feature extraction and optimization, pattern recognition, and counting. Some progress has been made in spore identification under specific environments, but the drawback is that manual feature extraction methods are separate, complex, and time-consuming, making the models lack general applicability. There is an urgent need to establish a spore identification and counting model with high generality and robustness in complex environments.
[0004] With the development of deep learning and the continuous improvement of parallel computing capabilities, Convolutional Neural Networks (CNNs) have significant advantages in the field of object detection. CNNs are a learning method that directly processes raw data and automatically learns representations and extracts appropriate features. Compared to manually extracted features, trained representations require less manual intervention and lead to better results. Currently, CNN-based object detection methods are mainly divided into two categories: the first is based on Region Recommendation Networks (RPNs), such as Fast R-CNN, Faster R-CNN, and Mask R-CNN; the second is based on full image regression to achieve simultaneous prediction of object classification and location, such as CenterNet, YOLO, and SSD. Current CNN detection methods have not yet been combined with spore morphological features, leading to weak robustness and the problem of false positives and false negatives in urediniospores. Figure 2 It can be seen that: the urediniospores are oval in shape, and the individuals are small and dense; the urediniospores adhere to each other severely; due to the influence of crystalline impurities and dust in the air when applying Vaseline, crystalline impurities and dust are present in the microscopic image, and the above characteristics of the image increase the difficulty of automatic detection of urediniospores.
[0005] Therefore, developing a microscopic image detection method for wheat stripe rust fungus urediniospores has become an urgent technical problem to be solved. Summary of the Invention
[0006] The purpose of this invention is to provide a method for detecting wheat stripe rust fungus urediniospores in microscopic images based on a rotatable elliptical frame. This method can accurately detect and segment urediniospores in microscopic images of wheat stripe rust fungus, with fast reasoning speed and high recognition accuracy, meeting the application requirements of real-time detection.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for detecting wheat stripe rust fungus urediniospores using a rotatable elliptical frame microscopic image, the method comprising the following sequential steps:
[0008] (1) Obtain the original microscopic images of urediniospores;
[0009] (2) Preprocess the original microscopic images of urediniospores to obtain labeled data. The labeled data form a urediniospore dataset. The urediniospore dataset is divided into a training set, a validation set, and a test set in a ratio of 6:2:2.
[0010] (3) Construct a urediniospore detection model based on a rotatable elliptic frame;
[0011] (4) Input the training set into the urediniospore detection model for training to obtain the trained urediniospore detection model, and use the validation set to validate the trained urediniospore detection model.
[0012] (5) Input the microscopic images of urediniospores in the test set into the trained urediniospore detection model. The trained urediniospore detection model outputs urediniospore detection information, which includes the urediniospore heatmap, offset, bounding box parameters and orientation class. The wheat stripe rust fungus urediniospores in the microscopic images are detected and located through the urediniospore detection information.
[0013] In step (2), the preprocessing of the original microscopic image of urediniospores to obtain labeled data specifically refers to:
[0014] For the raw microscopic images of urediniospores collected, the VGG image annotator in the via 2.0 annotation tool was used to annotate the urediniospore images with elliptical frames, obtaining initial COCO format annotation data. Then, using 144 discrete points from the annotation data, the coordinates of the endpoints of the major and minor axes of the elliptical frames and the rotation angle were calculated, resulting in the final annotation data, in the following format:
[0015] bbox[x a1 ,y a1 ,x a2 ,y a2 ,x b1 ,y b1 ,x b2 ,y b2 ,angel]
[0016] Among them, (x a1 ,y a1 ) and (x a2 ,y a2 (x) represents the coordinates of the two ends of the major axis of the ellipse. b1 ,y b1 ) and (x b2 ,y b2 ) represents the coordinates of the two ends of the minor axis of the ellipse, and angel represents the angle of the major axis of the ellipse relative to the positive x-axis, ranging from 0° to 180°.
[0017] Step (3) specifically includes the following steps:
[0018] (3a) Constructing a urediniospore detection model: An improved ResNet50 Conv1-5 is used as the backbone network. At the top of the backbone network, the feature map is sampled, and a feature map 4 times smaller than the input image is output. During the upsampling process, deep and shallow layers are combined through jump connections. First, the deep layer is sampled to the same size as the shallow layer through bilinear interpolation. The upsampled feature map is then refined through a 3×3 convolutional layer. The refined feature map is then connected to the shallow layer, followed by a 1×1 convolutional layer to refine the channel features. Batch normalization and ReLU activation are used in the latent layer, assuming the input RGB image is I∈R 3×T×WWhere T and W are the height and width of the RGB image, the output feature map is... Where C represents the number of channels and S represents the downsampling factor, it is then converted into four branches: heatmap offset box parameters and direction class Where K is the number of dataset categories, K=1; finally, the heatmap detection head module, offset detection head module, bounding box parameter detection head module, and orientation class detection head module are used to obtain the target's center, offset, bounding box parameter, and orientation class, respectively;
[0019] (3b) Setting the loss function: Setting the loss function L for the urediniospore detection model det It consists of four components: heatmap loss, offset, box parameter loss, and orientation class loss, and its formula is as follows:
[0020] L det =L h +L o +L b +L α (1)
[0021] In the formula, L h For heatmap loss, L o For offset loss, L b For the box parameter loss, L α Directional loss;
[0022] The heat map loss L h The calculation formula is:
[0023]
[0024] Among them, h i Representing and predicting heatmap values, represents the actual ground heat map value, i represents the pixel position on the feature map, N represents the number of objects, and β and γ are hyperparameters, which take values of 2 and 4 respectively;
[0025] The offset loss L o The calculation formula is:
[0026]
[0027] Where N represents the number of objects, o k It is the predicted offset value. Here, k is the actual ground offset value, k is the object index, and the formula for smooth L1 loss is:
[0028]
[0029] Box parameter loss L b The formula is:
[0030]
[0031] Among them, b k These are the predicted bounding box parameter values. These are the ground truth bounding box parameter values;
[0032] Directional loss L α The formula is:
[0033]
[0034] Where, α i It predicts the direction class value. It is the actual orientation value of the ground.
[0035] In step (4), the step of inputting the training set into the urediniospore detection model for training specifically includes the following steps:
[0036] (4a) Setting training parameters: The batch size is set to 4. The adaptive moment estimation method is used for optimization during training. The training process consists of 24 iterations, and the training learning rate is set to 1.25 × 10⁻⁶. -4 The weight decay is set to 0.0001;
[0037] (4b) Training of the urediniospore detection model:
[0038] The preprocessed microscopic image of urediniospores is input into the urediniospore detection model to obtain the feature map to be detected. Convolution and activation operations are performed on the feature map to be detected, and the heat map of the image is calculated to obtain the center point of each spore target in the urediniospore image. The spore target bounding box parameters and orientation class in the image are calculated through regression training. The urediniospore target detection box is determined based on the center point of the urediniospore target, the bounding box parameters, and the orientation class.
[0039] In step (3a), the frame parameter detection head module includes a boundary sensing vector, the width and height of the outer edge of the elliptical detection frame; the orientation detection head module includes a horizontal detection frame (HDB) and a rotational detection frame (RDB).
[0040] Before using the box parameter detection head module, a 3×3 max pooling layer is first applied to the output heatmap for non-maximum suppression to extract the center point of the target; then, the rotational boundary detection vector of the object is captured by learning the boundary sensing vector; the boundary sensing vector contains the top t, right r, bottom b, and left l vectors of the object's center point, which are distributed in the four quadrants of the Cartesian coordinate system;
[0041] The orientation detection head module divides orientation detection boxes (ODBs) into two categories: horizontal detection boxes (HDBs) and rotating detection boxes (RDBs). Rotating detection boxes (RDBs) include all orientation detection boxes except for horizontal detection boxes (HDBs). The formula for determining the type of orientation detection box (ODB) is as follows:
[0042]
[0043] Wherein, IOU is the degree of overlap between the directional detection box ODB and the horizontal detection box HDB.
[0044] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, compared with the prior art, the present invention can accurately detect and segment urediniospores in microscopic images of urediniospores, and the inference speed is faster; Second, the present invention optimizes the feature extraction network to extract target features, and improves the detection box to a rotatable elliptical box to enhance the segmentation overlap. The recognition accuracy of urediniospore detection of wheat stripe rust fungus reaches 98.61%, the segmentation rate reaches 85.15%, and the inference speed is 0.3254s / iter, meeting the application requirements of real-time detection; Third, compared with the prior art, the present invention can realize the detection of urediniospores in complex environments and has a broader application prospect. Attached Figure Description
[0045] Figure 1 This is a flowchart of the method of the present invention;
[0046] Figure 2 These are the original microscopic images of collected urediniospores;
[0047] Figure 3 This is a network structure diagram of the present invention;
[0048] Figure 4 Diagram of the improved ResNet50 feature extraction network structure;
[0049] Figure 5 For boundary-aware vector maps;
[0050] Figure 6 , Figure 7 All images are results of urediniospore microscopic image detection using the present invention. Detailed Implementation
[0051] like Figure 1 As shown, a method for detecting wheat stripe rust fungus urediniospores using microscopic images based on a rotatable elliptical frame is described. This method includes the following sequential steps:
[0052] (1) Obtain original microscopic images of urediniospores, such as Figure 2 As shown;
[0053] (2) Preprocess the original microscopic images of urediniospores to obtain labeled data. The labeled data form a urediniospore dataset. The urediniospore dataset is divided into a training set, a validation set, and a test set in a ratio of 6:2:2.
[0054] (3) A urediniospore detection model is constructed based on a rotatable elliptical frame. In this invention, the urediniospore detection model is referred to as the CDRENet model. CDRENet stands for Rotating Elliptical Network based on CBAM and DCN.
[0055] (4) Input the training set into the urediniospore detection model for training to obtain the trained urediniospore detection model, and use the validation set to validate the trained urediniospore detection model.
[0056] (5) Input the microscopic images of urediniospores in the test set into the trained urediniospore detection model. The trained urediniospore detection model outputs urediniospore detection information, which includes the urediniospore heatmap, offset, bounding box parameters and orientation class. The wheat stripe rust fungus urediniospores in the microscopic images are detected and located through the urediniospore detection information.
[0057] In step (2), the preprocessing of the original microscopic image of urediniospores to obtain labeled data specifically refers to:
[0058] During the shooting process, some of the original microscopic images of urediniospores became blurry and ghosted due to camera shake. To ensure image quality, the obtained original microscopic images of urediniospores were preprocessed, resulting in a total of 5100 microscopic images. Elliptical frames were used to annotate the acquired original microscopic images of urediniospores using the VGG image annotator in the via 2.0 annotation tool, obtaining initial COCO format annotation data. Then, using 144 discrete points from the annotation data, the coordinates of the endpoints of the major and minor axes of the elliptical frames and the rotation angle were calculated, ultimately yielding the annotation data, in the following format:
[0059] bbox[x a1 ,y a1 ,x a2 ,y a2 ,x b1 ,y b1 ,x b2 ,y b2 ,angel]
[0060] Among them, (x a1 ,y a1 ) and (x a2 ,y a2 (x) represents the coordinates of the two ends of the major axis of the ellipse. b1 ,y b1 ) and (xb2 ,y b2 ) represents the coordinates of the two ends of the minor axis of the ellipse, and angel represents the angle of the major axis of the ellipse relative to the positive x-axis, ranging from 0° to 180°.
[0061] like Figure 3 , Figure 4 As shown, step (3) specifically includes the following steps:
[0062] (3a) Constructing a urediniospore detection model: An improved ResNet50 Conv1-5 is used as the backbone network. At the top of the backbone network, the feature map is sampled, and a feature map 4 times smaller than the input image is output. During the upsampling process, deep and shallow layers are combined through jump connections to share high-level semantic information and finer details at the bottom layer. First, the deep layer is sampled to the same size as the shallow layer through bilinear interpolation. The upsampled feature map is then refined through a 3×3 convolutional layer. The refined feature map is then connected to the shallow layer, followed by a 1×1 convolutional layer to refine the channel features. Batch normalization and ReLU activation are used in the latent layer, assuming the input RGB image is I∈R. 3×T×W Where T and W are the height and width of the RGB image, the output feature map is... Where C represents the number of channels and S represents the downsampling factor, it is then converted into four branches: heatmap offset box parameters and direction class Where K is the number of dataset categories, K=1; finally, the heatmap detection head module, offset detection head module, bounding box parameter detection head module, and orientation class detection head module are used to obtain the target's center, offset, bounding box parameter, and orientation class, respectively;
[0063] (3b) Setting the loss function: Setting the loss function L for the urediniospore detection model det It consists of four components: heatmap loss, offset, box parameter loss, and orientation class loss, and its formula is as follows:
[0064] L det =L h +L o +L b +L α (1)
[0065] In the formula, L h For heatmap loss, L o For offset loss, L b For the box parameter loss, L α Directional loss;
[0066] When training the heatmap, only the center point c = (cx ,c y The center point is positive, while all other points, including those in Gaussian bumps, are negative. Due to this imbalance, directly learning the center point is difficult. To address this issue, this invention reduces the penalty for points in Gaussian bumps and uses an improved focal loss to train the heatmap L. h The heatmap loss L h The calculation formula is:
[0067]
[0068] Among them, h i Representing and predicting heatmap values, represents the actual ground heat map value, i represents the pixel position on the feature map, N represents the number of objects, and β and γ are hyperparameters, which take values of 2 and 4 respectively;
[0069] During the inference phase, peak points are extracted from the predicted heatmap H as the center point locations of the objects; these center points, c, are integers. However, downscaling the points from the input image to the output heatmap generates a floating-point number. To compensate for the difference between the quantized floating-point center points and the integer center points, this invention predicts an offset. Given ground truth center points on the input image The offset between the scaled floating center point and the quantization center point is:
[0070]
[0071] in, The x-coordinate represents the center point of the ground truth. The vertical coordinate of the ground truth center point is represented by s, and the downsampling factor is represented by s.
[0072] Offset loss L o Optimization is performed using the smooth L1 loss function, where the offset loss L... o The calculation formula is:
[0073]
[0074] Where N represents the number of objects, o k It is the predicted offset value. Here, k is the actual ground offset value, k is the object index, and the formula for smooth L1 loss is:
[0075]
[0076] This invention also uses smooth L1 loss to regress the box parameter loss L at the center point.b , box parameter loss L b The formula is:
[0077]
[0078] Among them, b k These are the predicted bounding box parameter values. These are the ground truth bounding box parameter values;
[0079] Directional loss L α Training is performed using binary cross-entropy loss, with orientation class loss L. α The formula is:
[0080]
[0081] Where, α i It predicts the direction class value. It is the actual orientation value of the ground.
[0082] Training was conducted in a laboratory environment using Windows 11, an AMD Ryzen 95950X 16-core Processor 3.40GHz, and an NVIDIA RTX 3090 graphics card with 24GB of VRAM. The PyTorch 1.7 deep learning framework was used for training, with 5100 images: 4000 images were used as the training and validation set (split in an 8:2 ratio), and the remaining images were used as the test set. A batch size of 4 was used, and the Adaptive Moment Estimation (ADAM) method was employed for optimization. Training consisted of 24 epochs, with 750 iterations per epoch, for a total of 1.8 × 10⁻⁶ iterations. 4 The training learning rate was set to 1.25 × 10⁻⁶. -4 The weight decay is set to 0.0001;
[0083] In step (4), the step of inputting the training set into the urediniospore detection model for training specifically includes the following steps:
[0084] (4a) Setting training parameters: The batch size is set to 4. The adaptive moment estimation method is used for optimization during training. The training process consists of 24 iterations, and the training learning rate is set to 1.25 × 10⁻⁶. -4 The weight decay is set to 0.0001;
[0085] (4b) Training of the urediniospore detection model:
[0086] The preprocessed microscopic image of urediniospores is input into the urediniospore detection model to obtain the feature map to be detected. Convolution and activation operations are performed on the feature map to be detected, and the heat map of the image is calculated to obtain the center point of each spore target in the urediniospore image. The spore target bounding box parameters and orientation class in the image are calculated through regression training. The urediniospore target detection box is determined based on the center point of the urediniospore target, the bounding box parameters, and the orientation class.
[0087] In step (3a), the frame parameter detection head module includes a boundary sensing vector, the width and height of the outer edge of the elliptical detection frame; the orientation detection head module includes a horizontal detection frame (HDB) and a rotational detection frame (RDB).
[0088] Before using the bounding box parameter detection head module, a 3×3 max-pooling layer is first applied to the output heatmap for non-maximum suppression to extract the center point of the target; then, the rotational boundary detection vector of the object is captured by learning the boundary sensing vector, such as... Figure 5 As shown in Figures (a) and (b), the boundary sensing vector comprises the top (t), right (r), bottom (b), and left (l) vectors of the object's center point, distributed across the four quadrants of a Cartesian coordinate system. All objects in any direction share the same coordinate system, which facilitates the transfer of mutual information and improves the model's generalization ability. Four vectors are used here instead of two, t and b, or r and l, to ensure greater sharing of mutual information when some local features are blurred or weak.
[0089] In practice, it has been observed that detection fails when the object is almost aligned with the x and y axes. This is because it is difficult to distinguish the type of vector at the quadrant boundaries; this situation is called the coner case. Figure 5 As shown in Figure (c). To address this issue, a direction-based detection head module is used to classify the orientation detection boxes (ODBs) into two categories: horizontal detection boxes (HDBs) and rotating detection boxes (RDBs). The rotating detection boxes (RDBs) include all orientation detection boxes except for the horizontal detection boxes (HDBs). The formula for determining the type of the orientation detection box (ODB) is as follows:
[0090]
[0091] Wherein, IOU is the degree of overlap between the directional detection box ODB and the horizontal detection box HDB.
[0092] To analyze the importance of different modules to the model, ablation experiments were conducted on the urediniospore dataset. This invention uses the CenterNet model as a benchmark and compares the performance of the model after adding several different modules. The experimental comparison results are shown in Table 1.
[0093] Because the microscopic images of urediniospores in the dataset used in this invention are small in size and have few target species, overfitting may occur. Therefore, a Dropout layer is added to the network model to reduce the duplication and redundancy between features represented by each neuron, thereby preventing overfitting. As shown in Table 1, the performance metrics of the CDRENet model improved after adding different modules. After adding the REDB module (rotated elliptical box module), the accuracy and recall reached 98.25% and 98.08%, respectively, which were 0.38% and 0.14% higher than the baseline. Furthermore, the model's performance improved after adding each different module. After adding all modules to the ResNet50 backbone network, the model's accuracy, recall, and F1 score reached the highest levels of 98.61%, 98.52%, and 98.56%, respectively.
[0094] Table 1 Comparison of the performance effects of different modules on the model
[0095]
[0096] Under the same conditions, the CDRENet model was compared with CenterNet, CornerNet, YOLO-v3, FCOS and Faster RCNN models. The experimental comparison data is shown in Table 2.
[0097] Table 2 Comparison of detection results of different models on the spore dataset
[0098]
[0099] In comparative tests with different models, the results in Table 2 show that the CDRENet model has the best performance. Compared with CenterNet, CornerNet, YOLO-v3, FCOS, and Faster RCNN, the CDRENet model achieves the best segmentation rate: an improvement of 1.03% compared to CenterNet, 1.16% compared to CornerNet, 1.64% compared to YOLO-v3, 0.97% compared to FCOS, and 0.81% compared to Faster RCNN. Compared with CenterNet, the accuracy and recall of the CDRENet model are improved by 0.74% and 0.58%, respectively. Table 2 also shows that the CDRENet model used in this invention has only 6.4% more parameters than the original CenterNet model, but its inference speed is improved by 0.5208 s / iter. The results in Table 2 show that the YOLO-v3 model has the fastest inference speed among the models studied and compared in the experiments. However, as can be seen from Table 2, its performance metrics such as precision (96.89%), recall (97.98%), and segmentation rate (83.96%) are relatively poor. Experimental data show that the F1 score of the CDRENet model is 0.61% and 0.84% higher than that of CornerNet and FCOS (also anchor-free models), respectively. Furthermore, the experimental data also show that the CornerNet model using Hourglass Net has significantly more parameters than other anchor-free models using ResNet, and due to the larger number of parameters, the inference speed is relatively slow. Finally, compared with the anchor-box-based Faster R-CNN model, the CDRENet model also shows some improvement in accuracy, recall, and F1 score. Compared with the CDRENet model, Faster R-CNN, as an anchor-based model, has larger parameters and a slower inference speed.
[0100] like Figure 6 , Figure 7 As shown, when the number of spores is small, this invention can detect all spores. When the number of spores increases to more than 50, the increased density, adhesion, and overlap of spores increase the difficulty of model recognition. However, because the detection box of the CDRENet model is a rotatable elliptical box, it fits the shape of the spores better, with less background appearing within the box, allowing for significant focus on the spore region and reducing the background area. Even with increased spore density, it can still detect all spores well. A higher spore detection segmentation rate is achieved while maintaining detection accuracy. Therefore, the elliptical box detection method of the CDRENet model used in this invention outperforms traditional methods, with a lower probability of false positives and false negatives.
[0101] In summary, to improve the detection accuracy and efficiency of wheat stripe rust urediniospores, this invention integrates a CBAM module (convolutional attention module) into the backbone structure to reduce the influence of invalid features in the environment; the DCN module (deformable convolutional module) further improves the network's recognition accuracy and detection range; and a bounding box parameter and orientation class detection head are designed to achieve the detection of rotated elliptical bounding boxes for urediniospores. Results show that this invention can effectively extract urediniospore features and detect urediniospores on the CDRENet model with high accuracy and segmentation rate, achieving an accuracy of 98.61% and a segmentation rate of 85.12%. Furthermore, compared with other methods, this invention still achieves better detection results, demonstrating its better robustness and effectiveness against dense, small targets. With the development of agriculture, timely detection of wheat diseases in farmland is an inevitable trend in the future wheat production industry, and this invention achieves higher and faster target detection.
[0102] The results of this invention provide strong technical support for the detection of wheat stripe rust. The basic principles, main features, and advantages of this invention have been shown and described above. Those skilled in the art should understand that this invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made without departing from the spirit and scope of the invention, and all such changes and modifications fall within the scope of the invention as claimed. The scope of protection claimed by this invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting wheat stripe rust fungus urediniospores using microscopic images based on a rotatable elliptical frame, characterized in that: The method includes the following steps in sequence: (1) Obtain the original microscopic images of urediniospores; (2) Preprocess the original microscopic images of urediniospores to obtain labeled data. The labeled data form a urediniospore dataset. The urediniospore dataset is divided into a training set, a validation set, and a test set in a ratio of 6:2:
2. (3) Construct a urediniospore detection model based on a rotatable elliptic frame; (4) Input the training set into the urediniospore detection model for training to obtain the trained urediniospore detection model, and use the validation set to validate the trained urediniospore detection model. (5) Input the microscopic images of urediniospores in the test set into the trained urediniospore detection model. The trained urediniospore detection model outputs urediniospore detection information, which includes the urediniospore heatmap, offset, bounding box parameters and orientation class. The wheat stripe rust fungus urediniospores in the microscopic images are detected and located through the urediniospore detection information. The construction of the urediniospore detection model refers to: using an improved ResNet50 Conv1-5 as the backbone network; sampling the feature map at the top of the backbone network and outputting a feature map that is 4 times smaller than the input image; during the upsampling process, deep and shallow layers are combined through jump connections; firstly, the deep layers are sampled to the same size as the shallow layers through bilinear interpolation; then, the upsampled feature map is refined through a 3×3 convolutional layer; then, the refined feature map is connected to the shallow layer; and finally, a 1×1 convolutional layer is used to refine the channel features. Batch normalization and ReLU activation are used in the latent layer, assuming the input RGB image is I∈R. 3×T×W Where T and W are the height and width of the RGB image, the output feature map is... Where C represents the number of channels and S represents the downsampling factor, it is then converted into four branches: heatmap offset box parameters and direction class Where K is the number of dataset categories, K=1; finally, the heatmap detection head module, offset detection head module, bounding box parameter detection head module, and orientation class detection head module are used to obtain the target's center, offset, bounding box parameter, and orientation class, respectively; Define the loss function: Define the loss function L for the urediniospore detection model. det It consists of four components: heatmap loss, offset, box parameter loss, and orientation class loss.
2. The method for detecting wheat stripe rust fungus urediniospores using a rotatable elliptical frame based on microscopic images according to claim 1, characterized in that: In step (2), the preprocessing of the original microscopic image of urediniospores to obtain labeled data specifically refers to: For the raw microscopic images of urediniospores collected, the VGG image annotator in the via 2.0 annotation tool was used to annotate the urediniospore images with elliptical frames, obtaining initial COCO format annotation data. Then, using 144 discrete points from the annotation data, the coordinates of the endpoints of the major and minor axes of the elliptical frames and the rotation angle were calculated, resulting in the final annotation data, in the following format: bbox[x a1 ,and a1 ,x a2 ,and a2 ,x b1 ,and b1 ,x b2 ,and b2 ,angel] Among them, (x a1 ,y a1 ) and (x a2 ,y a2 (x) represents the coordinates of the two ends of the major axis of the ellipse. b1 ,y b1 ) and (x b2 ,y b2 ) represents the coordinates of the two ends of the minor axis of the ellipse, and angel represents the angle of the major axis of the ellipse relative to the positive x-axis, ranging from 0° to 180°.
3. The method for detecting wheat stripe rust fungus urediniospores using microscopic images based on a rotatable elliptical frame according to claim 1, characterized in that: Step (3) specifically refers to: Loss function L det The formula is as follows: L det =L h +L o +L b +L α (1) In the formula, L h For heatmap loss, L o For offset loss, L b For the box parameter loss, L α Directional loss; The heat map loss L h The calculation formula is: Among them, h i Representing and predicting heatmap values, represents the actual ground heat map value, i represents the pixel position on the feature map, N represents the number of objects, and β and γ are hyperparameters, which take values of 2 and 4 respectively; The offset loss L o The calculation formula is: Where N represents the number of objects, o k It is the predicted offset value. Here, k is the actual ground offset value, k is the object index, and the formula for smooth L1 loss is: Box parameter loss L b The formula is: Among them, b k These are the predicted bounding box parameter values. These are the ground truth bounding box parameter values; Directional loss L α The formula is: Where, α i It predicts the direction class value. It is the actual orientation value of the ground.
4. The method for detecting wheat stripe rust fungus urediniospores using microscopic images based on a rotatable elliptical frame according to claim 1, characterized in that: In step (4), the step of inputting the training set into the urediniospore detection model for training specifically includes the following steps: (4a) Setting training parameters: The batch size is set to 4. The adaptive moment estimation method is used for optimization during training. The training process consists of 24 iterations, and the training learning rate is set to 1.25 × 10⁻⁶. -4 The weight decay is set to 0.0001; (4b) Training of the urediniospore detection model: The preprocessed microscopic image of urediniospores is input into the urediniospore detection model to obtain the feature map to be detected. Convolution and activation operations are performed on the feature map to be detected, and the heat map of the image is calculated to obtain the center point of each spore target in the urediniospore image. The spore target bounding box parameters and orientation class in the image are calculated through regression training. The urediniospore target detection box is determined based on the center point of the urediniospore target, the bounding box parameters, and the orientation class.
5. The method for detecting wheat stripe rust fungus urediniospores using a rotatable elliptical frame according to claim 3, characterized in that: In step (3a), the frame parameter detection head module includes a boundary sensing vector, the width and height of the outer edge of the elliptical detection frame; the orientation detection head module includes a horizontal detection frame (HDB) and a rotational detection frame (RDB). Before using the box parameter detection head module, a 3×3 max pooling layer is first applied to the output heatmap for non-maximum suppression to extract the center point of the target; then, the rotational boundary detection vector of the object is captured by learning the boundary sensing vector; the boundary sensing vector contains the top t, right r, bottom b, and left l vectors of the object's center point, which are distributed in the four quadrants of the Cartesian coordinate system; The orientation detection head module divides orientation detection boxes (ODBs) into two categories: horizontal detection boxes (HDBs) and rotating detection boxes (RDBs). Rotating detection boxes (RDBs) include all orientation detection boxes except for horizontal detection boxes (HDBs). The formula for determining the type of orientation detection box (ODB) is as follows: Wherein, IOU is the degree of overlap between the directional detection box ODB and the horizontal detection box HDB.
Citation Information
Patent Citations
Image target detection method and system, electronic terminal and storage medium
CN111160242A
Wheat stripe rust fungus uredospore microscopic image detection method based on improved Center Net technology
CN113869246A