Complex scene ship target detection method based on multi-scale feature constraint and neighborhood analysis
By constructing a multi-level grid grayscale histogram feature and a central difference convolution module, combined with cross-layer feature consistency constraints and neighborhood correlation analysis, the problems of high false alarm rate and missed detection rate in SAR image target detection under complex sea conditions are solved, and high-precision ship target detection is achieved.
Patent Information
- Application Number
- CN202510818007.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-16
AI Technical Summary
Existing SAR image target detection methods are susceptible to sea clutter interference in complex sea conditions, resulting in a high false alarm rate. Deep learning-based methods are sensitive to noise and have problems of missed detection and false detection for small targets and complex backgrounds.
By constructing multi-level grid grayscale histogram features, establishing an explicit mapping relationship between local statistical features and depth features, and introducing a central differential convolution module in the detection network, the perception ability of hull edges and texture details is enhanced. Combined with cross-layer feature consistency constraints and neighborhood correlation analysis, the detection accuracy is improved.
It effectively improves the detection accuracy in complex scenes, increases the sensitivity to edges and small targets, suppresses background interference, and improves the accuracy and robustness of the model in multi-scale target detection.
Smart Images

Figure CN120656138A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target detection technology, and in particular to a method for detecting ship targets in complex scenes based on multi-scale feature constraints and neighborhood analysis. Background Art
[0002] Synthetic aperture radar (SAR) is an active microwave imaging system. With its all-weather, high-penetration, and high-resolution imaging capabilities, SAR has broad application value in marine environmental monitoring, marine resource development, national defense, and security. However, existing SAR image target detection methods still face challenges. Traditional feature engineering-based methods have poor adaptability to complex sea conditions and are susceptible to interference from sea clutter, resulting in high false alarm rates. While deep learning-based methods can automatically extract features, they are sensitive to the speckle noise characteristic of SAR images and rely on large amounts of annotated data, resulting in missed detections and false detections for small targets and complex backgrounds. To address this issue, this paper proposes a ship target detection method based on multi-scale feature constraints and neighborhood analysis. By constructing multi-level grid grayscale histogram features, an explicit mapping relationship between local statistical features and depth features is established, and a central difference convolution module is introduced into the detection network to enhance the perception of ship edges and texture details, effectively improving detection accuracy in complex scenarios. Summary of the Invention
[0003] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a complex scene ship target detection method based on multi-scale feature constraints and neighborhood analysis, which helps to improve the detection accuracy in complex scenes.
[0004] To implement the above technical solution, in a first aspect, the present invention provides a method for detecting ship targets in complex scenes based on multi-scale feature constraints and neighborhood analysis, comprising the following steps: S1: Acquire SAR image data and preprocess the acquired SAR image data to obtain multiple SAR sub-images, while using an overlapping strategy to ensure target integrity; S2: The region association label generation module performs multi-scale neighborhood correlation analysis on the multiple SAR sub-images obtained to obtain three types of region association labels to provide auxiliary signals for subsequent use; The S2 includes: S21: The multi-scale gridding processing module establishes three scale grid divisions of 20×20, 40×40, and 80×80 for each SAR sub-image; S22: The feature calculation module calculates the 16-dimensional normalized grayscale histogram feature for each grid cell; S23: The label generation module maps the center coordinates of the labeled target and the bounding box size to the grid position through coordinate transformation. When the target center is located within the grid cell, the grid label is set to a valid value, otherwise it is set to 0, forming an explicit grid feature representation corresponding to the space; S3: Input the obtained multiple SAR sub-images into the target detection model to obtain a target detection image; Among them, the target detection model includes: backbone network and neck network modules, cross-layer feature consistency constraint module, neighborhood correlation analysis module, and center difference convolution module; The S3 includes: S31: The backbone network and neck network modules input the preprocessed SAR sub-images into the backbone network and neck modules for deep feature extraction to obtain feature maps of three different scales; S32: The cross-layer feature consistency constraint module uses hierarchical MSE loss to perform multi-scale gradient alignment of deep, mid-layer, and shallow layer features to improve the cross-scale detection performance of ship targets in SAR images; S33: The neighborhood correlation analysis module uses the region association label as an auxiliary supervision signal and performs hierarchical spatial alignment with the feature maps of three different scales to obtain three spatially aligned feature images; S34: Center difference convolution module Three new detection heads using center difference convolution modules are added to the detection head part. The local detail features extracted by center difference convolution are weightedly fused with the global semantic features obtained by conventional convolution to obtain the final feature image.
[0005] Furthermore, the S1 includes: performing segmentation processing on the acquired SAR image data to obtain a plurality of SAR sub-images, and setting overlapping areas between adjacent SAR sub-images.
[0006] Furthermore, the backbone network includes a Focus module, a CBL module, a CSP module, an SPP module, a downsampling module and an upsampling module.
[0007] Furthermore, the S32 includes: The feature map upsampling module performs bilinear upsampling on the 20×20 feature map of the P5 layer to a resolution of 40×40 to obtain the F'_2 feature map, and upsamples the 40×40 feature map of the P4 layer to a resolution of 80×80 to obtain the F'_1 feature map; The layered MSE loss calculation module calculates the MSE loss of the F'_2 and P4 layer feature maps, and the MSE loss of the F'_1 and P3 layer feature maps respectively; The adaptive feature optimization module enhances the error weight of the target edge area during loss calculation through a dynamic weight adjustment mechanism.
[0008] Furthermore, the S33 includes: Spatial matching is performed on the 80×80 grid associated labels and the feature map downsampled 8 times, the 40×40 grid associated labels and the feature map downsampled 16 times, and the 20×20 grid associated labels and the feature map downsampled 32 times; The explicit statistical features guided by the region association labels are fused with the implicit deep features extracted by the backbone network through the cross-scale mean squared error loss function; The spatial distribution consistency constraints between the pre-calculated histogram vector and the network output feature map are enhanced to enhance the network's sensitivity to edge texture features, and iterative optimization is used to gradually improve the detection accuracy.
[0009] Furthermore, the S34 includes: Calculate the difference between the pixel at the center of the convolution kernel and the surrounding pixels, enhance the local features through differential operation, multiply the difference by the weight of the convolution kernel, and sum all the differences to get the value of the output feature. The calculation formula is as follows: ; in, is the center pixel value of the current convolution window, are the pixel values around the center pixel; The outputs of conventional convolution and differential convolution are calculated separately. The weighted difference between the two is normalized and activated, and then spliced with the multi-scale feature map generated by the backbone network in the same dimension. The global and local information are fused by automatically learning the optimal fusion ratio through 1×1 convolution. Then, the local detail features of the center differential convolution and the global semantic information of the conventional convolution are equally fused. The calculation formula after fusion is as follows:
[0010] ; The fused feature map is further convolved and the processed feature map is output to the detection head for target detection of the hull.
[0011] In a second aspect, the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned complex scene ship target detection method based on multi-scale feature constraints and neighborhood analysis.
[0012] The beneficial effects of the present invention are: The present invention establishes an explicit mapping relationship between local statistical features and depth features by constructing multi-level grid grayscale histogram features, and enhances the perception of hull edges and texture details through the central differential convolution module during the detection process, effectively improving the detection accuracy in complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0014] Figure 1 This is a flow chart of a method for detecting ship targets in complex scenes based on multi-scale feature constraints and neighborhood analysis according to the present invention; Figure 2 This is a schematic diagram of the overall network architecture of a method for detecting ship targets in complex scenes in SAR images based on multi-scale feature fusion and neighborhood analysis according to the present invention; Figure 3 A flow chart for performing multi-scale neighborhood correlation analysis on multiple SAR sub-images of the present invention; Figure 4 This is a flow chart of the present invention for inputting the obtained multiple SAR sub-images into a target detection model to obtain a target detection image. DETAILED DESCRIPTION
[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0016] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, each technical and scientific term used in this embodiment has the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0017] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0018] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention, and should not be understood as limiting the present invention.
[0019] In the present invention, terms such as "fixed connection," "connected," and "connection" should be interpreted broadly to mean a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediary. Relevant researchers or technicians in this field may determine the specific meanings of these terms in the present invention based on specific circumstances, and they should not be construed as limitations of the present invention.
[0020] Example 1: like Figure 1 and Figure 2 As shown, this embodiment provides a method for detecting ship targets in complex scenes based on multi-scale feature constraints and neighborhood analysis, including the following steps: S1: Acquire SAR image data and preprocess the acquired SAR image data to obtain multiple SAR sub-images, while adopting an overlapping strategy to ensure target integrity.
[0021] Specifically, acquired SAR images are generally high-resolution. For example, the SSDD dataset contains large-scale remote sensing images with a resolution of 3000×3000 pixels. When the traditional YOLOv5 model directly processes this resolution, after the original SAR image is downsampled five times, the large-scale feature map is directly upsampled from the 375×375 feature map after the fifth downsampling, the medium-scale feature map is directly upsampled from the 188×188 feature map after the fourth downsampling, and the small-scale feature map is directly upsampled from the 94×94 feature map after the third downsampling. The receptive field size is 3000 / 94 = 32 pixels, meaning that each feature point corresponds to a 32×32 pixel ship target in the original image. However, the characteristics of the dataset indicate that the large-scale images in the original dataset contain many ship hulls that are much smaller than 32 pixels. Simply downsampling by such a large factor can easily lose target information.
[0022] In order to solve the above problem, the present invention adopts the following method to solve the above problem. The specific steps are as follows: The acquired SAR image data is grid-segmented to generate SAR sub-images with a predetermined overlap rate; wherein the SAR image data generally refers to high-resolution SAR image data.
[0023] More specifically, the acquired SAR image data is gridded into 640×640 pixel SAR sub-images, with a 60% (384 pixel) overlap between adjacent SAR sub-images to ensure the integrity of ship targets that cross SAR sub-image boundaries. After gridding, the receptive field corresponding to a single feature point in the original image is reduced to the order of 8×8 pixels, enabling the network to effectively detect ship targets larger than 8 pixels.
[0024] S2: The region association label generation module performs multi-scale neighborhood correlation analysis on the multiple SAR sub-images obtained to obtain three types of region association labels to provide auxiliary signals for subsequent use.
[0025] Among them, the region association label generation module includes: a multi-scale grid processing module, a feature calculation module and a label generation module.
[0026] Different from conventional target detection, SAR image ship detection is mainly used in sea surface areas, where the background is mainly sea surface reflection. The similarity between the center area of the ship target and the surrounding environment is significantly lower than that of the non-target area. In order to enhance the target representation capability, multi-scale grid processing is performed on the obtained multiple SAR sub-images, such as Figure 3 As shown, the specific steps include: S21: The multi-scale gridding processing module creates grids of three sizes: 20×20, 40×40, and 80×80 for each SAR sub-image; S22: The feature calculation module calculates the 16-dimensional normalized grayscale histogram feature for each grid cell; S23: The label generation module maps the center coordinates of the labeled target and the bounding box size to the grid position through coordinate transformation. When the target center is located within the grid cell, the grid label is set to a valid value, otherwise it is set to 0, forming an explicit grid feature representation corresponding to the space.
[0027] Specifically, through coordinate transformation, the pre-marked ship target center coordinates (x, y) and the size of the ship bounding box are mapped to the grid position. When the ship target center is located within a grid cell, the regional correlation label of the grid is set to a valid value, otherwise it is set to 0, forming a display grid feature representation of the spatial correspondence, thereby obtaining the regional correlation label.
[0028] By segmenting SAR image data and performing neighborhood correlation analysis on multiple SAR sub-images obtained by segmentation to obtain regional association labels, it not only helps to reduce the computational complexity of model training and inference, and prevent the problem of excessive consumption of computing resources when directly inputting the model, but also helps to improve the accuracy of target detection and the model's ability to recognize and detect small-scale targets.
[0029] S3: Input the obtained multiple SAR sub-images into the target detection model to obtain a target detection image; The target detection model includes: backbone network and neck network modules, cross-layer feature consistency constraint module, neighborhood correlation analysis module and center difference convolution module; S31: The backbone network and neck network modules perform deep feature extraction on the multiple SAR sub-images obtained to obtain feature maps of three different scales.
[0030] Specifically, the backbone network and neck network modules include: Focus module, CBL module (mainly composed of convolutional layer (Conv), batch normalization layer (BN) and LeakyReLU activation function layer), CSP (Cross Stage Partial) module, SPP (Spatial Pyramid Pooling) module, downsampling module, upsampling module and feature fusion network; Among them, the Focus module is used to perform four-way slicing and splicing operations on SAR sub-images to achieve feature reconstruction; the CBL module includes convolutional layers, batch normalization layers, and LeakyReLU activation layers for feature learning and nonlinear transformation; the CSP module adopts a residual structure to enhance feature reuse through cross-stage partial connections; the SPP module expands the receptive field through multi-scale pooling; the downsampling module expands the receptive field and extracts high-level semantic features by gradually reducing the resolution of the feature map, reducing the amount of calculation; the upsampling module improves the resolution of the feature map through bilinear interpolation or transposed convolution, which is used to reconstruct spatial details and support multi-scale feature fusion; The feature fusion network package adopts an architecture that combines FPN and PAN, and includes a CSP module for strengthening multi-scale feature fusion, which is used to output feature maps of three different scales, respectively denoted as feature map F1, feature map F2 and feature map F3; among the feature maps of the three scales, feature map F2 is obtained by downsampling F1 by 2 times, and its size is 1 / 2 of feature map F1; feature map F3 is obtained by downsampling F2 by 2 times, and its size is 1 / 4 of feature map F1. Feature mapping relationships are established between feature maps of different scales through upsampling and downsampling operations, forming a feature pyramid with a hierarchical structure, which effectively captures the target features of ships of different sizes in the image.
[0031] S32: The cross-layer feature consistency constraint module performs multi-scale gradient alignment of deep, mid-layer, and shallow layer features using a hierarchical MSE (mean squared error) loss to improve the cross-scale detection performance of ship targets in SAR images.
[0032] Among them, the cross-layer feature consistency constraint module includes: feature map upsampling module, layer-by-layer MSE loss calculation module and adaptive feature optimization module.
[0033] Specifically, a self-supervised information constraint mechanism is added to the network. The deep feature map is upsampled and compared with the shallow feature map to minimize the difference between the two. This allows the feature map to retain the characteristics of large-scale targets in the shallow feature map while maintaining high-level semantic features. Compared with the deep network graph, the input image contains more complete information, but SAR sub-images often contain redundant information such as background details. The self-supervised constraint of this method aims to retain the salient features in the previous layer feature map as much as possible, which is achieved by minimizing MSE (F'1, F2) and MSE (F'2, F3). This innovative hierarchical MSE constraint constructs a gradient propagation path that can simultaneously maintain P3 (80×80) small target details, P4 (40×40) medium-scale context, and P5 (20×20) global semantics, and is integrated with the CIoU detection framework through a composite loss function:
[0034] in These cross-scale mean square error constraints and the original detection loss jointly optimize the target, achieving multi-task joint optimization during the back propagation process.
[0035] The specific steps include: S32-1: The feature map upsampling module performs bilinear upsampling on the 20×20 feature map of the P5 layer to a resolution of 40×40 to obtain the F'_2 feature map, and upsamples the 40×40 feature map of the P4 layer to a resolution of 80×80 to obtain the F'_1 feature map; S32-2: The layered MSE loss calculation module calculates the MSE loss of the F'_2 and P4 layer feature maps and the MSE loss of the F'_1 and P3 layer feature maps respectively; S32-3: The adaptive feature optimization module uses a dynamic weight adjustment mechanism to enhance the error weight of the target edge area during loss calculation.
[0036] To address the unique noise interference issues inherent in SAR sub-images, the feature map upsampling module's upsampling process suppresses background noise through adaptive weight adjustment, enhancing the efficiency of target feature transmission. During the loss calculation phase, the error weight of each pixel is dynamically adjusted based on the saliency of its region, prioritizing the preservation of edge and texture features of ship targets. After multiple rounds of iterative optimization, the network is able to establish a continuous gradient propagation path from P5 global semantics to P3 local details, significantly improving the detection accuracy of multi-scale ship targets in complex backgrounds.
[0037] S33: The neighborhood correlation analysis module uses the region association label as an auxiliary supervision signal and performs hierarchical spatial alignment with the feature maps of three different scales to obtain three spatially aligned feature images.
[0038] The specific steps include: S33-1: Spatial matching of 80×80 grid associated labels with 8-fold downsampled feature maps, 40×40 grid associated labels with 16-fold downsampled feature maps, and 20×20 grid associated labels with 32-fold downsampled feature maps. S33-2: Fusion of explicit statistical features guided by region-associated labels with implicit deep features extracted by the backbone network through a cross-scale mean squared error loss function; S33-3: Pre-calculate the spatial distribution consistency constraints of the histogram vector and the network output feature map to enhance the network's sensitivity to edge texture features, and iteratively optimize to gradually improve detection accuracy.
[0039] The explicit statistical features guided by these regional correlation labels are fused with the implicit deep features extracted by the backbone network through a loss function. Cross-scale mean squared error calculation is used to establish the correlation between statistical features and high-level semantics. Spatial distribution consistency constraints are used to ensure consistency between the multi-scale feature maps output by the network and the pre-computed histogram vectors. This effectively improves the network's sensitivity to underlying visual features such as edge textures without relying on additional manual annotation. Pixel-level positioning accuracy is achieved through the association of statistical semantic features, enabling more precise target location and detection.
[0040] More specifically, during each training batch, a three-scale feature matrix is synchronously loaded and spatially aligned with the deep feature map extracted by convolution. A multi-task loss function is used to link explicit features with the deep features extracted by the backbone network. This involves calculating the mean squared error loss for features at different scales, establishing a mapping between statistical features and high-level semantics, and thereby constraining the spatial distribution of the multi-scale feature map output by the network to be consistent with the pre-computed histogram vector. This approach, without relying on additional manual annotation, enhances the network's sensitivity to low-level visual features such as edges and textures, enabling more accurate object location and presence determination, thereby gradually improving detection accuracy.
[0041] S34: Central Difference Convolution Module Three new detection heads using Central Difference Convolution (CDC) modules are added to the detection head part. The local detail features extracted by central difference convolution are weightedly fused with the global semantic features obtained by conventional convolution to obtain the final feature image.
[0042] Specifically, three new detection heads using central differential convolution modules are added to the detection head part, which weightedly fuse the local detail features extracted by central differential convolution with the global semantic features obtained by conventional convolution to obtain the final feature image, thereby realizing the positioning and detection of ships.
[0043] Specifically, the following steps are included: S34-1: Through three independent CDC modules, each corresponding to the feature maps of different resolutions output by the backbone network, it ensures adaptability to ship targets of different sizes.
[0044] S34-2: Calculate the difference between the pixel at the center of the convolution kernel and the surrounding pixels, enhance the local features through differential operation, multiply the difference by the weight of the convolution kernel, and sum all the differences to obtain the value of the output feature. The calculation formula is as follows:
[0045] in, is the center pixel value of the current convolution window, are the pixel values surrounding the center pixel.
[0046] S34-3: Calculate the outputs of regular convolution and differential convolution respectively. After normalization and activation, the weighted difference between the two is spliced with the multi-scale feature map generated by the backbone network in the same dimension. The global and local information are fused by automatically learning the optimal fusion ratio through 1×1 convolution. Then, the local detail features of the center differential convolution and the global semantic information of the regular convolution are equally fused. The calculation formula after fusion is as follows:
[0047]
[0048] S34-4: After hierarchical feature fusion and enhancement processing in the multi-level CDC module, the optimized feature representation is passed to the target prediction module. Through regression and classification collaborative optimization, the precise bounding box coordinates and category confidence of the ship target are finally output, realizing the automatic detection and recognition of multi-scale ship targets in SAR images.
[0049] This embodiment helps to improve the model's sensitivity to edges and tiny targets, suppress the interference of background such as waves and clouds, and improve the model's ability to detect multi-scale hulls in complex backgrounds and multi-scale targets.
[0050] S4: Description of technical effects.
[0051] The improved ship detection method of the present invention has been systematically verified and demonstrated significant technical advantages and application value. The experimental results on the SSDD dataset were P = 0.976, R = 0.965, and the mAP value was 0.985; on the AIR_SARShip dataset, the experimental results were P = 0.911, R = 0.94, and the mAP value was 0.956; on the LS-SSDD1 dataset, the experimental results were P = 0.836, R = 0.90, and the mAP value was 0.825; and on the HRSID dataset, the results were P = 0.94, R = 0.918, and the mAP value was 0.957, indicating that the model has good performance.
[0052] In typical scene tests, this patented method showed significant performance improvements compared to the original model, and was more robust to speckle noise unique to SAR images in single-target ocean scenes. In complex multi-target scenes, the missed detection rate also decreased when targets were mutually occluded. In nearshore and shore scenes, the false alarm rate of detection was significantly reduced in the face of interference from the land background. The ablation experiment further confirmed the contribution of each module. The detection performance of adding the center difference convolution module was better than that of using the ordinary YOLOV5s network structure. When the center difference convolution module was added alone, the texture and edge information of the target were better preserved, and the accuracy was improved. After further adding the feature fusion module, the model made better use of multi-scale features, indicating that the feature fusion module can effectively integrate multi-scale features and further improve detection accuracy. Finally, after adding the self-supervised learning improvement, the model converged faster during training and had a higher learning ability for samples, further improving the convergence and detection performance of the model, forming a cumulative effect of the technology.
[0053] The results of horizontal comparison experiments show that the recall accuracy and average precision mean indicators of this patented method are significantly better than those of existing algorithms when performing hull detection tasks in multi-scale complex scenes. In order to verify the robustness of the method, a systematic experiment was carried out on three independent image datasets. A single dataset was used for model training and verification to evaluate basic performance, and two other datasets with different data distribution characteristics were selected for cross-dataset testing. This design not only ensures the complete independence of the training set and the test set, but also more objectively verifies the model's generalization ability for unknown data distributions. The experimental data fully proves that this patented method effectively overcomes the key technical bottlenecks of traditional convolutional neural networks in hull detection tasks, such as insufficient edge feature extraction and insufficient sensitivity in small target detection.
[0054] Example 2: This embodiment provides a computer-readable storage medium, which includes a stored program. When the program is running, the device where the computer-readable storage medium is located is controlled to execute the complex scene ship target detection method based on multi-scale feature constraints and neighborhood analysis described in Example 1.
[0055] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0056] In the several embodiments provided by the present invention, it should be understood that the disclosed system and method can It can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other divisions may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interface, or the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0057] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0058] In addition, it should be noted that the flowcharts in the accompanying drawings show the methods of the embodiments of the present disclosure. In the descriptions corresponding to the flowcharts or block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be performed substantially in parallel, or sometimes in the opposite order, which may depend on the functions involved. Each block in the block diagram and / or flow chart, and the combination of blocks in the block diagram and / or flow chart, can be implemented using a dedicated hardware-based system that performs the specified functions or actions, or can be implemented using a combination of dedicated hardware and computer instructions.
[0059] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A ship target detection method in complex scenes based on multi-scale feature constraints and neighborhood analysis, characterized by: The following steps are involved: S1: Acquire SAR image data and preprocess the acquired SAR image data to obtain multiple SAR sub-images, while using an overlapping strategy to ensure target integrity; S2: The region association label generation module performs multi-scale neighborhood correlation analysis on the multiple SAR sub-images obtained to obtain three types of region association labels to provide auxiliary signals for subsequent use; The S2 includes: S21: The multi-scale gridding processing module establishes three scale grid divisions of 20×20, 40×40, and 80×80 for each SAR sub-image; S22: The feature calculation module calculates the 16-dimensional normalized grayscale histogram feature for each grid cell; S23: The label generation module maps the center coordinates of the labeled target and the bounding box size to the grid position through coordinate transformation. When the target center is located within the grid cell, the grid label is set to a valid value, otherwise it is set to 0, forming an explicit grid feature representation corresponding to the space; S3: Input the obtained multiple SAR sub-images into the target detection model to obtain a target detection image; Among them, the target detection model includes: backbone network and neck network modules, cross-layer feature consistency constraint module, neighborhood correlation analysis module, and center difference convolution module; The S3 includes: S31: The backbone network and neck network modules input the preprocessed SAR sub-images into the backbone network and neck modules for deep feature extraction to obtain feature maps of three different scales; S32: The cross-layer feature consistency constraint module uses hierarchical MSE loss to perform multi-scale gradient alignment of deep, mid-layer, and shallow layer features to improve the cross-scale detection performance of ship targets in SAR images; S33: The neighborhood correlation analysis module uses the region association label as an auxiliary supervision signal and performs hierarchical spatial alignment with the feature maps of three different scales to obtain three spatially aligned feature images; S34: Center difference convolution module Three new detection heads using center difference convolution modules are added to the detection head part. The local detail features extracted by center difference convolution are weightedly fused with the global semantic features obtained by conventional convolution to obtain the final feature image.
2. The method for ship target detection in complex scenes based on multi-scale feature constraints and neighborhood analysis according to claim 1 is characterized in that: The S1 includes: performing segmentation processing on the acquired SAR image data to obtain a plurality of SAR sub-images, and setting overlapping areas between adjacent SAR sub-images.
3. The method for ship target detection in complex scenes based on multi-scale feature constraints and neighborhood analysis according to claim 1 is characterized in that: The backbone network includes a Focus module, a CBL module, a CSP module, an SPP module, a downsampling module and an upsampling module.
4. The method for ship target detection in complex scenes based on multi-scale feature constraints and neighborhood analysis according to claim 1 is characterized in that: The S32 includes: The feature map upsampling module performs bilinear upsampling on the 20×20 feature map of the P5 layer to a resolution of 40×40 to obtain the F'_2 feature map, and upsamples the 40×40 feature map of the P4 layer to a resolution of 80×80 to obtain the F'_1 feature map; The layered MSE loss calculation module calculates the MSE loss of the F'_2 and P4 layer feature maps, and the MSE loss of the F'_1 and P3 layer feature maps respectively; The adaptive feature optimization module enhances the error weight of the target edge area during loss calculation through a dynamic weight adjustment mechanism.
5. The method for ship target detection in complex scenes based on multi-scale feature constraints and neighborhood analysis according to claim 1 is characterized in that: The S33 includes: Spatial matching is performed on the 80×80 grid associated labels and the feature map downsampled 8 times, the 40×40 grid associated labels and the feature map downsampled 16 times, and the 20×20 grid associated labels and the feature map downsampled 32 times; The explicit statistical features guided by the region association labels are fused with the implicit deep features extracted by the backbone network through the cross-scale mean squared error loss function; The spatial distribution consistency constraints between the pre-calculated histogram vector and the network output feature map are enhanced to enhance the network's sensitivity to edge texture features, and iterative optimization is used to gradually improve the detection accuracy.
6. The method for ship target detection in complex scenes based on multi-scale feature constraints and neighborhood analysis according to claim 1 is characterized in that: The S34 includes: Calculate the difference between the pixel at the center of the convolution kernel and the surrounding pixels, enhance the local features through differential operation, multiply the difference by the weight of the convolution kernel, and sum all the differences to get the value of the output feature. The calculation formula is as follows: ; in, is the center pixel value of the current convolution window, are the pixel values around the center pixel; The outputs of conventional convolution and differential convolution are calculated separately. The weighted difference between the two is normalized and activated, and then spliced with the multi-scale feature map generated by the backbone network in the same dimension. The global and local information are fused by automatically learning the optimal fusion ratio through 1×1 convolution. Then, the local detail features of the center differential convolution and the global semantic information of the conventional convolution are equally fused. The calculation formula after fusion is as follows: ; The fused feature map is further convolved and the processed feature map is output to the detection head for target detection of the hull.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute a complex scene ship target detection method based on multi-scale feature constraints and neighborhood analysis as described in any one of claims 1 to 6.
Citation Information
Cited By
Bridge area water area ship target detection method, equipment and medium
CN121214301A