A greenhouse big shed remote sensing image rotation target detection method and system

By enhancing features through a backbone network, FPN infrastructure, and dual-path excitation calibration module, and combining ROI alignment and DBSCAN clustering optimization modules, the problems of missed detections and redundant bounding boxes in remote sensing image detection under fog conditions are solved, achieving high-precision rotating target detection.

CN121330511BActive Publication Date: 2026-05-19UNIV OF JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511693886.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-05-19
Estimated Expiration
2045-11-18

AI Technical Summary

Technical Problem

Existing remote sensing image target detection technologies have limited feature extraction capabilities in foggy environments, leading to missed detections and decreased detection accuracy. Furthermore, it is difficult to generate detection boxes that closely match real objects, especially in the detection of densely packed greenhouses where redundant boxes exist.

Method used

A backbone network is used to extract multi-scale feature maps. The features are enhanced by combining the FPN basic structure and the dual-path excitation calibration module. Rotated candidate boxes are generated by the ROI alignment module and the DBSCAN clustering optimization module. The DBSCAN clustering optimization module is used to suppress redundant boxes and improve detection accuracy.

Benefits of technology

It significantly improves detection performance in foggy environments, reduces missed detections, generates detection boxes that better fit the real boundaries, improves the positioning accuracy of the detection boxes and the ability to distinguish in dense scenes, and enhances detection accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121330511B_ABST
    Figure CN121330511B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of remote sensing image rotating target detection, and provides a greenhouse remote sensing image rotating target detection method and system. The method comprises the following steps: collecting a remote sensing image of a greenhouse area to be detected (the remote sensing image is a remote sensing image of the area to be detected for rotating target detection), which is denoted as a to-be-detected image; pre-processing the to-be-detected image, including atmospheric correction, geometric correction, image cropping and normalization processing, and denoting the processed to-be-detected image as an input image; inputting the input image into a greenhouse rotating target detection network for operation to obtain a rotating target detection result of the area to be detected. The present application can improve the accuracy of greenhouse remote sensing image detection in a fog environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image rotation target detection technology, and in particular to a method and system for detecting rotational targets in remote sensing images of greenhouses. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Greenhouses are essential facilities for modern agricultural production, and their automated monitoring and management are of great significance. Remote sensing image change detection technology has become an important means of greenhouse monitoring. However, when acquiring remote sensing images of greenhouses, many images are often foggy due to seasonal weather conditions, leading to blurred target boundaries, reduced feature discrimination, and decreased detection accuracy.

[0004] Currently, deep learning-based remote sensing image target detection technology has become a commonly used technique for greenhouse inspection. This technique typically constructs target detection networks using deep learning models such as convolutional neural networks and Transformer neural networks.

[0005] However, existing object detection networks have the following problems: First, their feature extraction capabilities are limited, and they are prone to missed detections in greenhouses under foggy conditions, resulting in insufficient robustness when extracting features from complex environments; Second, foggy environments can cause the target boundaries to become blurred, making it difficult for existing methods to generate detection boxes that fit the real objects, thus affecting detection accuracy; Third, there are a large number of redundant boxes in the detection of densely packed greenhouses, and traditional NMS methods, which rely on simple suppression based on IoU thresholds, are prone to accidentally deleting valid detection boxes or retaining too many redundant boxes.

[0006] Furthermore, remote sensing images of greenhouses often suffer from severe feature degradation due to fog interference. This includes differences in image quality caused by varying fog concentrations and types. The deep learning-based target detection techniques described above typically perform detection directly after feature extraction, which is detrimental to identifying the true target in foggy conditions and mitigating the severe feature degradation problem, thus limiting the accuracy of the model in detecting greenhouse remote sensing images. Summary of the Invention

[0007] To address the technical problems mentioned above, this invention provides a method and system for detecting rotating targets in remote sensing images of greenhouses. This invention can improve the accuracy of remote sensing image detection of greenhouses in foggy environments.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] The first aspect of this invention provides a method for detecting rotating targets in remote sensing images of a greenhouse, comprising: extracting feature maps at different preset scales based on a remote sensing image of a greenhouse area to be detected using a backbone network; generating multi-scale pyramid features using an FPN basic structure based on the feature maps at different preset scales; enhancing each pyramid feature using a dual-path excitation calibration module to obtain multiple enhanced pyramid features; inputting the multiple enhanced pyramid features into a region candidate network to generate a set of rotation candidate boxes and a first confidence score for each rotation candidate box; generating RoI features using an ROI alignment module based on the multiple enhanced pyramid features, the set of rotation candidate boxes, and the first confidence score for each rotation candidate box; obtaining the category label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box using a detection head based on the RoI features; and obtaining the detection result of the rotating target in the greenhouse area to be detected using a DBSCAN clustering optimization module based on the category label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box.

[0010] The backbone network is used to extract multi-scale feature maps from the input remote sensing image X of the greenhouse to be detected. The feature pyramid network, connected to the backbone network, is used to perform multi-scale feature fusion on the features extracted by the backbone network and to perform fog robust enhancement, resulting in enhanced pyramid features. .

[0011] Furthermore, the Feature Pyramid Network includes an FPN infrastructure connected to the backbone network. It effectively fuses features extracted from the backbone network at different scales via a top-down path, constructing a feature pyramid rich in semantic information. This module receives multiple levels of features from the backbone network as input, and through channel adjustment and upsampling operations, it transmits high-level semantic information to the lower levels, ultimately outputting feature maps at five different scales. ,in - It is obtained through feature fusion and convolution refinement. and This is achieved by further downsampling of high-level features, providing a comprehensive multi-scale feature representation for subsequent detection tasks.

[0012] The dual-path excitation calibration module, connected to the FPN infrastructure, is a feature enhancement network. It performs calibration on each pyramid level (…). This module employs the same processing architecture but executes independently. It first performs depthwise convolutional preprocessing on the input features; then, it decomposes the input features into stable paths using a separation processing mechanism. and intensity path The two branches are optimized independently; then, feature enhancement is performed along the stability path and the intensity path respectively using spatial mask generation and channel attention mechanisms. and Adaptive calibration weights are generated separately through independent noise sensing modules. and Finally, the dual-path processing results are multiplied by the adaptive weights to obtain the final intensity path features. and Finally, and Feature fusion is performed and the final output is obtained by adding it to the original input X through residual connection, which effectively enhances the discriminative ability of target features while suppressing fog noise interference.

[0013] Furthermore, the FPN infrastructure includes: a group of laterally connected layers, connected to the backbone network, containing four laterally connected convolutional layers, denoted as... Each laterally connected convolutional layer includes a 1×1 convolutional layer used to integrate the backbone network features. The number of channels is adjusted to 256; the upsampling module group is connected to the high-level feature map, and the input of each upsampling module comes from the higher-level FPN features. It contains 4 upsampling modules, denoted as... The first feature is used to upsample high-level features by a factor of 2; the second feature fusion unit group contains four additive fusion units, which use a top-down feature fusion path to add the upsampled high-level features to the laterally connected features. ; The FPN output layer contains five 3×3 convolutional layers, denoted as... ,in , and For fusion features respectively , , Perform 3×3 convolution processing; right Perform 3×3 convolution downsampling with a stride of 2 to obtain , right Perform 3×3 convolution downsampling with a stride of 2 to obtain .

[0014] Furthermore, the dual-path excitation calibration module includes: an input processing layer, connected to the FPN output layer, used to process the input features. After preliminary processing, the following results were obtained: This includes a depthwise separable convolutional layer with a kernel size of 3×3, a batch normalization layer, and a ReLU activation layer.

[0015] The feature separation unit, connected to the input processing layer, is used to divide the processed feature F into two equal parts along the channel dimension: stability path features. and intensity path features .

[0016] The stability path calibration unit, connected to the feature separation unit, first extracts the global context information of the feature map through the first spatial mask generator. Simultaneously, channel descriptors are generated using a multi-head attention mechanism through the first channel descriptor generator. Finally, the spatial mask and channel descriptor are multiplied by a matrix to obtain the calibrated feature output. .

[0017] The intensity path calibration unit, connected to the feature separation unit, has the same structure as the stability path calibration unit, but uses a different pooling method. It first extracts the global context information of the feature map through a second spatial mask generator. Simultaneously, a multi-head attention mechanism is used to generate channel descriptors through a second channel descriptor generator. Finally, the spatial mask and channel descriptor are multiplied by a matrix to obtain the calibrated feature output. .

