Rice disease detection method based on YOLO algorithm
By improving the YOLOv11 model and introducing the CPA-Enhancer-YOLOv11-CCB model, the problems of difficulty in identifying small targets and insufficient multi-scale feature fusion in rice disease detection were solved, and high-precision disease detection was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN INST OF CHEM TECH
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for detecting rice diseases suffer from difficulties in identifying small lesions in complex field environments, low efficiency in multi-scale feature fusion, and insufficient detection accuracy due to complex background interference.
The CPA-Enhancer-YOLOv11-CCB model is adopted. By introducing the CPA-Enhancer image enhancement module, CBAM attention mechanism module, BiFPN bidirectional feature pyramid module and CARAFE content-aware upsampling module, the feature expression ability and background suppression ability are improved. The bounding box regression is optimized by combining the NWD loss function.
It significantly improves the accuracy of rice disease detection and the precision of small target localization, enabling efficient identification of multi-scale lesions in complex environments and enhancing the stability and accuracy of detection.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical fields:
[0001] This invention belongs to the field of rice disease detection technology, specifically relating to a high-precision rice disease detection method based on CPA-Enhancer-YOLOv11-CCB. Background technology:
[0002] Leaf diseases, such as bacterial leaf spot, brown spot, and leaf gall, occur frequently in rice cultivation. If these diseases are not detected and identified in a timely manner, they can not only affect the normal growth and development of rice plants and photosynthesis, but also lead to a significant drop in yield or even trigger large-scale disease outbreaks, causing substantial economic losses. Therefore, accurately identifying disease types, determining their severity and extent, and implementing targeted control measures during the production process has become a crucial aspect of ensuring rice yield and food security.
[0003] Traditional rice disease detection methods rely primarily on manual observation and experience-based judgment by agricultural technicians in the field. This approach is inefficient, labor-intensive, and highly susceptible to subjective factors, resulting in unstable diagnostic results and failing to meet the demands of modern large-scale precision agriculture. While automatic detection methods based on traditional image processing can achieve lesion identification to some extent, their feature extraction depends on manual design, lacking robustness. Furthermore, their detection accuracy is significantly insufficient when faced with variations in lighting, overlapping leaves, complex backgrounds, and diverse disease symptoms. In recent years, with the development of deep learning, Convolutional Neural Networks (CNNs) and object detection algorithms have been increasingly applied to crop disease identification. Existing methods are broadly categorized into two-stage detection methods, such as Faster R-CNN and Mask R-CNN, and single-stage detection methods, such as SSD and the YOLO series. Two-stage detection offers higher accuracy but is slower, making it difficult to meet the needs of real-time field monitoring and large-scale applications. Single-stage detection methods are faster and more suitable for deployment on mobile or embedded devices, but their accuracy remains insufficient when detecting early lesions, small lesions, and diseases with similar symptoms.
[0004] As a typical single-stage detection method, the YOLO series can achieve end-to-end detection, balancing speed and accuracy, and is widely used in rice disease detection. However, existing YOLO models still have certain limitations when facing complex rice disease scenarios, such as insufficient feature fusion and low recognition rate for small target defects. To address these limitations, this invention proposes a multi-strategy fusion approach. Based on YOLOv11s, the CPA-Enhancer-YOLOv11-CCB model is proposed. First, the CPA-Enhancer image enhancement module is introduced to improve the feature representation ability of small targets through cross-path feature interaction. The CBAM attention mechanism module is adopted to adaptively adjust weights in the channel and spatial dimensions, making the model pay more attention to defect areas and suppress background interference. The BiFPN bidirectional feature pyramid module is used to achieve efficient bidirectional multi-scale feature fusion, enhancing the model's ability to simultaneously identify large and small defects. Finally, the CARAFE content-aware upsampling module is introduced to replace the traditional upsampling method, using a content-aware mechanism to achieve detailed feature reconstruction and improve the restoration effect of defect boundaries and details. Summary of the Invention:
[0005] The purpose of this invention is to solve the problems of difficulty in identifying small target lesions, low efficiency of multi-scale feature fusion, and insufficient detection accuracy caused by complex background interference in rice disease detection under complex field environments. A high-precision rice disease detection method based on the improved YOLOv11 is proposed.
[0006] To solve the above technical problems, the specific steps are as follows:
[0007] Step 1: Construct a dataset of rice disease images containing bacterial leaf spot, brown spot, and leaf gall of rice;
[0008] Step 2: Perform image enhancement and annotation processing on the dataset, and divide it into training set, validation set and test set;
[0009] Step 3: Construct the CPA-Enhancer-YOLOv11-CCB model: Based on the YOLOv11 model, integrate an image adaptive enhancement module at its front end, fuse a bidirectional feature pyramid network in the middle of the network to replace the original feature fusion structure, replace the standard upsampling operation with a content-aware feature reorganization module, embed a dual attention mechanism module in the detection head, and use normalized Wasserstein distance as the bounding box regression loss function.
[0010] Step 4: Train the CPA-Enhancer-YOLOv11-CCB model using the training set obtained in Step 2;
[0011] Step 5: Use the validation set to monitor and optimize the model performance during training, and use the test set to evaluate the final detection performance of the model.
[0012] Step 6: Input the rice image to be detected into the trained model and output the disease category, location, and confidence level.
[0013] Furthermore, in step 2, the image enhancement employs random rotation, scaling, translation, and perspective transformation methods; the LabelImg annotation tool is used to annotate the lesion regions in the image, with the annotation format being YOLO; the annotated dataset is randomly divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0014] Furthermore, in step 3, the image adaptive enhancement module is a CPA-Enhancer module, and its workflow is as follows:
[0015] (1) The input image is first subjected to initial feature extraction through receptive field attention convolution to obtain a high-resolution feature map;
[0016] (2) Downsample the initial feature map, extract medium and low resolution features through multi-layer RFAConv, and construct a multi-scale feature pyramid;
[0017] (3) The multi-scale features are fed into the CPB module, which uses the attention mechanism to calculate the spatial and channel importance map and performs partitioning optimization on the features through independent Transformer blocks;
[0018] (4) In the CGM module, multi-scale cueing is generated by transposed convolution, which is then fused after upsampling and alignment, and finally the enhanced feature map is output.
[0019] Furthermore, in step 3, the content-aware feature reconstruction module is a CARAFE module, and its operation steps are as follows:
[0020] (1) Compress the input feature map by channel to generate a kernel prediction map and predict the upsampling kernel at each position;
[0021] (2) Normalize the generated upsampling kernel;
[0022] (3) In the content reorganization stage, the local regions of the input feature map are weighted and reorganized using the normalized upsampling kernel to generate a high-resolution, detailed output feature map.
[0023] Furthermore, in step 3, the bidirectional feature pyramid network is a BiFPN module, which optimizes feature fusion in the following way:
[0024] (1) Remove nodes with only a single input edge to simplify the network structure;
[0025] (2) Add bidirectional connection paths across scales to achieve efficient fusion of high-level semantic features and low-level detailed features;
[0026] (3) A fast normalization fusion mechanism is introduced to assign learnable weights to input features at different scales. The calculation formula is as follows:
[0027]
[0028] Where O represents the output feature, I i For the i-th input feature, w i Its corresponding weight, ò is a small constant to prevent numerical instability;
[0029] Furthermore, in step 3, the dual attention mechanism is a CBAM module, which processes features sequentially through a channel attention submodule and a spatial attention submodule:
[0030] (1) The channel attention submodule performs global average pooling and max pooling on the input features respectively, and generates channel weights through a shared multilayer perceptron and sigmoid activation function. The calculation formula is as follows:
[0031] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (2)
[0032] (2) The spatial attention submodule takes the channel attention-weighted features as input, performs average pooling and max pooling along the channel dimension, and generates spatial weights through convolutional layers and the Sigmoid activation function. The calculation formula is as follows:
[0033] M s (F)=σ(f 7×7 ([AvgPool(F);MaxPool(F)])) (3)
[0034] Where F is the input feature map, σ is the Sigmoid function, and f 7×7 It is a 7×7 convolution;
[0035] Furthermore, in step 3, the normalized Wasserstein distance loss function is used for bounding box regression. Its core lies in modeling the bounding box as a two-dimensional Gaussian distribution and measuring the similarity of the bounding boxes by calculating the Wasserstein distance between the two Gaussian distributions. The calculation formula is as follows:
[0036]
[0037] Where, N a N b These are the Gaussian distributions corresponding to the ground truth bounding boxes and the predicted bounding boxes, respectively. Let C be the square of the Wasserstein distance, and C be the normalization constant. This loss function is more robust to positional deviations of small targets.
[0038] Beneficial effects: This invention has the following effects through four innovative points:
[0039] (1) By introducing the CPA-Enhancer module and using progressive optimization guided by the thinking chain, the semantic expression ability of small-scale lesions and occluded areas is dynamically enhanced, thereby improving the model's ability to capture key information from the source.
[0040] (2) By integrating the CARAFE upsampling module with the BiFPN feature fusion network, high-fidelity reconstruction of lesion edge details and efficient fusion of multi-scale features were achieved, significantly improving the detection capability of lesions of different shapes and sizes.
[0041] (3) By embedding the CBAM dual attention mechanism, the lesion area is focused in both the channel and spatial dimensions, which effectively suppresses the interference of complex background in the field and improves the accuracy of detection.
[0042] (4) By adopting the NWD loss function, the bounding box regression problem is transformed into a distribution matching problem, which effectively solves the gradient vanishing problem caused by the failure of IoU metric in training of small target lesions and significantly improves the localization accuracy of small targets. Attached Figure Description
[0043] Figure 1 This is a diagram illustrating the overall framework of the CPA-Enhancer-YOLOv11-CCB model proposed in this invention.
[0044] Figure 2 This is a schematic diagram of the CPA-Enhancer adaptive image enhancement module in this invention;
[0045] Figure 3 This is a schematic diagram of the CARAFE content-aware feature reconstruction module in this invention;
[0046] Figure 4 This is a schematic diagram of the structure of the BiFPN bidirectional feature pyramid network in this invention;
[0047] Figure 5 This is a schematic diagram of the CBAM dual attention mechanism module in this invention;
[0048] Figure 6 Examples of before and after image enhancement for a rice disease dataset;
[0049] Figure 7 A comparison chart of the average accuracy variation curves for different models;
[0050] Figure 8 This is a diagram showing the results of a multi-scale fusion comparison test. Detailed implementation method:
[0051] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0052] The following are explanations of the English abbreviations used in this invention: CPA-Enhancer: Adaptive enhancer for thought chain cues; CARAFE: Content-aware feature reorganization; BiFPN: Bidirectional feature pyramid network; CBAM: Convolutional block attention module; NWD: Normalized Wasserstein distance; RFAConv: Receptive field attention convolution; mAP@0.5: Mean precision when the intersection-union ratio threshold is 0.5; Pre: Precision; Recall: Recall.
[0053] like Figure 1 As shown, this invention provides a high-precision rice disease detection method based on an improved YOLOv11 in complex environments, the process of which is as follows:
[0054] 1. Acquire and process rice disease datasets;
[0055] (1) Dataset Construction. The rice dataset used in the experiment was constructed by combining publicly available datasets with on-site photography of rice-growing areas in the Taihu Plain of the middle and lower reaches of the Yangtze River. Various methods were employed during photography, including front lighting, back lighting, changing angles, and adjusting distances, to enrich the diversity of the data. The images captured covered three diseases: bacterial leaf spot, brown spot, and leaf gall.
[0056] (2) Data augmentation of the acquired images. The dataset was augmented using CPA-Enhancer, employing random rotation, scaling, translation, and perspective transformation methods. The diseased areas in the dataset were labeled using LabelImg annotation software, with the annotation format being YOLO-formatted txt files. The labeled dataset was then randomly divided into training, validation, and test sets in an 8:1:1 ratio.
[0057] 2. For example Figure 1 As shown, a CPA-Enhancer-YOLOv11-CCB model based on YOLOv11 is constructed:
[0058] (1) Introduce the CPA-Enhancer module at the front end of the model to adaptively enhance the input image.
[0059] (2) Replace the nearest neighbor upsampling operation in the network with the CARAFE module.
[0060] (3) Replace the feature fusion network in the original network with the BiFPN module.
[0061] (4) Embed the CBAM attention mechanism module in the detection head.
[0062] (5) The NWD loss function is used as the bounding box regression loss.
[0063] like Figure 2 and Figure 6 As shown, the workflow of the CPA-Enhancer module introduced in this invention is as follows:
[0064] (1) The initial input disease image is used to extract features through receptive field attention convolution (RFAConv) to obtain the initial feature map.
[0065] (2) Input the initial feature map into another layer RFAConv to extract deeper contextual information and generate a high-level feature map.
[0066] (3) The initial feature map and the high-level feature map are fused to generate an enhanced feature map.
[0067] (4) Downsample the fused feature map and extract high, medium and low resolution features through multi-layer RFAConv.
[0068] (5) The multi-scale features are fed into the CPB module for optimization. In the CPB module, the input features interact with the prompts, the importance map is calculated through the attention mechanism, and the feature map is split along the channel dimension and fed into an independent Transformer block for optimization. Finally, the blocks are connected to generate the optimized features.
[0069] (6) In the CGM module, the optimized features are transformed into multi-scale cueing through transposed convolution, and then fused after upsampling and alignment to generate the final enhanced feature map and input into the target detector.
[0070] like Figure 3 As shown, the operation steps of the CARAFE module used in this invention are as follows:
[0071] (1) Channel compression is performed on the input feature map using 1×1 convolution to reduce computational complexity.
[0072] (2) Based on the compressed feature map, an upsampled kernel prediction map is generated through convolution operation, and the upsampled kernel is normalized.
[0073] (3) In the content reconstruction stage, the corresponding local regions of the input feature map are weighted and reconstructed using the generated upsampling kernel to obtain a high-resolution output feature map, thereby achieving high-fidelity reconstruction of details.
[0074] like Figure 4 As shown, the BiFPN module used in this invention optimizes multi-scale feature fusion in the following ways:
[0075] (1) Remove nodes with only a single input edge to simplify the network structure.
[0076] (2) Add horizontal connections and perform repeated feature integration to achieve bidirectional information flow from top to bottom and from bottom to top.
[0077] (3) A fast normalization fusion mechanism is introduced to assign learnable weights to input features at different scales. The calculation formula is as follows:
[0078]
[0079] Where O represents the output feature, I i For the i-th input feature, w i Its corresponding weight, ò is a small constant to prevent numerical instability;
[0080] like Figure 5 As shown, the CBAM module embedded in this invention processes features sequentially through the channel and spatial attention submodules:
[0081] (1) The channel attention submodule performs global average pooling and max pooling on the input features respectively, and generates channel weights through a shared multilayer perceptron and sigmoid activation function. The calculation formula is as follows:
[0082] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (2)
[0083] (2) The spatial attention submodule takes the channel attention-weighted features as input, performs average pooling and max pooling along the channel dimension, and generates spatial weights through convolutional layers and the Sigmoid activation function. The calculation formula is as follows:
[0084] M s (F)=σ(f 7×7 ([AvgPool(F);MaxPool(F)])) (3)
[0085] Where F is the input feature map, σ is the Sigmoid function, and f 7×7 It is a 7×7 convolution;
[0086] The NWD loss function used in this invention measures similarity by modeling the bounding boxes as a two-dimensional Gaussian distribution and calculating the normalized Wasserstein distance between the distributions. The calculation formula is as follows:
[0087]
[0088] Where, N a N b These are the Gaussian distributions corresponding to the ground truth bounding boxes and the predicted bounding boxes, respectively. Let C be the square of the Wasserstein distance, and C be the normalization constant. This loss function is more robust to positional deviations of small targets.
[0089] The CPA-Enhancer-YOLOv11-CCB model was trained using the processed rice disease dataset, with a training coefficient of 300 epochs and a batch size of 32. After training, the trained weights were saved.
[0090] The test set was used to classify and locate rice diseases. The optimal weight file obtained from training was used to perform inference verification on the test set images, and the model was applied to a real rice disease detection system.
[0091] Explanation of experimental data in this embodiment:
[0092] (1) Model comparison experiment
[0093] To comprehensively evaluate the improvement effect of CPA-Enhancer-YOLOv11-CCB, it was compared with various models such as YOLOv8, YOLOv10, ConvNeXtV2, and ResNet under the same dataset and experimental environment. The specific results are shown in Table 1.
[0094] Table 1 Comparison of different models
[0095] experimental group Pre(%) R(%) mAP@0.5 (%) YOLOv8 94.9 91.7 96.6 YOLOv10 94.25 91.9 96.8 ConvNeXtV2 95.2 92.5 97.66 ResNet 92.5 91.2 95.67 MobileNetV2 93.8 93.1 95.312 InceptionV3 91.1 90.1 95.06 Faster-RCNN 90.7 90.3 94.5 This invention 97.57 94.97 98.56
[0096] As shown in Table 1, the performance of different target detection methods varies significantly. YOLOv8 and YOLOv10, representing the YOLO series, achieve accuracies of 94.9% and 94.25%, respectively, and mAP@0.5 of 96.6% and 96.8%, respectively, demonstrating a balanced design between speed and accuracy. ConvNeXtV2, with its advanced convolutional architecture, achieves 95.2% accuracy and 97.66% mAP@0.5, exhibiting particularly outstanding detection performance. In contrast, classic networks such as ResNet, MobileNetV2, and InceptionV3 each have their own performance focuses, while Faster-RCNN, as a two-stage detector, has relatively weaker accuracy (90.7%) and recall (90.3%), indicating an efficiency bottleneck in its architecture. The method of this invention achieves comprehensive leadership with a precision of 97.57%, a recall of 94.97%, and a mAP@0.5 of 98.56% through multi-module collaborative optimization. All three core indicators are significantly better than all comparative models, verifying its superior recognition accuracy and comprehensive performance advantages in complex field environments.
[0097] like Figure 7 The training process curves for YOLOv10, YOLOv8, ConvNeXtV2, MobileNetV2, ResNet, Faster-RCNN, InceptionV3, and the present invention are shown. The light purple curve represents the method of the present invention, the light green curve represents the SwinUNETR-V2 model, the blue curve represents the YOLOv10 model, the pink curve represents the YOLOv8 model, the orange curve represents the ResNet model, the red curve represents the MobileNetV2 model, the purple curve represents the InceptionV3 Faster-RCNN model, and the blue curve represents the Faster-RCNN model.
[0098] In the accuracy comparison experiment of different models, the present invention showed the best performance in improving mAP50(B) efficiency, eventually stabilizing at the highest value of 98.56%. The accuracy of all models increased with the number of iterations. The present invention converged at 60 iterations, while ResNet converged more slowly, reaching convergence at 140 iterations and stabilizing at 95.67. The YOLO series models showed greater stability after convergence compared to other models. Experimental results demonstrate that the present invention outperforms the comparative models in both stability and final performance.
[0099] (2) Multiscale fusion experiment
[0100] To investigate the impact of multi-scale feature fusion mechanisms on target detection performance, the CPA-Enhancer-YOLO11s-CARAFE-CBAM model was used as a benchmark, and FPN, PANet, SA-FPN, ASFF, Recursive-FPN, NAS-FPN, and AC-FPN pyramids were added to the dataset for comparison. The experimental results are shown in Table 2.
[0101] Table 2 Multiscale Fusion Experiment
[0102] experimental group Pre(%) R(%) mAP@0.5 (%) FPN 89.39 89.89 90.17 PANet 93.21 90.35 92.16 SA-FPN 94.39 90.18 94.03 ASFF 93.28 89.08 95.82 Recursive-FPN 93.25 92.44 95.38 NAS-FPN 94.91 91.34 95.63 AC-FPN 94.96 91.81 96.61 BiFPN 97.50 94.90 98.56
[0103] As shown in Table 2, the basic FPN achieved an mAP@0.5 of 90.17%, PANet improved this to 92.16% through path connection optimization, and SA-FPN further improved the accuracy to 94.39%. ASFF and Recursive-FPN achieved mAP@0.5 of 95.82% and 95.38% respectively through adaptive fusion and recursive structures. NAS-FPN and HC-FPN further optimized their performance to 95.63% and 96.61% using structure search and attention mechanisms. Ultimately, the BiFPN method introduced in this invention achieved the best results in accuracy, recall, and mAP@0.5, at 97.50%, 94.90%, and 98.56% respectively, significantly outperforming other comparative mechanisms and verifying its high efficiency in multi-scale lesion feature fusion.
[0104] like Figure 8 The multi-scale fusion comparison test images shown are as follows: the first row is the original image of the rice disease dataset, the second row is the detection image without the multi-scale module, and the last row is the image of the present invention. As can be seen from the images, the average accuracy of the model of the present invention on the same dataset reached 98%, 95%, and 98%, respectively, while the detection accuracy of the model without the BiFPN module was 91%, 92%, and 91%, respectively. Furthermore, the model of the present invention also has a certain advantage in the number of detections.
[0105] (3) Model ablation experiment
[0106] To evaluate the contribution of each improved module to performance, ablation experiments were conducted. The experimental results are shown in Table 3.
[0107] Table 3 Ablation Experiment
[0108] experimental group Pre(%) R(%) mAP@0.5 (%) YOLOv11+BiFPN 89.31 89.42 90.12 CPA+YOLOv11+BiFPN 91.58 89.99 94.12 YOLOv11+CARAFE 92.12 90.74 93.45 CPA+YOLOv11+CARAFE 93.85 90.25 95.67 YOLOv11+CBAM 95.63 93.98 96.22 CPA+YOLOv11+CBAM 96.61 94.71 96.5 CPA+YOLOv11+CARAFE+CBAM 97.17 94.87 96.81 This invention 97.50 94.90 98.56
[0109] Table 3 shows the ablation experiment data. Using YOLOv11+BiFPN as the baseline, the precision was 89.31%, recall was 89.42%, and mAP@0.5 was 90.12%. After introducing CPA, the precision of CPA+YOLOv11+BiFPN improved to 91.58%, and mAP@0.5 reached 94.12%; the precision of YOLOv11+CARAFE was 92.12%, and mAP@0.5 was 93.45%. When CPA and CARAFE were combined, the precision of CPA+YOLOv11+CARAFE increased to 93.85%, and mAP@0.5 reached 95.67%, verifying the synergistic effect of feature enhancement and resolution restoration. After introducing CBAM, YOLOv11+CBAM achieved a precision of 95.63%, a recall of 93.98%, and a mAP@0.5 of 96.22%. Adding CPA further improved these three metrics to 96.61%, 94.71%, and 96.5%, respectively. When CPA, CARAFE, and CBAM were integrated, the precision of CPA+YOLOv11+CARAFE+CBAM reached 97.17%, and the mAP@0.5 was 96.81%. Ultimately, the model of this invention achieved the highest precision of 97.50%, a recall of 94.90%, and a mAP@0.5 of 98.56%, with each metric gradually improving with module addition, demonstrating the optimal performance of this invention.
[0110] The above embodiments are merely illustrative of the technical concept and features of the present invention, intended to enable those skilled in the art to understand and implement the invention, and are not intended to limit the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting rice diseases based on an improved YOLO model, characterized in that, Includes the following steps: Acquire images of the rice plants to be inspected; The rice image is input into a trained target detection model, which is built on the YOLOv11 architecture and integrates the image adaptive enhancement module CPA-Enhancer and the bidirectional feature pyramid network BiFPN. Output the category and location information of disease targets in the rice image.
2. The method according to claim 1, characterized in that, The target detection model also integrates a content-aware feature reorganization module CARAFE, which is used to perform upsampling operations on the feature map.
3. The method according to claim 1, characterized in that, The object detection model also integrates a dual attention mechanism module (CBAM) for weighted optimization of features in both channel and spatial dimensions.
4. The method according to claim 1, characterized in that, The object detection model uses the normalized Wasserstein distance (NWD) as the loss function for bounding box regression.
5. The method according to claim 1, characterized in that, The workflow of the image adaptive enhancement module CPA-Enhancer includes: The input image is subjected to multi-scale feature extraction by receptive field attention convolution RFAConv, resulting in feature maps of high, medium and low resolutions. The multi-scale feature maps are fed into the CPB module, where feature optimization is performed using an attention mechanism and independent Transformer blocks. In the CGM module, multi-scale cues are generated for the optimized features, which are then upsampled and aligned before being fused to output an enhanced feature map.
6. The method according to claim 2, characterized in that, The workflow of the content-aware feature reconstruction module CARAFE includes: Channel compression is performed on the input feature map to generate a kernel prediction map; Based on the kernel prediction graph, the upsampled kernel at each location is predicted and normalized; The input feature map is weighted and recombined using a normalized upsampling kernel to generate a high-resolution output feature map.
7. The method according to claim 1, characterized in that, The Bidirectional Feature Pyramid Network (BiFPN) performs feature fusion in the following manner: Remove nodes that have only a single input edge; Increase bidirectional connectivity paths across scales; A fast normalization fusion method is adopted, which assigns learnable weights to input features of different scales and then performs weighted fusion.
8. The method according to claim 3, characterized in that, The dual attention mechanism module CBAM is executed sequentially: Channel attention operation: The input features are subjected to global average pooling and global max pooling respectively, processed by a shared multilayer perceptron and then summed. The channel weights are generated by the Sigmoid activation function and multiplied with the input features. Spatial attention operation: For features that have been weighted by channel attention, average pooling and max pooling are performed separately in the channel dimension and the results are concatenated. Spatial weights are generated through convolutional layers and sigmoid activation function, and finally multiplied with the input features.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.