[0018] The noise-aware weight generation module, connected to the feature separation unit, includes two independent noise-aware modules. The first noise-aware module generates weights for stable path features. Generate calibration weights The second noise perception module detects intensity path features. Generate calibration weights .

[0019] The weight application unit group, connected to the stability path calibration unit, intensity path calibration unit, and noise-aware weight generation module, includes two element-wise multiplication units, the first of which will... and Multiplying them together yields the final stable path characteristics. The second one will and Multiply to obtain the final intensity path features. .

[0020] The feature fusion layer, connected to the weight application unit group, includes a channel stitching unit for... and The concatenation is performed along the channel dimension; a 1×1 convolutional layer restores the number of feature channels after concatenation to 256; a batch normalization layer and a ReLU activation layer.

[0021] The residual connection unit, connected to the feature fusion layer and the system input interface, connects the fusion layer output to the original input. The summation yields the final output of the dual-path excitation calibration module.

[0022] Furthermore, the stability path calibration unit includes: a first spatial mask generator, connected to the feature separation unit, used to generate a spatial mask for the stability path, wherein the channel average pooling layer inside... Averaging along the channel dimension yields... 1×1 convolutional layer pairs Perform a linear projection to obtain The addition unit is used to add the pooling result to the projection result to obtain the spatial mask. The first-channel descriptor generator, connected to the feature separation unit, employs a multi-head attention mechanism, including a channel-dimensional average pooling layer for... The average of the spatial dimensions is used to obtain the input query vector and key vector. A single-channel max-pooling layer is used for... Finding the maximum value in the spatial dimension yields... Three learnable weight matrices Attention computation unit, computation channel descriptor The first calibration unit, connected to the first spatial mask generator and the first channel descriptor generator, is used to generate a spatial mask. With channel descriptor Multiplying them yields the stability path calibration characteristics. .

[0023] Furthermore, the intensity path calibration unit includes: a second spatial mask generator, connected to the feature separation unit, which includes a channel max pooling layer pair. Find the maximum value along the channel dimension to obtain A 1×1 convolutional layer pair Perform a linear projection to obtain An addition unit is used to add the pooling result to the projection result to obtain the spatial mask. The second channel descriptor generator, connected to the feature separation unit, employs the same multi-head attention mechanism as the first channel descriptor generator to obtain channel descriptors. The second calibration unit, connected to the second spatial mask generator and the second channel descriptor generator, is used to convert the spatial mask... With channel descriptor Multiplication yields the intensity path calibration feature. .

[0024] Furthermore, the noise perception module includes: a first minimum pooling unit, connected to the feature separation unit, used to process the input features. Mini-pooling is performed along the channel dimension to obtain the spatial difference map. The second minimum pooling unit, connected to the feature separation unit, is used to process the input features. Mini-pooling is performed in the spatial dimension to obtain the channel activation vector. The weight generation unit, connected to the first and second minimum pooling units, includes an element-wise multiplication operation and a sigmoid activation layer for generating calibration weights. .

[0025] The region candidate network, connected to the feature pyramid network, is used to generate rotated candidate boxes on the enhanced pyramid features. and their corresponding confidence scores The RoI alignment module, connected to the region candidate network and feature pyramid network, is used to extract features from rotated candidate boxes to obtain fixed-size RoI features. Each candidate box corresponds to one Features; the detection head, connected to the RoI alignment module, is used to classify RoI features and perform bounding box regression, outputting preliminary detection results. The DBSCAN clustering optimization module, connected to the detection head, is used to perform clustering optimization on the preliminary detection results to obtain the final rotated detection frame. and their corresponding category labels and confidence level .

[0026] Furthermore, the DBSCAN clustering optimization module includes a confidence filtering unit, comprising a threshold comparator for filtering confidence scores below a threshold. candidate boxes The feature extraction unit, connected to the confidence filtering unit, is used to extract a 6-dimensional feature vector suitable for DBSCAN clustering from the rotated candidate boxes. First, this unit modifies the center coordinates of the candidate boxes... Normalization yields Secondly, the width and height of the candidate boxes were adjusted. Normalization yields Then rotate the angle After conversion to radians, the values ​​are encoded as sine and cosine. Finally, the normalized coordinates, normalized dimensions, and angle codes are concatenated in sequence to obtain the clustering feature vector. The DBSCAN clustering unit, connected to the feature extraction unit, performs density clustering based on the feature vector f of the candidate boxes, grouping spatially similar candidate boxes into the same cluster. This unit is implemented based on the DBSCAN algorithm from the sklearn library, and includes parameters such as the neighborhood radius parameter. Minimum number of samples parameter Euclidean distance metric function, used to output cluster labels. ,in Indicates l. Intra-cluster optimization unit groups, connected to DBSCAN clustering units, cluster candidate boxes with the same labels into an index set. ( For each cluster ( The candidate boxes within a cluster are weighted and fused for optimization. First, the confidence scores of the candidate boxes within the cluster are calculated. Normalization to weights Secondly, calculate the optimized center coordinates. Next, calculate the optimized width and height. Then, complex number representations are used to handle angular periodicity; finally, the maximum confidence level within the cluster is selected. And determine category labels through majority voting Finally, the above optimization results are assembled into a complete detection result. .

[0027] The noise point processing unit, connected to the DBSCAN clustering unit, is used to process clusters with labels of... The noise point candidate boxes are traversed and all are filtered out by clustering the label vectors. For candidate bounding boxes, create a noise point index set. Based on the index set, extract the corresponding rotated bounding boxes, confidence scores, and class labels from the original data, and sort them by confidence score. Sort the noise points in descending order and retain the ones with the highest confidence. Noise points (default) ),get Filter out the remaining low-confidence noise points to reduce false detections.

[0028] The result sorting unit, connected to the intra-cluster optimization unit group and the noise point processing unit, is used to summarize all detection results and sort them by confidence level to limit the number of outputs. First, it sorts the top results from each cluster... Optimized detection results and retained noise point detection results Create as a list of test results Then The test results are sorted in descending order of confidence level. Limit the number of output detection boxes and retain the highest confidence level. (Default is 1000) results, and finally generate statistical information of the detection results for log recording or analysis.

[0029] The output assembly unit, connected to the result sorting unit, is used to sort the detection results. Assemble into a standardized final output format.

[0030] Furthermore, the feature extraction unit includes a coordinate normalization subunit, connected to the confidence filtering unit, used to normalize the center coordinates of the candidate boxes, thus normalizing the center coordinates. Normalized coordinates are obtained by dividing by the maximum value of each dimension. , range The size normalization subunit, connected to the confidence filtering unit, normalizes the width and height of the candidate boxes. Normalized size is obtained by dividing by the maximum value of each dimension. , range The angle encoding subunit, connected to the confidence filtering unit, is used to convert angles into periodically invariant trigonometric function representations, avoiding abrupt angle changes and converting rotation angles into periodic, invariant trigonometric function representations. The angle code is obtained through processing. , range The feature vector assembly subunit, connected to the coordinate normalization subunit, size normalization subunit, and angle encoding subunit, is used to sequentially concatenate the outputs of the above three units into a 6-dimensional vector, thus obtaining the clustering feature vector. .

[0031] Furthermore, the intra-cluster optimization unit group includes: a weight normalization subunit, connected to the DBSCAN clustering unit, which receives cluster... Confidence scores of all candidate boxes First, the sum of the cluster-embedded confidence scores is calculated. Then, the confidence score of each candidate box is normalized to obtain the result. The center coordinate weighted average sub-unit, connected to the weight normalization sub-unit and the DBSCAN clustering unit, receives the normalized weights. and the center coordinates of the candidate boxes within the cluster The optimized center coordinates were obtained through calculation. The size-weighted averaging subunit, connected to the weight normalization subunit and the DBSCAN clustering unit, receives the normalized weights. and the width and height of the candidate boxes within the cluster The optimized width and height were obtained through calculation. The angle-weighted averaging subunit, connected to the weight normalization subunit and the DBSCAN clustering unit, is used to process the received normalized weights. Angle of inner candidate box Optimized angle The sub-unit with the highest confidence level is connected to the DBSCAN clustering unit, and the maximum confidence level is calculated. This is used to retain the confidence level of the most reliable candidate boxes within a cluster, rather than the average. The category voting subunit, connected to the DBSCAN clustering unit, selects the category that appears most frequently as the optimized category. If multiple categories have the same frequency, the category with the smallest label value is selected to obtain the optimized category label. The resulting assembly sub-units are connected to the aforementioned sub-units to form a complete rotating detection frame. and obtain clusters Corresponding optimized detection results .

[0032] A second aspect of the present invention provides a system for detecting rotating targets in remote sensing images of greenhouses, comprising:

[0033] The backbone network is configured to extract feature maps at different preset scales based on remote sensing images of the greenhouse area to be detected.

[0034] The FPN infrastructure is configured to generate multi-scale pyramid features based on feature maps of different preset scales.

[0035] The dual-path excitation calibration module is configured to enhance each pyramid feature to obtain multiple enhanced pyramid features.

[0036] The region candidate network is configured to: input multiple enhanced pyramid features into the region candidate network to generate a set of rotated candidate boxes and a first confidence score for each rotated candidate box;

[0037] The ROI alignment module is configured to generate RoI features based on multiple enhanced pyramid features, a set of rotated candidate boxes, and the first confidence score of each rotated candidate box.

[0038] The detection head is configured to: based on RoI features, use the detection head to obtain the class label, second confidence score and corrected rotation candidate box parameters for each rotation candidate box;

[0039] The DBSCAN clustering optimization module is configured to obtain the detection results of rotating targets in the greenhouse area to be detected based on the category label, second confidence score and corrected rotating candidate box parameters of each rotating candidate box.

[0040] A third aspect of the present invention provides a computer device comprising:

[0041] A processor, adapted to execute computer programs;

[0042] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the method for detecting rotating targets in remote sensing images of greenhouses as described in the first aspect above.

[0043] Compared with the prior art, the beneficial effects of the present invention are:

[0044] This invention effectively improves the detection performance of remote sensing images of greenhouses in foggy environments by introducing innovative designs such as a dual-path excitation calibration module and DBSCAN clustering optimization. The dual-path excitation calibration module significantly improves the feature degradation problem caused by fog and haze by enhancing feature representation capabilities and focusing on key information, thereby enhancing the model's robustness under complex fog concentrations and types and reducing missed detections. Simultaneously, addressing the challenges of blurred and densely packed target boundaries, this method generates detection boxes that better fit the real boundaries through candidate box rotation and DBSCAN clustering optimization, effectively suppressing redundant boxes and improving the localization accuracy and discrimination ability in dense scenes. Overall, this invention significantly improves the detection accuracy and reliability of greenhouses in remote sensing images under foggy conditions while maintaining high detection speed, providing strong support for automated monitoring and management. Attached Figure Description

[0045] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0046] Figure 1 This is a flowchart of yet another embodiment of the greenhouse remote sensing image rotation target detection method shown in the embodiments of the present invention;

[0047] Figure 2 This is a schematic block diagram of one embodiment of the remote sensing image rotation target detection network shown in the embodiments of the present invention;

[0048] Figure 3 This is a schematic block diagram of one embodiment of the dual-path excitation calibration module shown in the embodiments of the present invention;

[0049] Figure 4 This is a schematic block diagram of one embodiment of the DBSCAN clustering optimization module shown in this invention.

[0050] Figure 5 This is a schematic block diagram of another embodiment of the remote sensing image rotation target detection network shown in the embodiments of the present invention;

[0051] Figure 6 This is a schematic block diagram of one embodiment of the greenhouse remote sensing image rotating target detection system shown in the embodiments of the present invention;

[0052] Figure 7 This is a preprocessed remote sensing image of a greenhouse with fog, as shown in an embodiment of the present invention;

[0053] Figure 8 This is an embodiment of the present invention showing that... Figure 7 The preprocessed remote sensing image of the greenhouse shown is compared with the input. Figure 2 The diagram shows the image classification of the corresponding detection area calculated by the remote sensing image rotation target detection network. Detailed Implementation

[0054] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0055] Figure 1 This is a flowchart illustrating a method for detecting rotating targets in remote sensing images of a greenhouse, as shown in an embodiment of the present invention; see reference. Figure 1 The method includes:

[0056] Collect remote sensing images of the greenhouse area to be detected (these remote sensing images are used for rotating target detection in the area to be detected), and record them as the images to be detected;

[0057] The image to be detected is preprocessed, including atmospheric correction, geometric correction, image cropping and normalization, and the processed image to be detected is recorded as the input image;

[0058] The input image is fed into a greenhouse rotating target detection network for processing to obtain the rotating target detection result of the area to be detected.

[0059] Understandably, the detection area can be the entire greenhouse area or a specific sub-region of it. The input image may contain fog noise, which can blur target boundaries, reduce feature discrimination, and decrease detection accuracy. The detection network of this invention can robustly detect rotating targets such as greenhouses under foggy conditions. The obtained rotating target detection results for the detection area include the rotation bounding box (represented by center coordinates, width, height, and rotation angle) of each detected rotating target, its category label, and confidence score, demonstrating the position, orientation, and category information of all detected rotating targets such as greenhouses in the input image.

[0060] Figure 2 This is a schematic block diagram of one embodiment of the remote sensing image rotation target detection network shown in this invention; as follows: Figure 2As shown, the remote sensing image rotation target detection network includes: a backbone network, a feature pyramid network basic structure, a dual-path excitation calibration module, a region candidate network, a ROI alignment module, a detection head, and a DBSCAN clustering optimization module. The dual-path excitation calibration module includes: an input processing layer, a feature separation unit, a stability path calibration unit, an intensity path calibration unit, a weight application unit group, a feature fusion layer and a residual connection layer, and a noise-aware weight generation module. The DBSCAN clustering optimization module includes: a confidence filtering unit, a feature extraction unit, a DBSCAN clustering unit, an intra-cluster optimization unit, a noise point processing unit, a result assembly unit, a result sorting unit, and an output assembly unit.

[0061] Specifically, the backbone network is used to extract feature maps at four different preset scales from the input remote sensing image X of the greenhouse area to be detected. ,in Remote sensing images extracted by the backbone network The Layer feature map, .

[0062] In this embodiment, the backbone network adopts a ResNet-50 architecture and is initialized using ImageNet pre-trained weights to extract the input greenhouse remote sensing image. Multiscale feature maps Each feature map Each includes its corresponding remote sensing image. Semantic information at different levels.

[0063] Specifically, , , , The spatial scale decreases sequentially, while the number of channels increases sequentially. These are deep features, containing high-level semantic information but with low spatial resolution; and It is a mid-level feature that balances semantic and spatial information; This is a shallow feature layer, preserving more spatial detail information. In practical implementation, if the input image size is... ,but: The spatial size is 1 / 4 of the input image, and the number of channels is 256; The spatial size is 1 / 8 of the input image, and the number of channels is 512; The spatial size is 1 / 16 of the input image, and the number of channels is 1024; The spatial size is 1 / 32 of the input image, and the number of channels is 2048.

[0064] In some embodiments, the FPN infrastructure is connected to the backbone network for processing multi-scale feature maps extracted by the backbone network. Top-down feature fusion and lateral connections are performed to generate pyramid features with strong semantic information and multiple scales. .

[0065] FPN first uses four 1×1 horizontally connected convolutional layers. Features of different levels of the backbone network The number of channels was uniformly adjusted to 256, resulting in horizontal connectivity features. ,in Will The 256 channels remain as 256-channel output. , Will The 512-channel output is reduced to 256 channels. , Will The 1024-channel output is reduced to 256 channels. , Will The 2048 channels were reduced to 256 channels for output. .

[0066] Next, a top-down feature fusion strategy is adopted, starting from the highest-level features. Directly equal to Then, through nearest neighbor interpolation pairs... Perform 2x spatial upsampling, and Element-by-element addition Similarly, for After 2x upsampling and Adding them together gives Finally, for After 2x upsampling and Adding them together gives This top-down path propagates strong semantic information from higher levels to lower-level features.

[0067] The fused features are further processed through five 3×3 convolutional layers: , and To each , and Perform 3×3 convolutions (stride 1, padding 1) to eliminate aliasing caused by upsampling and enhance feature representation; right Perform 3×3 convolution downsampling with a stride of 2 to generate a generator with a larger receptive field. ; right Perform 3×3 convolution downsampling with a stride of 2 to generate the generator with the largest receptive field. .

[0068] The final output pyramid feature Both have 256 channels but different spatial scales, corresponding to the stride of the input image. pixels, of which It retains more spatial details, making it suitable for detecting small targets. It has the largest receptive field and is suitable for detecting large targets, while , , This achieves a balance between spatial resolution and semantic information. This multi-scale feature representation enables the network to effectively detect greenhouse targets of different sizes. At the same time, each layer integrates semantic information from higher layers and localization information from lower layers, providing a high-quality feature foundation for subsequent rotating target detection.

[0069] In this invention, the FPN infrastructure effectively fuses the multi-scale features extracted by the backbone network through a top-down path and lateral connections, so that each pyramid level contains rich semantic information and appropriate spatial resolution, providing high-quality feature representation for subsequent greenhouse rotating target detection.

[0070] In some embodiments, the dual-path excitation calibration module is connected to the FPN infrastructure and has an independent output mechanism. After processing each layer (P3-P7) independently, the dual-path excitation calibration module does not perform cross-layer feature fusion; instead, it independently outputs enhanced features. Each layer has independent parameters (does not share weights), and the output of each layer maintains its original size. Both the input and output channels are 256. The final output of the dual-path excitation calibration module is the enhanced pyramid feature. This design enables the network to maintain sensitivity to target features in foggy environments while suppressing fog noise interference, thus improving the robustness of rotating target detection. Since the feature processing for each pyramid layer is identical, only one layer will be described below.

[0071] The input processing layer is connected to the FPN infrastructure and performs preliminary processing on the 256-channel feature maps from the FPN, preparing for subsequent dual-path separation and calibration. The input processing layer processes the input features... Each channel undergoes an independent 3×3 convolution operation, meaning the k-th output channel is obtained by convolving only the k-th input channel, resulting in the convolution output. Then to Each channel is normalized to obtain a normalized output. Finally, for Perform nonlinear activation to obtain the final first output feature. This feature retains the same characteristics as the input features. With the same space size and number of channels, , , The following is how to obtain it:

[0072]

[0073]

[0074]

[0075] in, It is the first A convolutional kernel with 1 channel, Indicates spatial location; It is the first The average of each channel, It is the first The variance of each channel, and These are learnable scaling and translation parameters. It is a small constant to prevent division by zero (usually 1). ). In some embodiments, the feature separation unit is connected to the input processing layer and is used to separate the processed 256-channel features. The feature branch is divided into two 128-channel branches along the channel dimension. The feature separation unit uses the torch.split function to split the feature F along the channel dimension, with the first 128 channels... Channels are assigned to stable path features Used to capture global context information; the last 128 The channels are assigned to the intensity path features This is used to extract salient features, and this separation allows the two paths to focus on different types of feature representations.

[0076] In some embodiments, the stability path calibration unit is connected to the feature separation unit and is used to perform stability path feature analysis. Perform joint space-channel calibration. For example... Figure 3 As shown, this unit first generates a first spatial mask through a first spatial mask generator. Next, channel attention is generated through the first channel descriptor generator, and the first channel descriptor is calculated. Finally, the first calibration unit performs element-wise multiplication via broadcast. By combining the first spatial mask and the first channel descriptor, the stability path calibration feature is obtained. .

[0077] Understandably, the first spatial mask generator uses a channel average pooling layer to... The average was obtained by averaging across 128 channel dimensions. Meanwhile, 1×1 convolutional layers Performing linear projection to map 128 channels to 1 channel yields... The two are added together by the first addition unit to obtain the first spatial mask. , and The following is how to obtain it:

[0078]

[0079]

[0080] Understandably, the first-channel dimension average pooling layer in the first-channel descriptor generator... In spatial dimension Calculate the average to get The first channel dimension max pooling layer Finding the maximum value in the spatial dimension yields... Then, query vectors are generated through the Query generation unit, Key generation unit, and Value generation unit, respectively. Key vector Sum value vector ,in It is a learnable weight matrix, and finally the attention score is calculated and the first channel descriptor is obtained through Sigmoid activation. . , and The following is how to obtain it:

[0081] Where k represents the channel index.

[0082]

[0083] in, This represents the Sigmoid activation function. This is the scaling factor.

[0084] The intensity path calibration unit is connected to the feature separation unit. Its structure is parallel to the stability path calibration unit but uses a different pooling strategy, and it is used to analyze intensity path features. Perform calibration to highlight salient information. For example... Figure 3 As shown, the second spatial mask generator of this unit uses a channel max pooling layer. Find the maximum value in the channel dimension. Combined with 1×1 convolutional projection The second space mask is then obtained through addition. The second-channel descriptor generator uses the same multi-head attention mechanism to process the input. Spatial pooling features are used to generate a second channel descriptor. The second calibration unit passes through Obtain intensity path calibration features .

[0085] In some embodiments, the noise-aware weight generation module is connected to the feature separation unit and includes two independent noise-aware modules for generating adaptive calibration weights. The first noise-aware module is used to receive stable path features. Spatial difference map extracted by channel minimum pooling Spatial minimum pooling extraction channel excitation Then, the first calibration weights are generated through Sigmoid activation. The second noise perception module detects intensity path features. Perform the same operation to generate the second calibration weights. These weights are used to sense and suppress fog noise interference.

[0086] Specifically, the noise perception module is an adaptive feature calibration mechanism specifically designed to perceive and suppress fog noise interference in greenhouse inspection. Its working principle involves performing channel-dimensional minimum pooling on the input features (extracting spatial difference maps). Mini-pooling in spatial dimension (extracting channel activation vectors) Adaptive calibration weights are generated by multiplying the two minimum pooling results and then activating them with a Sigmoid function. This weight can identify noisy areas in the image affected by fog and assign them lower weight values, while assigning higher weight values ​​to clear areas. When these weights are multiplied element-wise with the path calibration features, the feature response of the noisy areas is effectively suppressed while the features of the clear areas are enhanced, thus enabling the network to accurately detect greenhouse targets even in the presence of environmental noise such as fog and haze.

[0087] In some embodiments, the weight application unit group is connected to the noise-aware weight generation module and two path calibration units, and includes two element-wise multiplication units. The first element-wise multiplication unit applies the stability path calibration features. With corresponding weights Multiplying these together yields the final stable path features after noise suppression. The second element-wise multiplication unit calibrates the intensity path. With corresponding weights Multiply to obtain the final intensity path features. Through this weighting mechanism, the characteristic response of noisy regions is suppressed while the characteristics of clear regions are enhanced.

[0088] The feature fusion layer is connected to the weight application unit group to recombine the features from the two paths into a unified 256-channel representation. This layer first uses a channel concatenation unit to... and Connecting along the channel dimension (dim=1) yields a 256-channel splicing feature. Then, a 1×1 convolutional layer is used to linearly transform the concatenated features, maintaining 256 output channels but recombining the feature representations; next, a batch normalization layer is applied to stabilize the feature distribution; finally, a ReLU activation layer is used to introduce non-linearity to obtain the fused features. .

[0089] The residual connection unit is connected to the feature fusion layer and the original input. Through skip connections, the fused features are added to the original input features to obtain the final output of the dual-path excitation calibration module. This residual connection not only facilitates backpropagation of gradients and prevents the vanishing gradient problem during training, but also preserves useful information in the original features. This allows the dual-path activation calibration module to selectively enhance features rather than completely replace them. When the input image is clear and fog-free, the network can directly transmit the original features through the residual connection. However, when fog interference exists, the enhancement effect of dual-path activation calibration is more pronounced. This design makes the network adaptive, enabling it to automatically adjust the degree of feature enhancement according to the quality of the input image.

[0090] The region candidate network is connected to the feature pyramid network to enhance the pyramid features. This network rapidly generates rotated candidate boxes. It includes a 3×3 convolutional layer (256 channels), a ReLU activation layer, a classification branch, a regression branch, an anchor box generator, and a candidate box decoder, ultimately outputting a set of rotated candidate boxes. and its confidence score .

[0091] Specifically, a 3×3 convolutional layer (256 channels) and a ReLU activation layer are used to extract features from each pyramid feature; the classification branch outputs the foreground / background probabilities of each anchor box through a 1×1 convolutional layer; and the regression branch outputs the five rotation box regression parameters of each anchor box through a 1×1 convolutional layer. Anchor frame generator, which generates predefined rotating anchor frames (base scale) at each pyramid level. Aspect Ratio Step length The candidate box decoder is used to decode regression parameters into rotated candidate box coordinates.

[0092] In some embodiments, the RoI alignment module, connected to the region candidate network and the feature pyramid network, is used to align features from the pyramid feature map. The module extracts fixed-size features corresponding to the rotated candidate boxes. It includes a hierarchical allocation unit, a rotation coordinate mapping unit, a bilinear interpolation sampling unit, and a feature pooling unit.

[0093] Specifically, the hierarchical allocation unit is based on the area of ​​the candidate box. Calculate the target pyramid level (in correspond The pyramid layer assigns candidate boxes of different scales to the most suitable pyramid level; the rotation coordinate mapping unit rotates the image coordinates of the candidate boxes. Mapped to the corresponding feature map coordinate system, the mapping ratio is... ( (The step size corresponds to the level). The bilinear interpolation sampling unit performs unquantized sampling of features within the rotated candidate box. By performing an affine transformation on the four corner points of the rotated candidate box, bilinear interpolation sampling is performed on the feature map, avoiding the quantization error of traditional RoI Pooling. The feature pooling unit pools the sampled features into a fixed-size pool. Output RoI features (in (This refers to the batch size).

[0094] In some embodiments, the detection head is connected to an RoI alignment module for fine-grained classification and rotation box parameter refinement of fixed-size RoI features, outputting preliminary detection results. This module includes an RoI feature flattening layer, a shared fully connected layer group, a classification branch fully connected layer, and a regression branch fully connected layer, ultimately outputting the class label for each rotated candidate box. ( (excluding background categories) confidence score And the refined parameters of the rotating frame.

[0095] Specifically, the RoI feature flattening layer aligns the output 3D features of the RoI. Flattened into a one-dimensional feature vector ( ).

[0096] Specifically, the shared fully connected layer group includes two fully connected layers for feature transformation and high-level semantic extraction. The first fully connected layer maps the 12544-dimensional features to 1024 dimensions and performs ReLU activation to obtain the second output features. The second fully connected layer maintains 1024 dimensions and is activated again by ReLU to obtain the third output feature. . , The following is how to obtain it:

[0097]

[0098]

[0099] in, , .

[0100] Specifically, the fully connected layer in the classification branch maps the 1024-dimensional features to... Dimensions (including the background class), output the probability score for each category. , The acquisition is as follows:

[0101]

[0102] in, ), This indicates that the candidate box belongs to the first... The probability of a class.

[0103] Specifically, the fully connected layer in the regression branch maps the 1024-dimensional features to 5 dimensions, outputting the refined parameters of the rotated box. These parameters are used to fine-tune the regional candidate network.

[0104]

[0105] In some embodiments, the confidence filtering unit is connected to the detection head output and is used to filter candidate boxes with confidence scores below a threshold, reducing the computational load of subsequent clustering and improving detection quality. This unit receives the confidence scores of all candidate boxes. For each candidate box, a confidence score is determined, and boxes that meet the following criteria are retained. The candidate boxes are processed, and low-confidence candidate boxes are filtered out to obtain the filtered candidate box set. And its corresponding confidence level and label.

[0106] In some embodiments, the feature extraction unit is connected to the confidence filtering unit for extracting features from the rotated candidate box. Extract a 6-dimensional normalized feature vector suitable for DBSCAN clustering. For example... Figure 4 As shown, the feature extraction unit includes a coordinate normalization subunit, a size normalization subunit, an angle encoding subunit, and a feature connection and assembly subunit, which are executed sequentially.

[0107] Specifically, the coordinate normalization subunit receives the center coordinates of the candidate box. The center coordinates are normalized to obtain the normalized center coordinates. . The following is how to obtain it:

[0108]

[0109] in, and These are the maximum values ​​of the center coordinates of all candidate boxes in the x and y directions, respectively.

[0110] Specifically, the size-normalized subunit receives the candidate frame width and height. Normalize the width and height to obtain normalized dimensions. . The following is how to obtain it:

[0111]

[0112] in, and These are the maximum values ​​of the width and height of all candidate boxes, respectively.

[0113] Specifically, the angle encoding subunit receives the rotation angle. First convert the angle to radians. Then encoded as sine and cosine values. , This trigonometric function encoding method can effectively handle the periodicity of angles, avoiding numerical abrupt changes between 179° and -179°, thus obtaining an angle code. .

[0114] The feature concatenation and assembly subunit is connected to the coordinate normalization subunit, the size normalization subunit, and the angle encoding subunit, and the above features are sequentially concatenated to assemble a complete 6-dimensional feature vector. , to obtain cluster feature vectors .

[0115] In some embodiments, the DBSCAN clustering unit is connected to the feature extraction unit, and firstly, the received feature vector set... ( The number of candidate boxes after filtering is stacked row-wise to construct a feature matrix. , of which Behavior No. The feature vectors of the candidate boxes; then for each sample point in the feature matrix. Calculate its All samples within a neighborhood, the neighborhood is defined as... And record the number of neighborhood samples for each sample. Then, based on the judgment conditions... Identify the core points; if the conditions are met... Let be the core point, and let the set of core points be denoted as . Then, a degree-first search strategy is adopted to search for each unvisited core point. Create new cluster And Add it, and then add all its neighboring points to the candidate queue. For each point in the queue If it is a core point and has not been visited, add its neighboring points to the queue; if it has not been assigned to any cluster, add it to the current cluster. This process is repeated until the queue is empty, with cluster numbers incrementing from 0; simultaneously, all sample points not assigned to any cluster are marked as noise points, with the following labels: These are typically isolated candidate boxes or boundary points that do not meet the density requirements; finally, a final clustering label is assigned to each sample in the feature matrix, generating a label vector. ,in , Indicates noise points. ( ) indicates that it belongs to the first Clusters.

[0116] In some embodiments, the intra-cluster optimization unit is connected to the DBSCAN clustering unit and is used to optimize each cluster. ( Candidate boxes within a cluster are weighted and optimized through fusion, and the optimal representative box for each cluster is generated by a confidence-weighted average. For example... Figure 4 As shown, this includes sub-units for weight normalization, center coordinate weighted average, size weighted average, angle weighted average, maximum confidence score, category voting, and result assembly. The final result is a cluster. The corresponding optimized detection results.

[0117] Specifically, the weight normalization subunit is connected to the DBSCAN clustering unit and receives... Confidence scores of all candidate boxes Calculate the sum of built-in confidence scores for each cluster. Then, the confidence score of each candidate box is normalized. Ensure that the weight sum is 1, that is Candidate boxes with high confidence receive greater weight.

[0118] Specifically, the center coordinate weighted average sub-unit is connected to the weight normalization sub-unit and the DBSCAN clustering unit. This unit calculates the weighted average of the x-coordinate. Weighted average of y-coordinate The optimized center coordinates are obtained. .

[0119] Specifically, the size-weighted averaging sub-unit is connected to the weight normalization sub-unit and the DBSCAN clustering unit, and this unit calculates the width-weighted average. and highly weighted average The optimized width and height are obtained. .

[0120] Specifically, the angle-weighted average sub-unit is connected to the weight normalization sub-unit and the DBSCAN clustering unit. This unit first converts the angle into radians. Then calculate the weighted average of the sinusoidal components. Weighted average of sum and cosine components Finally, the angle is recovered using the arctangent function. And convert to degree This complex number representation method can effectively handle the periodicity of angles; for example, the average of 179° and -179° should be 180° instead of 0°. The final optimized angle is obtained. (Unit: degree).

[0121] Specifically, the confidence maximum subunit is connected to the DBSCAN clustering unit and receives the confidence scores of all candidate boxes within the cluster. This unit selects the candidate box with the highest confidence level within the cluster as the optimized confidence level. Using the maximum value instead of the average value preserves the confidence of the most reliable candidate boxes within the cluster. The final optimized confidence score is obtained. .

[0122] Specifically, the category voting subunit is connected to the DBSCAN clustering unit and receives the category labels of all candidate boxes within the cluster. This unit counts the frequency of each category within a cluster, selecting the category with the highest frequency as the optimized category. If multiple categories have the same frequency, the category with the smallest label value is selected. Mathematically, this is expressed as... This majority voting mechanism can reduce the impact of individual misclassified candidate boxes, ultimately resulting in optimized category labels. .

[0123] Specifically, the result assembly subunit is connected to the center coordinate weighted average subunit, the size weighted average subunit, the angle weighted average subunit, the confidence maximum subunit, and the category voting subunit, and receives data respectively. , , , and This unit assembles the optimization results of the above sub-units in sequence to form the optimized rotating candidate box. and complete test results .

[0124] The noise point processing unit is connected to the DBSCAN clustering unit and is used to process clusters with the following labels: The noise point candidate boxes failed to be assigned to any cluster. The unit iterates through the received clustering label vectors. Identify all tags as The candidate box index is used to generate a noise point mask. Then, the noise points are sorted in descending order of confidence level, and the candidate boxes of the noise points with the highest confidence levels are selected and retained. (Usually, the top 10% or the noise points with a confidence level greater than a certain threshold are retained); finally, special markers are added to the retained noise points to facilitate subsequent analysis and visualization.

[0125] The result sorting unit is connected to the cluster optimization unit group and the noise point processing unit. It is used to summarize all optimized detection results and perform sorting and quantity restrictions. This unit receives the optimized detection results from all clusters. The results of noise point detection and retention are merged into a unified detection result list, based on confidence scores. Sort all detection boxes in descending order and use... Get the sorted index; retain the first few elements after sorting. (Default value is 1000) detection boxes, filtering out the lowest-ranking, low-confidence detection boxes. If the total number of detection results is less than... Then all will be retained.

[0126] The output assembly unit is connected to the result sorting unit and is used to assemble the optimized detection results into a standard output format. This unit converts the detection results into a standard output format, including the rotated frame coordinate tensor. Confidence tensor and category label tensor ,in The number of detection frames to be retained in the end.

[0127] As an illustrative embodiment of the present invention, remote sensing images , Spatial registration includes: for , The original image is first subjected to atmospheric correction, geometric correction and radiometric correction, and then spatial registration is performed.

[0128] As an illustrative embodiment of the present invention, the method for acquiring the remote sensing image rotation target detection network includes:

[0129] A training set is constructed; the constructed network model is initialized to obtain the initial network model of the greenhouse rotating target detection network; in the initial network model, the model parameters of the backbone network are initialized using ResNet-50 weights pre-trained on ImageNet, and the model parameters of other layers are initialized using the Kaiming normal distribution; during training, the data in the training set is input into the initial network model for iterative training. In each iteration, the predicted output is obtained through forward propagation, and then the loss function is used to calculate the loss between the predicted output and its corresponding true label. Then, backpropagation is performed based on the calculated loss, and then the gradient descent algorithm is used to update the parameters in the network model during backpropagation until the loss function converges or the training reaches the preset number of iterations, thus obtaining the greenhouse rotating target detection network.

[0130] Understandably, building the network model for the greenhouse rotating target detection network includes: building the aforementioned backbone network, building the aforementioned feature pyramid network, building the aforementioned region candidate network, building the aforementioned RoI alignment module, building the aforementioned detection head, and building the aforementioned DBSCAN clustering optimization module. The pre-trained weights of ResNet-50 are the ResNet-50 pre-trained weights provided on the official ImageNet website.

[0131] For example, the steps for constructing the training set include steps S1 to S3. Step S1: Select remote sensing images of the greenhouse area, download the data, and obtain the original remote sensing images.

[0132] Understandably, the greenhouse area mentioned in step S1 can be any greenhouse distribution area.

[0133] In practice, to increase the accuracy of the greenhouse rotating target detection network, a training set can be constructed based on the remote sensing images of the greenhouse area where the area to be detected is located to train a greenhouse rotating target detection network specifically for detecting the greenhouse area where the area to be detected is located. Specifically, remote sensing images of the greenhouse area where the area to be detected is located, acquired by high-resolution satellites, can be downloaded as the original remote sensing images.

[0134] In practice, the area to be detected can be specified using latitude and longitude coordinates and place names.

[0135] Step S2: Preprocess the original remote sensing image and crop the preprocessed image to obtain several remote sensing images. Preprocessing includes atmospheric correction, geometric correction, and radiometric correction to obtain the preprocessed image. Optionally, the cropping step size is 1024 pixels, and the size of the cropped remote sensing image is 1024 pixels × 1024 pixels.

[0136] Step S3: For each cropped remote sensing image, label the rotating greenhouse target within it to obtain the corresponding rotating target label (including rotation box coordinates and category label) for each cropped remote sensing image; combine each cropped remote sensing image and its corresponding rotating target label as a sample, and aggregate all samples to obtain the training set. Preferably, data augmentation can be performed on the training set, and then the augmented training set can be used to train the network model of the greenhouse rotating target detection network constructed above. Data augmentation of the training set includes, but is not limited to: image augmentation by randomly flipping horizontally, randomly flipping vertically, randomly flipping diagonally, randomly rotating (angle range [-15°, 15°]), and scaling (scaling range [0.8, 1.2]). Using image augmentation to augment the training set yields richer training data for subsequent model training.

[0137] As a preferred option, such as Figure 5 As shown, the backbone network uses a ResNet-50 network to extract multi-scale feature maps {C2, C3, C4, C5} from the input remote sensing image of the greenhouse to be detected.

[0138] As a preferred option, such as Figure 5 As shown, the Feature Pyramid Network includes a standard FPN structure and a noise-aware enhancement module, which is used to perform multi-scale feature fusion on the features extracted by the backbone network, and performs fog noise robust enhancement through a dual-path excitation calibration module to obtain the enhanced pyramid features. .

[0139] Optionally, the FPN basic structure is implemented using four 1×1 convolutional layers, four upsampling modules, and five 3×3 convolutional layers, denoted as C1_2, C1_3, C1_4, C1_5, Upsample_2, Upsample_3, Upsample_4, Upsample_5, C3_3, C3_4, C3_5, C3_6, and C3_7, respectively. It should be noted that P2 is not used in the network structure, therefore P2 is not mentioned in this paper.

[0140] Optionally, the dual-path excitation calibration module comprises an input processing layer, a feature separation unit, a stability path calibration unit, an intensity path calibration unit, a noise-aware weight generation module, a weight application unit group, a feature fusion layer, and a residual connection unit. The dual-path excitation calibration module processes each pyramid feature independently, without cross-level feature fusion, and instead outputs enhanced features independently for each layer.

[0141] Optionally, the input processing layer is implemented using a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation layer. Figure 5 In this context, they are denoted as DC3_1, BN, and ReLU, respectively. DC3_1 is used to extract local features within the spatial neighborhood, BN is used to normalize the features output by the convolutional layer along the batch dimension, and ReLU uses a non-linear activation function. This enables the network to learn and express complex nonlinear mapping relationships.

[0142] Optionally, the feature separation unit uses the torch.split function to divide the feature F into... and This unit is in Figure 5 The term is denoted as Split, and Split is used to divide the processed features. It is divided into two parts along the channel dimension.

[0143] Optionally, the stability path calibration unit includes a first spatial mask generator, a first channel descriptor generator, and a first calibration unit. The first spatial mask generator is implemented by a channel-level average pooling layer, a 1×1 convolutional layer, and an addition unit, denoted as AvePool_1, C1_6, and Add, respectively. The first channel descriptor generator is implemented by a channel-level average pooling layer, a channel-level max pooling layer, a Query generation unit, a Key generation unit, a Value generation unit, and a Sigmoid activation function, denoted as AvePool_2, MaxPool_1, Query, Key, Value, and Sigmoid, respectively. The first calibration unit is used to multiply the spatial mask by the channel descriptor, as shown in the figure. .

[0144] Optionally, AvePool_1 pairs Average pooling is performed along the channel dimension to obtain the pooled feature map. C1_6 pairs Perform linear projection to obtain the projected feature map. Add is used to add and By adding elements one by one, we obtain the stable path space mask. AvePool_2 is used for... In spatial dimension Average pooling is used to obtain the average eigenvector. MaxPool_1 is used for... In spatial dimension Max pooling is used to obtain the largest eigenvector. Query, Key, and Value are used to calculate the query vector, key vector, and value vectors Q, K, and V, respectively. The Sigmoid function is used to calculate the attention score and obtain the channel descriptor. ;at last .

[0145] Optionally, the stable path calibration unit has the same structure as the stable path calibration unit, but the pooling method is different. This module includes a second spatial mask generator, a second spatial mask generator, and a second calibration unit. The second spatial mask generator is implemented by a channel max pooling layer, a 1×1 convolutional layer, and an addition unit, denoted as MaxPool_2, C1_7, and Add, respectively; the other two units are the same as in the stable path calibration unit. MaxPool_2 is used for... Max pooling is performed along the channel dimension to obtain the pooled feature map. C1_7 is used for Perform linear projection to obtain the projected feature map. Add is used to add and By adding elements one by one, we obtain the intensity path space mask. .

[0146] Optionally, the noise-aware weight generation module includes two independent noise-aware generation modules. Each noise-aware generation module is implemented using a channel-dimensional minimum pooling layer, a spatial-dimensional minimum pooling layer, and a Sigmoid activation layer, denoted as MinPool_1, MinPool_2, and Simmoid, respectively. MinPool_1 is used to obtain the spatial difference map. MinPool_2 is used to obtain the channel excitation vector. Sigmoid is used to generate calibration weights. The weighting application unit group consists of two element-wise multiplication units, denoted as Multi_1 and Multi_2, respectively; Multi_1 applies the stability path calibration feature. With noise calibration weights Element-wise multiplication yields Multi_2 is used to incorporate intensity path calibration features. With noise calibration weights Element-wise multiplication yields The feature fusion layer is used to fuse the final features from the two paths, denoted as Concat. and spliced ​​along the channel dimension Residual connection units are used to combine the output of the fusion layer with the original input features. Adding each element together, denoted as Connect, yields the final output. .

[0147] It should be noted that the DBSCAN clustering optimization module uses mathematical methods, which are explained in detail in the specific implementation examples. Figure 5 Not shown in the diagram; secondly, to simplify the view structure, this invention does not include... Figure 2 , Figure 4 , Figure 5 Label all i = 1, 2, ..., N, but understandably, Figure 2 , Figure 4 , Figure 5 Each value of i shown represents the number of candidate boxes, i.e., i = 1, 2, ..., N, where N is variable.

[0148] Figure 6 This is a schematic block diagram of one embodiment of the greenhouse remote sensing image rotation target detection system described in this invention. (Refer to...) Figure 6 The system includes a data acquisition device and a target detection device. The data acquisition device acquires remote sensing images of the greenhouse area to be detected, obtaining the remote sensing image to be detected. The target detection device integrates an image preprocessing unit and the greenhouse rotating target detection network described in any of the above embodiments. The target detection device is connected to the data acquisition device and is used to call the image preprocessing unit to preprocess the remote sensing image to be detected (including atmospheric correction, geometric correction, image cropping, and normalization). Then, the preprocessed remote sensing image to be detected is input into the greenhouse rotating target detection network for calculation to obtain the rotating target detection result for the area to be detected.

[0149] In use, the data acquisition device acquires remote sensing images of the greenhouse area to be detected, and transmits these images to the image preprocessing unit of the target detection device. The image preprocessing unit of the target detection device preprocesses the transmitted remote sensing images, and then inputs the preprocessed images into the greenhouse rotating target detection network. The greenhouse rotating target detection network then calculates the rotating target detection results for the area to be detected. For example, Figure 7 The image shown is a remote sensing image of a greenhouse area to be inspected. Figure 8 To be Figure 7 The diagram shown illustrates the visualization of the rotating target detection results obtained by the rotating target detection network of this invention, which is input into a remote sensing image. Figure 8 In the diagram, rotating bounding boxes of different colors represent different categories of rotating targets such as greenhouses. Each rotating bounding box is represented by its center coordinates, width, height, and rotation angle, and is labeled with its corresponding category label and confidence score.

[0150] Understandably, in the remote sensing image to be detected input to the greenhouse rotating target detection network, the regions corresponding to the rotating targets detected by the greenhouse rotating target detection network are marked. These rotating bounding boxes are the position, size, attitude and category information of the rotating targets such as greenhouses in the corresponding regions to be detected, obtained based on the greenhouse rotating target detection network.

[0151] Preferably, the target detection device provides a graphical user interface (GUI) through which users can view the rotational target detection results of the area to be detected. The GUI integrates an API interface for users to upload greenhouse rotational target detection networks. The GUI also features a target detection network display area, showing users all uploaded greenhouse rotational target detection networks for selection. Optionally, the target detection device integrates a network loading module for automatically loading the user-selected greenhouse rotational target detection network.

[0152] Optionally, the target detection device also integrates a log recording module to record the working logs of the rotating target detection networks for each greenhouse loaded within the device; the target detection device also integrates a log storage module to store the logs recorded by the log recording module. A virtual log export button is integrated into the graphical user interface, allowing users to export the logs stored by the log storage module.

[0153] Optionally, the target detection device is equipped with a data transmission unit for uploading the remote sensing image to be detected acquired by the data acquisition device and its corresponding rotating target detection results (i.e., rotating bounding box, category label and confidence score) to the host computer.

[0154] Optionally, after receiving the remote sensing image to be detected and its corresponding rotating target detection result uploaded by the target detection device, the host computer marks the rotation bounding box, category label and confidence score of the uploaded rotating target detection result in the uploaded remote sensing image to be detected, thus obtaining a remote sensing image with the location and category information of the detected rotating targets such as greenhouses.

[0155] Optionally, the target detection device also integrates a DBSCAN parameter adjustment module, which dynamically adjusts the neighborhood radius parameter ε, minimum sample number parameter minPts, confidence threshold τ_score, and IoU threshold τ_IoU of the DBSCAN clustering optimization module according to different application scenarios (such as fog concentration, target size, etc.) to obtain optimal detection performance. A parameter adjustment area is provided on the graphical user interface (GUI), allowing users to manually adjust or select preset parameter configuration schemes.

[0156] Optionally, the target detection device also integrates a visualization module to visualize the intermediate features inside the rotating target detection network in the greenhouse, including the calibration weight map generated by the noise perception module, the stability path features and intensity path features of the dual-path excitation calibration module, and the cluster distribution map of the DBSCAN clustering process, so that users can analyze the working mechanism and detection performance of the network.

[0157] Optionally, the data transmission unit includes, but is not limited to, USB interfaces, Wi-Fi and Ethernet interfaces. The data acquisition device is a remote sensing image acquisition device, such as a sensor capable of acquiring remote sensing images, an unmanned aerial vehicle (UAV) camera, or a satellite remote sensing platform. The target detection device is a computer or embedded computing device (such as an industrial computer or edge computing device).

[0158] This embodiment provides a computer device including a processor, a communication interface, and a computer-readable storage medium. The processor, communication interface, and computer-readable storage medium are connected via a bus or other means. The communication interface is used to receive and send data. The computer-readable storage medium can be stored in the memory of the computer device. The computer-readable storage medium stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer-readable storage medium. The processor (or CPU, Central Processing Unit) is the computing and control core of the computer device, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement the corresponding steps in the embodiment of the method for detecting rotating targets in remote sensing images of greenhouses.

[0159] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting rotating targets in remote sensing images of a greenhouse, characterized in that, include: Based on remote sensing images of the greenhouse area to be detected, a backbone network is used to extract feature maps at different preset scales. Based on feature maps of different preset scales, multi-scale pyramid features are generated using the FPN basic structure. A dual-path excitation calibration module is used to enhance each pyramid feature, resulting in multiple enhanced pyramid features; Multiple enhanced pyramid features are input into the region candidate network to generate a set of rotated candidate boxes and a first confidence score for each rotated candidate box. Based on multiple enhanced pyramid features, a set of rotated candidate boxes, and the first confidence score of each rotated candidate box, an ROI alignment module is used to generate RoI features. Based on RoI features, a detection head is used to obtain the class label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box; Based on the category label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box, the DBSCAN clustering optimization module is used to obtain the rotation target detection results for the greenhouse area to be detected. Based on the cluster label vector of each rotated candidate box and the filtered second confidence score, an intra-cluster optimization unit is used to perform weighted fusion optimization on the candidate boxes of each cluster, and the optimal representative box of each cluster is generated by weighted averaging of confidence scores; the method includes: The filtered second confidence score is input into the weight normalization subunit to calculate the cluster-in-cluster confidence sum, so as to normalize the second confidence scores of all rotated candidate boxes in each cluster and use them as the weights of the rotated candidate boxes. The cluster label vector and weight of each rotated candidate box are input into the center coordinate weighted average sub-unit to perform weighted average optimization of the center coordinates of the rotated candidate boxes, and the optimized center coordinates are obtained. The cluster label vector and weight of each rotated candidate box are input into the size-weighted average sub-unit to perform weighted average optimization of the width and height of the rotated candidate box, thus obtaining the optimized width and height. The cluster label vector of each rotation candidate box and the weight of the rotation candidate box are input into the angle weighted average sub-unit to optimize the rotation angle of the rotation candidate box, thus obtaining the optimized rotation angle. Based on the sub-unit with the highest confidence score, the second confidence score with the highest second confidence score among all rotated candidate boxes within the cluster is selected and used as the optimized confidence score. The clustering label vector of each rotated candidate box is input into the category voting sub-unit to obtain the optimized category label; The optimized center coordinates, optimized width and height, optimized rotation angle, optimized confidence level, and optimized category label are assembled using the result assembly subunit to obtain the optimal representative box and complete detection results.

2. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, Based on feature maps of different preset scales, multi-scale pyramid features are generated using the FPN basic structure. The method includes: inputting feature maps of different preset scales into parallel laterally connected convolutional layers to obtain multiple laterally connected features with a unified channel dimension; A top-down feature fusion strategy is adopted, starting from the highest layer features, and multiple horizontally connected features are fused from top to bottom to obtain multiple fused features; Multiple fused features are convolved to generate multi-scale pyramid features.

3. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, A dual-path excitation calibration module is used to enhance each pyramid feature, resulting in multiple enhanced pyramid features; the method includes: Each pyramid feature is input into the input processing layer, and then convolution, normalization, and nonlinear activation are performed sequentially to obtain the first output feature. The first output feature is divided into two feature branches along the channel dimension using a feature separation unit: stability path feature and intensity path feature. The stability path features are input into the stability path calibration unit, a first spatial mask is generated by the first spatial mask generator, and a first channel descriptor is calculated by the first channel descriptor generator; the first calibration unit is used to fuse the first spatial mask and the first channel descriptor to obtain the stability path calibration features. The intensity path features are input into the intensity path calibration unit, a second spatial mask is generated by the second spatial mask generator, and a second channel descriptor is calculated by the second channel descriptor generator. The second calibration unit is used to fuse the second spatial mask and the second channel descriptor to obtain the intensity path calibration features. The stability path features and intensity path features are input into the noise-aware weight generation module to generate the first calibration weight and the second calibration weight, respectively. Using a weighted application unit group, the product of the stability path calibration feature and the first calibration weight is calculated to obtain the final stability path feature, and the product of the strength path calibration feature and the second calibration weight is calculated to obtain the final strength path feature. The final stability path features and the final strength path features are fused together, and then added to the original feature maps of different preset scales through residual connections to obtain multiple enhanced pyramid features.

4. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, Multiple enhanced pyramid features are input into a region candidate network to generate a set of rotated candidate boxes and a first confidence score for each rotated candidate box; the method includes: Multiple enhanced pyramid features are input into convolutional layers and ReLU activation layers for feature extraction, resulting in several anchor boxes; The anchor boxes are input into the classification branch and processed by convolution to obtain the foreground / background probabilities of each anchor box; The anchor frame is input into the regression branch and convolved to obtain five rotation frame regression parameters for each anchor frame. An anchor frame generator is used to generate predefined rotating anchor frames at each pyramid level; The five rotation box regression parameters of each anchor box are input into the candidate box decoder to generate the rotation candidate box coordinates of each anchor box and the first confidence score of each rotation candidate box.

5. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, Based on multiple enhanced pyramid features, a set of rotated candidate boxes, and the first confidence score of each rotated candidate box, an ROI alignment module is used to generate RoI features; the method includes: Multiple enhanced pyramid features, a set of rotated candidate boxes, and the first confidence score of each rotated candidate box are input into the hierarchical allocation unit to calculate the target pyramid level, so as to assign rotated candidate boxes of different scales to the most suitable pyramid level. A rotation coordinate mapping unit is used to map the image coordinates of the rotated candidate box to the corresponding feature map coordinate system; Bilinear interpolation sampling units are used to perform unquantized sampling of features within the rotated candidate box. Bilinear interpolation sampling is performed on the feature map by performing affine transformation on the four corner points of the rotated candidate box. The sampled features are pooled into a fixed size using a feature pooling unit to output RoI features.

6. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, Based on RoI features, a detection head is used to obtain the class label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box; the method includes: The RoI features are input into the RoI feature flattening layer to obtain a one-dimensional feature vector; One-dimensional feature vectors are input into a shared fully connected layer group. After passing through two fully connected layers and ReLU activation, the resulting third output feature is input into the classification branch fully connected layer for mapping, to obtain the class label of each rotated candidate box and the second confidence score of each class. The third output feature is input into the fully connected layer of the regression branch, which maps the high-dimensional features to the low-dimensional features and outputs the corrected rotated candidate box parameters.

7. The method for detecting rotating targets in remote sensing images of greenhouses according to claim 1, characterized in that, Based on the category label, second confidence score, and corrected rotation candidate box parameters for each rotation candidate box, the DBSCAN clustering optimization module is used to obtain the rotation target detection results for the greenhouse area to be detected; the method includes: The category label, second confidence score, and corrected rotation candidate box parameters of each rotation candidate box are input into the confidence filtering unit. The confidence of each rotation candidate box is judged, and rotation candidate boxes with confidence scores greater than the set threshold are filtered out to obtain the filtered set of rotation candidate boxes, the category label of the rotation candidate box, and the second confidence score. Based on the filtered set of rotated candidate boxes, a feature extraction unit is used to perform coordinate normalization, size normalization, and angle encoding, and the resulting features are concatenated to obtain a set of clustered feature vectors. Input the set of clustering feature vectors into the DBSCAN clustering unit to generate a clustering label vector for each rotated candidate box; Based on the cluster label vector of each rotated candidate box and the filtered second confidence score, an intra-cluster optimization unit is used to perform weighted fusion optimization on the candidate boxes of each cluster, and the optimal representative box of each cluster is generated by weighted averaging of confidence scores. A noise point processing unit is used to generate a clustering label vector for each rotated candidate box to perform noise reduction processing, resulting in a denoised rotated candidate box. The optimal representative box and the denoised rotated candidate box of each cluster are input into the result sorting unit, and the top candidates with the highest confidence scores are selected. A rotating candidate box; The one with the highest confidence score The rotating candidate box input-output assembly unit performs format standardization and outputs the rotating target detection results for the greenhouse area to be detected, namely the rotating box coordinate tensor, confidence tensor, and category label tensor.

8. A system for detecting rotating targets in remote sensing images of greenhouses, characterized in that, include: The backbone network is configured to extract feature maps at different preset scales based on remote sensing images of the greenhouse area to be detected. The FPN infrastructure is configured to generate multi-scale pyramid features based on feature maps of different preset scales. The dual-path excitation calibration module is configured to enhance each pyramid feature to obtain multiple enhanced pyramid features. The region candidate network is configured to: input multiple enhanced pyramid features into the region candidate network to generate a set of rotated candidate boxes and a first confidence score for each rotated candidate box; The ROI alignment module is configured to generate RoI features based on multiple enhanced pyramid features, a set of rotated candidate boxes, and the first confidence score of each rotated candidate box. The detection head is configured to: based on RoI features, use the detection head to obtain the class label, second confidence score and corrected rotation candidate box parameters for each rotation candidate box; The DBSCAN clustering optimization module is configured to: obtain the detection results of rotating targets in the greenhouse area to be detected based on the category label, second confidence score and corrected rotating candidate box parameters of each rotating candidate box. Based on the cluster label vector of each rotated candidate box and the filtered second confidence score, an intra-cluster optimization unit is used to perform weighted fusion optimization on the candidate boxes of each cluster, and the optimal representative box of each cluster is generated by weighted averaging of confidence scores; the method includes: The filtered second confidence score is input into the weight normalization subunit to calculate the cluster-in-cluster confidence sum, so as to normalize the second confidence scores of all rotated candidate boxes in each cluster and use them as the weights of the rotated candidate boxes. The cluster label vector and weight of each rotated candidate box are input into the center coordinate weighted average sub-unit to perform weighted average optimization of the center coordinates of the rotated candidate boxes, and the optimized center coordinates are obtained. The cluster label vector and weight of each rotated candidate box are input into the size-weighted average sub-unit to perform weighted average optimization of the width and height of the rotated candidate box, thus obtaining the optimized width and height. The cluster label vector of each rotation candidate box and the weight of the rotation candidate box are input into the angle weighted average sub-unit to optimize the rotation angle of the rotation candidate box, thus obtaining the optimized rotation angle. Based on the sub-unit with the highest confidence score, the second confidence score with the highest second confidence score among all rotated candidate boxes within the cluster is selected and used as the optimized confidence score. The clustering label vector of each rotated candidate box is input into the category voting sub-unit to obtain the optimized category label; The optimized center coordinates, optimized width and height, optimized rotation angle, optimized confidence level, and optimized category label are assembled using the result assembly subunit to obtain the optimal representative box and complete detection results.

9. A computer device, characterized in that, A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps of the method for detecting rotating targets in remote sensing images of greenhouses as described in any one of claims 1-7.