SAR image post-attention enhanced fine segmentation method for complex oil spill patterns

By combining a post-attention enhancement module with YOLOv8 and SAM models, the problem of segmenting complex oil spill patterns in SAR images was solved, enabling more refined identification and monitoring of oil spill areas.

CN123119035APending Publication Date: 2026-11-17NINGBO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611246244.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately segment complex oil spill patterns in SAR images, especially in areas with weak boundaries, irregular shapes, and complex nearshore backgrounds, resulting in boundary deviations, local expansion, and loss of detail.

Method used

By employing a post-attention enhancement module combined with YOLOv8 detection and SAM segmentation model, and by fusing extended ROI images and initial mask features, fine optimization is performed using local information from SAR images to enhance the segmentation effect on complex oil spill patterns.

Benefits of technology

It improves the accuracy of segmentation results, preserves the irregular spatial morphology of oil spills, provides more refined pixel-level information support, and adapts to oil spill monitoring under complex sea conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123119035A_ABST
    Figure CN123119035A_ABST
Patent Text Reader

Abstract

This invention relates to a post-attention enhancement fine segmentation method for SAR images with complex oil spill morphologies, comprising: obtaining a SAR backscattering coefficient image, performing oil spill target detection, and obtaining oil spill target detection boxes; for each oil spill target detection box, obtaining an extended ROI image and an initial oil spill mask, extracting image features and spatial features and fusing them; performing channel and spatial attention enhancement on the fused features; generating a fine oil spill segmentation mask and restoring the coordinate system; if multiple oil spill target detection boxes exist, generating corresponding fine oil spill segmentation masks for each, restoring the spatial positions, and merging them. The beneficial effects of this invention are: it can improve common problems in the initial SAM segmentation results such as blockiness, excessively smoothed boundaries, local expansion, filling of internal gaps, and insufficient representation of slender structures, making the generated fine oil spill segmentation mask more closely match the irregular spatial morphology of real oil spills in SAR images.
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 processing technology, and more specifically, to a post-attention enhancement fine segmentation method for SAR images with complex oil spill morphology. Background Technology

[0002] Marine oil spills have a lasting impact on the marine ecosystem, coastal resources, and shipping activities. Rapidly and accurately acquiring information on the spatial distribution of oil spills is a crucial task in marine environmental remote sensing monitoring. Synthetic Aperture Radar (SAR) imagery possesses all-weather, day-and-night imaging capabilities, unaffected by cloud cover or lighting conditions. It can continuously acquire observational data on sea surface backscattering intensity in complex marine environments, and therefore has been widely used in marine oil spill monitoring.

[0003] In SAR imagery, oil spills on the sea surface typically appear as low-backscattering dark spots. However, due to the SAR imaging mechanism and marine environmental conditions, these dark spot characteristics are not stable under actual sea conditions and complex scenarios. On the one hand, SAR coherent imaging generates coherence speckle noise, and changes in sea surface wind, waves, and surface roughness can also cause fluctuations in backscattering intensity, making the grayscale differences and boundary transitions between the oil spill area and the adjacent sea surface unstable. On the other hand, complex backgrounds such as land-sea boundaries, shoals, and harbors in nearshore areas, as well as low-scattering dark spots formed by some oil film-like phenomena, can all interfere with the identification of oil spill targets.

[0004] To achieve quantitative monitoring and delineation of oil spill areas, it is typically necessary to determine the spatial distribution and boundary locations of oil spill targets in SAR imagery, thus creating a pixel-level segmentation requirement. In real-world scenarios, oil spills often exhibit irregular shapes such as stripes, patches, flakes, fragments, or plumes under the influence of ocean currents, wind fields, and diffusion processes; furthermore, they may contain voids, fractures, and slender tail structures, all of which increase the difficulty of precise pixel-level segmentation of oil spill areas.

[0005] For oil spill targets in SAR imagery, existing technologies typically employ methods such as target detection, threshold segmentation, edge extraction, region growing, or deep learning segmentation. While target detection models can quickly output candidate regions for oil spill targets, the results are generally rectangular detection boxes (such as the YOLO model), failing to directly provide information on oil slick boundaries and internal structures. Threshold segmentation, edge extraction, and region growing methods rely on rules such as grayscale, edges, or connectivity, making them susceptible to speckle noise, background scattering variations, and oil slick-like dark spots, hindering their stable adaptation to changes in oil spill morphology under complex sea conditions. Although deep learning-based segmentation methods can output pixel-level results, they may still suffer from boundary deviations, local expansion, or loss of detail under conditions of weak boundaries, irregular shapes, and complex nearshore backgrounds.

[0006] In recent years, research has combined target detection models with cue-based segmentation models such as the Segment Anything Model (SAM), providing a technical approach for pixel-level processing of SAR oil spills. This approach primarily employs a two-stage processing method of detection and segmentation, which improves the automation level of the segmentation process to some extent. However, SAM is a general segmentation model and not specifically designed for the morphology of SAR oil spill dark spots. Under cue-based detection, when the oil spill target has weak boundaries, uneven internal grayscale, local fractures, internal voids, or slender tail structures, its initial segmentation output tends to resemble a continuous, closed overall region. This results in overly smoothed boundaries, local expansion, filling of internal voids, and insufficient representation of slender structures, leading to segmentation results that are inconsistent with the actual spatial morphology of the oil film.

[0007] The blockiness, boundary deviation, and lack of detail issues in the segmentation results mentioned above cannot be effectively corrected by relying solely on fixed morphological rules or simple threshold constraints, based on local grayscale distribution, boundary transition features, and background differences in SAR images. Furthermore, it is difficult to simultaneously preserve the integrity of the oil spill body and local details such as slender structures and internal voids. Therefore, after the detection model achieves oil spill location and SAM segmentation, how to further refine the segmentation results at the pixel level by combining local information from SAR images to improve weak boundary representation, preservation of internal voids, and retention of slender structures remains a problem that needs further improvement in existing technologies. Summary of the Invention

[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a post-attention enhancement fine segmentation method for SAR images with complex oil spill morphology.

[0009] Firstly, a method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphologies is provided, including:

[0010] S1. Acquire the original SAR image and preprocess it to obtain the SAR backscattering coefficient image;

[0011] S2. Input the SAR backscattering coefficient image into the target detection model to detect oil spill targets, filter and remove duplicates from the detection results, and obtain one or more oil spill target detection boxes.

[0012] S3. For each oil spill target detection box, expand the region based on the detection box to obtain an expanded ROI image. At the same time, use the detection box as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask.

[0013] S4. Input the extended ROI image and the initial oil spill mask into the image branch and mask branch respectively, extract image features and spatial features and fuse them to obtain fused features;

[0014] S5. Input the fused features into the post-attention module to perform channel and spatial attention enhancement to obtain the enhanced features;

[0015] S6. Perform pixel-level prediction based on the enhanced features to generate a fine-grained oil spill segmentation mask, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image; if there are multiple oil spill target detection boxes, generate corresponding fine-grained oil spill segmentation masks respectively, and merge them after spatial position restoration to obtain the final fine-grained oil spill segmentation result.

[0016] Preferably, in step S1, the preprocessing includes at least one of orbit correction, radiometric calibration, speckle noise suppression, and decibel reduction.

[0017] Preferably, in step S2, the screening and deduplication includes: performing confidence screening based on a preset confidence threshold, and performing overlapping box deduplication on the screened detection results based on a preset intersection-union ratio (IU) threshold.

[0018] Preferably, in step S3, the expansion is based on the center of the oil spill target detection frame, and the width and height of the oil spill target detection frame are increased according to a preset expansion ratio.

[0019] Preferably, in step S4, the image features include at least one of the following: grayscale difference between the oil spill dark spot and the surrounding sea background within the extended ROI region, local texture smoothness, dark spot continuity, and weak boundary transition features.

[0020] Preferably, in step S4, the spatial features include at least one of the following: the location of the oil spill object in the initial oil spill mask, the range of the main area, the initial outline, the regional connectivity, and the internal void distribution features.

[0021] Preferably, in step S6, for multiple oil spill segmentation masks corresponding to multiple oil spill target detection boxes, a union operation is used to merge them after spatial position restoration.

[0022] Preferably, step S7 is also included: comparing the refined oil spill segmentation results obtained in step S6 with the oil spill reference mask constructed based on manual visual interpretation, and using the intersection-union ratio to evaluate the segmentation accuracy.

[0023] Secondly, a SAR image post-attention enhancement fine segmentation system for complex oil spill morphologies is provided, for performing any of the methods described in the first aspect, including:

[0024] The acquisition module is used to acquire raw SAR images and perform preprocessing to obtain SAR backscattering coefficient images;

[0025] The first input module is used to input the SAR backscattering coefficient image into the target detection model for oil spill target detection, filter and deduplicate the detection results, and obtain one or more oil spill target detection boxes.

[0026] The extended segmentation module is used to expand the region based on each oil spill target detection box to obtain an expanded ROI image. At the same time, the detection box is used as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask.

[0027] The second input module is used to input the extended ROI image and the initial oil spill mask into the image branch and the mask branch respectively, extract image features and spatial features and fuse them to obtain fused features;

[0028] The third input module is used to input the fused features into the post-attention module for channel and spatial attention enhancement to obtain the enhanced features;

[0029] The generation module is used to perform pixel-level prediction based on the enhanced features, generate a fine-grained segmentation mask for oil spills, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image. If there are multiple oil spill target detection boxes, the corresponding fine-grained segmentation masks are generated respectively, and the spatial positions are restored and then merged to obtain the final fine-grained segmentation result of the oil spill.

[0030] Thirdly, a computer storage medium is provided, wherein a computer program is stored therein; when the computer program is run on a computer, the computer causes the computer to perform any of the methods described in the first aspect.

[0031] The beneficial effects of this invention are as follows: After YOLOv8 completes the oil spill target localization and SAM obtains the initial segmentation results, a post-CBAM attention enhancement module is introduced to jointly learn and adaptively enhance the image features in the extended ROI image and the spatial features in the initial mask. Since the YOLOv8 detection box and the initial SAM mask have already provided the approximate location and main range of the oil spill target, the post-CBAM can further utilize the gray-level differences, boundary transitions, and background changes in the local SAR image to enhance the effective response related to oil spill dark spots, weak boundaries, broken patches, and slender structures, and suppress interference responses such as nearshore background, oil film-like dark spots, and the outward expansion area of ​​the initial mask. Therefore, this invention can improve common problems in the initial SAM segmentation results, such as blockiness, excessively smoothed boundaries, local expansion, filling of internal gaps, and insufficient expression of slender structures, making the generated refined oil spill segmentation mask more closely fit the irregular spatial morphology of the real oil spill in the SAR image, providing more refined pixel-level information support for oil spill range delineation, area estimation, and emergency monitoring. Attached Figure Description

[0032] Figure 1 Schematic diagram of different typical oil spill patterns in SAR imagery;

[0033] Figure 2 This is an overall flowchart of the method of the present invention;

[0034] Figure 3 This is a schematic diagram of the post-CBAM attention enhancement method of the present invention;

[0035] Figure 4 Comparison chart of Sentinel-1IW / GRD data before and after processing in Mauritius on August 22, 2020;

[0036] Figure 5 SAR image detection and refined segmentation results of the Mauritius oil spill incident;

[0037] Figure 6 This is a visualization of the multi-class SAR target recognition and segmentation results of the method of the present invention on the M4D dataset. Detailed Implementation

[0038] The present invention will be further described below with reference to embodiments. The description of the embodiments below is only for the purpose of helping to understand the present invention. It should be noted that those skilled in the art can make several modifications to the present invention without departing from the principle of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

[0039] Example 1:

[0040] To address the issues that arise when SAR image target detection is combined with segmentation models for oil spill extraction, the results often exhibit overall blocky masks, unclear edge details, and easy loss of internal gaps and slender structures. Embodiment 1 of this invention provides a post-attention enhancement fine segmentation method for SAR images with complex oil spill morphologies, comprising the following steps S1 to S6:

[0041] S1, SAR image acquisition and preprocessing.

[0042] The raw SAR image is acquired and preprocessed to obtain a SAR backscattering coefficient image. The raw SAR image is a single-polarization, dual-polarization, or fully polarization SAR image. In this embodiment, the preprocessing includes at least one of orbit correction, radiometric calibration, speckle noise suppression, and decibel reduction, or may include all four processing methods simultaneously.

[0043] S2, Oil Spill Target Detection.

[0044] The SAR backscattering coefficient image obtained in step S1 is input into the target detection model for oil spill target detection. The detection results are then filtered and deduplicated to obtain one or more oil spill target detection boxes.

[0045] Specifically, the screening and deduplication include: screening based on a preset confidence threshold, and deduplicating overlapping boxes in the screened detection results based on a preset intersection-union (IoU) threshold. That is, removing detection boxes with confidence levels lower than the preset confidence threshold to obtain candidate oil spill detection boxes; calculating the IoU between candidate oil spill detection boxes, and retaining the candidate oil spill detection box with higher confidence level and removing the other candidate oil spill detection box when the IoU between two candidate oil spill detection boxes is greater than the preset IoU threshold.

[0046] S3, Extended ROI Image Extraction and Initial Oil Spill Mask Generation.

[0047] For each oil spill target detection box obtained in step S2, the region is expanded based on the detection box to obtain an expanded ROI image. At the same time, the detection box is used as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask.

[0048] The expansion is based on the center of the oil spill target detection frame, increasing the width and height of the frame according to a preset expansion ratio. In this embodiment, the segmentation model is the SAM model.

[0049] S4. Dual-branch feature extraction and fusion.

[0050] The extended ROI image and the initial oil spill mask obtained in step S3 are input into the image branch and the mask branch respectively. Image features and spatial features are extracted and fused to obtain fused features.

[0051] The image features include at least one of the following: grayscale difference between the oil spill dark spot and the surrounding sea surface background within the extended ROI region; local texture smoothness; dark spot continuity; and weak boundary transition features. The spatial features include at least one of the following: location of the oil spill object in the initial oil spill mask; main area range; initial contour; regional connectivity; and internal void distribution features.

[0052] In this step, image features and spatial features are concatenated along the channel dimension and then fused using a convolution operation to obtain fused features.

[0053] S5, enhanced post-position attention.

[0054] The fused features obtained in step S4 are input into the post-attention module for channel and spatial attention enhancement to obtain the enhanced features.

[0055] Specifically, the post-attention module includes a channel attention submodule and a spatial attention submodule. First, the fused features are input into the channel attention submodule to generate channel attention weights. Then, the channel attention weights are multiplied element-wise with the fused features to obtain the channel attention-enhanced features. Next, the channel attention-enhanced features are input into the spatial attention submodule to generate spatial attention weights. Finally, the spatial attention weights are multiplied element-wise with the channel attention-enhanced features to obtain the spatial attention-enhanced features, which are the enhanced features.

[0056] S6. Output of pixel-level prediction and segmentation results.

[0057] Pixel-level prediction is performed based on the enhanced features obtained in step S5 to generate a refined oil spill segmentation mask, and the spatial location is restored to the coordinate system of the SAR backscattering coefficient image obtained in step S1. If multiple oil spill target detection boxes exist, corresponding refined oil spill segmentation masks are generated for each, and the masks are merged after spatial location restoration to obtain the final refined oil spill segmentation result.

[0058] For multiple oil spill segmentation masks corresponding to multiple oil spill target detection boxes, a union operation is used to merge them after spatial position restoration.

[0059] Example 2:

[0060] Based on Example 1, Example 2 of the present invention provides a more specific method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphologies, including the following steps S1 to S6:

[0061] S1. Acquire the original SAR image and preprocess it to obtain the SAR backscattering coefficient image.

[0062] Specifically, in S1, SNAP software is used to preprocess the original SAR image. The preprocessing includes orbit correction, radiometric calibration, speckle noise suppression, and decibel reduction.

[0063] Among them, orbit correction uses precise orbit data to correct the orbit information of SAR images, thereby improving the positioning accuracy of the images.

[0064] Radiometric calibration converts the gray values ​​of each pixel in a SAR image into radar backscattering coefficients with explicit physical meaning; let the first... The digital quantization value of each pixel is The backscattering coefficient after radiation calibration is Then we have:

[0065]

[0066] in, Represents the first in SAR image One pixel, Indicates the first The digital quantization value of a pixel, Indicates the first The radiometric calibration coefficients corresponding to each pixel. Indicates the first The backscattering coefficients corresponding to each pixel.

[0067] The Lee Sigma filtering method was used to suppress speckle noise, with the filtering window set to 7×7, in order to reduce the interference of speckle noise in SAR images on subsequent oil spill detection and fine segmentation.

[0068] Decibel conversion is the process of converting the backscattering coefficient into a decibel scale; let the first... The pixel value after decibel conversion is Then we have:

[0069]

[0070] in, Indicates the first The backscattering coefficient of each pixel, Indicates the first The pixel value after decibel processing.

[0071] S2. Input the SAR backscattering coefficient image into the target detection model to detect oil spill targets, filter and remove duplicates from the detection results, and obtain one or more oil spill target detection boxes.

[0072] The target detection model adopts the YOLOv8 model. The YOLOv8 target detection model performs target localization and category determination on the preprocessed SAR backscattering coefficient image, and outputs one or more oil spill target detection boxes after confidence filtering and overlapping box deduplication.

[0073] The confidence screening process includes: setting a pre-set confidence threshold, removing detection boxes with confidence levels lower than the pre-set confidence threshold, and obtaining candidate oil spill detection boxes.

[0074] The deduplication of overlapping boxes includes: setting a preset crossover ratio (IoU) threshold, calculating the IoU between candidate oil spill detection boxes, and determining that there is overlap between the two when the IoU between two candidate oil spill detection boxes is greater than the preset IoU threshold, retaining the candidate oil spill detection box with higher confidence and removing the other candidate oil spill detection box.

[0075] Among them, the Each oil spill target detection box is denoted as It is determined by the coordinates of the upper left corner of the detection frame, as well as the width and height of the detection frame. Used for extended ROI image generation and detection box prompts for the SAM model in S3.

[0076] S3. For each oil spill target detection box, expand the region based on the detection box to obtain an expanded ROI image. At the same time, use the detection box as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask.

[0077] S3 includes:

[0078] S301. For each oil spill target detection box obtained in S2, expand it according to a preset expansion ratio based on the oil spill target detection box, so that the expanded area includes the main body of the oil spill target, the transition area of ​​the target boundary and the background area of ​​the adjacent sea surface, and crop the expanded ROI image from the SAR backscattering coefficient image.

[0079] Specifically, in S301, according to the first Oil spill target detection box Expand the detection frame outwards from its surrounding area. Using the center as a reference, the width and height of the detection box are expanded according to a preset ratio, and the side length of the expanded ROI is not less than the preset minimum side length. Then, the expanded ROI image is obtained by cropping from the SAR backscattering coefficient image according to the expanded range. The extended ROI image The image includes the main oil spill target, the target boundary transition region, and the adjacent sea surface background region, in order to provide SAR local contextual information for the image branch of the post-CBAM attention enhancement module. The post-CBAM attention enhancement module includes an image branch, a mask branch, a feature fusion unit, and the post-CBAM attention module.

[0080] S302. For each oil spill target detection box obtained in S2, use the oil spill target detection box as a detection box prompt for the segmentation model, perform initial segmentation on the SAR backscattering coefficient image, and obtain the initial oil spill mask corresponding to the oil spill target detection box.

[0081] Specifically, in S302, the first Oil spill target detection box As a detection bounding box cue for the SAM model, the preprocessed SAR backscattering coefficient image is initially segmented to obtain the corresponding initial oil spill mask, denoted as . The initial oil spill mask It is used as the mask branch input in the post-CBAM attention enhancement module to extract spatial features corresponding to the subject extent, initial contour, foreground / background distribution, and connectivity structure in the initial segmentation results.

[0082] S4. Input the extended ROI image and the initial oil spill mask into the image branch and mask branch respectively, extract image features and spatial features and fuse them to obtain fused features.

[0083] S4 includes:

[0084] S401. Input the extended ROI image obtained in S301 into the image branch, and extract image features through convolutional coding. The image features include the grayscale difference between the oil spill dark spot and the surrounding sea background in the extended ROI region, local texture smoothness, dark spot continuity, and weak boundary transition features.

[0085] S402. Input the initial oil spill mask obtained in S302 into the mask branch, and extract spatial features through convolutional coding. The spatial features include the location of the oil spill object in the initial oil spill mask, the range of the main area, the initial outline, the spatial connection relationship between the oil spill object areas, and the gaps, fractures and their spatial distribution relationship inside the oil spill object.

[0086] S403. The image features obtained in S401 and the spatial features obtained in S402 are concatenated in the channel dimension and fused through convolution to obtain fused features; the fused features simultaneously contain SAR local image information and spatial representation information obtained by encoding the initial oil spill mask.

[0087] S5. Input the fused features into the post-CBAM attention module for channel and spatial attention enhancement to obtain the enhanced features.

[0088] Specifically, S5 includes:

[0089] S501. Input the fusion features obtained in S403 into the channel attention submodule in the post-CBAM attention module to generate channel attention weights, and multiply the channel attention weights with the fusion features element by element to adaptively recalibrate the fusion feature responses of different channels to obtain the channel attention-enhanced features.

[0090] For example, for the fusion features of the input The channel attention weights can be expressed as:

[0091]

[0092] in, Indicates channel attention weights. Indicates global average pooling. Indicates global max pooling. Indicates a shared multilayer perceptron. express Activation function.

[0093] Features enhanced by channel attention are denoted as Then we have:

[0094]

[0095] in, This indicates element-wise multiplication.

[0096] S502. Input the channel attention-enhanced features obtained in S501 into the spatial attention submodule in the post-CBAM attention module to generate spatial attention weights. Multiply the spatial attention weights element-wise with the channel attention-enhanced feature representation to adaptively recalibrate the feature responses at different spatial locations and obtain the spatial attention-enhanced features. The spatial attention-enhanced features are used for mask generation.

[0097] For example, for the channel attention-enhanced features of the input. Spatial attention weights can be expressed as:

[0098]

[0099] in, Represents spatial attention weights. and These represent average pooling and max pooling along the channel dimension, respectively. Indicates feature splicing, Indicates the kernel size as The convolution operation.

[0100] Features enhanced by spatial attention are denoted as Then we have:

[0101]

[0102] Figure 3 A schematic diagram of the structure of the rear-mounted CBAM attention enhancement module is shown. Figure 3 As shown, the extended ROI image and initial oil spill mask The image coding branch and mask coding branch are input separately. After feature extraction, they are concatenated and fused through a feature fusion unit to obtain the fused features. The fusion feature After sequentially enhancing channel attention and spatial attention, the attention-enhanced features are obtained. .

[0103] S6. Perform pixel-level prediction based on the enhanced features to generate a fine-grained oil spill segmentation mask, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image; if there are multiple oil spill target detection boxes, generate corresponding fine-grained oil spill segmentation masks respectively, and merge them after spatial position restoration to obtain the final fine-grained oil spill segmentation result.

[0104] Specifically, based on the attention-enhanced features obtained from S5 Perform pixel-level prediction to generate the first... An oil spill segmentation mask corresponding to each extended ROI image. The oil spill segmentation mask is then applied according to the corresponding extended ROI region. The spatial locations in the preprocessed SAR backscattering coefficient image are reconstructed using coordinates. If S2 obtains multiple oil spill target detection boxes, oil spill segmentation masks corresponding to each extended ROI region are generated and restored to the SAR backscattering coefficient image before being merged to obtain the final oil spill segmentation result.

[0105] S7. In the real oil spill SAR image evaluation scenario, the refined oil spill segmentation result obtained in S6 is compared with the oil spill reference mask constructed based on manual visual interpretation, and the segmentation accuracy of the refined oil spill segmentation result is evaluated by Intersection over Union (IoU).

[0106] Specifically, in S7, the accuracy evaluation is used to quantitatively verify the refined oil spill segmentation results obtained in S6 in a real oil spill SAR image evaluation scenario. Since real oil spill SAR images typically lack directly obtainable objective pixel-level ground truth masks, this invention uses an oil spill reference mask constructed based on manual visual interpretation as an evaluation reference. The manual visual interpretation process combines the low backscattering characteristics, boundary morphology, spatial continuity, and background differences of the adjacent sea surface of the oil spill dark spot in the SAR image to interpret and plot the oil spill area, thus obtaining the oil spill reference mask.

[0107] Furthermore, the Intersection over Union (IoU) is used to characterize the degree of overlap between the refined oil spill segmentation results and the oil spill reference mask. A higher IoU value indicates a higher consistency between the refined oil spill segmentation results and the visual interpretation reference results. The formula for calculating the IoU is:

[0108]

[0109] in, This represents the refined oil spill segmentation mask output by the method of the present invention. This represents an oil spill reference mask constructed based on manual visual interpretation. This indicates the number of pixels in the area where the two intersect. This indicates the number of pixels in the union region of the two.

[0110] It should be noted that the parts in this embodiment that are the same as or similar to those in Embodiment 1 can be referred to each other, and will not be repeated in this application.

[0111] Example 3:

[0112] Based on Example 2, Example 3 of the present invention provides a more specific method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphology.

[0113] This embodiment uses Sentinel-1IW / GRD Mauritius nearshore SAR data acquired on August 22, 2020, as the data to be processed to illustrate the implementation process of the SAR image oil spill fine segmentation method based on post-CBAM attention enhancement described in this invention in a real marine oil spill scenario. This embodiment includes the following steps:

[0114] Step 1: SAR Image Acquisition and Preprocessing

[0115] Nearshore SAR data from Sentinel-1IW / GRD Mauritius, acquired on August 22, 2020, was preprocessed using SNAP software. The preprocessing included orbit correction, radiometric calibration, speckle noise suppression, and decibel reduction.

[0116] Among them, orbit correction is used to correct the orbit information of SAR images; radiometric calibration is used to convert SAR image pixel values ​​into backscattering coefficients; speckle noise suppression adopts the Lee Sigma filtering method with a filtering window set to 7×7 to reduce speckle noise interference in SAR images; and decibel scaling is used to convert backscattering coefficients into decibel scales.

[0117] After preprocessing, the preprocessed SAR backscattering coefficient image is cropped according to the nearshore oil spill area of ​​Mauritius to obtain the input SAR image in this embodiment. Figure 4 The comparison results before and after Sentinel-1IW / GRD data processing in this embodiment are shown. Through the above preprocessing, speckle noise and radiation scale differences in SAR images are suppressed, and backscattering intensity is uniformly converted to a decibel scale, making the grayscale differences and boundary transition features between the oil spill dark spot and the adjacent sea surface background more stable. This preprocessing result serves as the input for subsequent YOLOv8 target detection, SAM initial segmentation, and the image branch of the post-CBAM attention enhancement module, which helps to reduce the impact of noise and scale inconsistency on oil spill detection and refined segmentation.

[0118] Step 2: Obtaining the target detection box for the oil spill

[0119] The preprocessed SAR backscattering coefficient image obtained in step 1 is input into the YOLOv8 target detection model to locate and classify oil spill targets in the image, thus obtaining oil spill target detection boxes. After confidence filtering and deduplication of overlapping boxes, the detection results output by the YOLOv8 target detection model retain 8 oil spill target detection boxes in this embodiment.

[0120] The eight oil spill target detection boxes are mainly distributed in the dark spot area of ​​the oil spill near the coast of Mauritius and its adjacent local areas. Figure 5 Part a in the figure shows the oil spill target detection results in this embodiment.

[0121] Step 3: Expand ROI image extraction

[0122] Based on the oil spill target detection boxes obtained in step 2, the surrounding areas of each detection box are expanded, and the corresponding expanded ROI images are cropped from the preprocessed SAR backscattering coefficient image obtained in step 1.

[0123] In this embodiment, the preset expansion ratio is 1.2, meaning that the width and height of each oil spill target detection box are expanded to 1.2 times their original width and height, respectively, using the center of each detection box as a reference. The expanded ROI image is then cropped from the preprocessed SAR backscattering coefficient image based on the expanded range. The expanded ROI image includes the main oil spill target, the target boundary transition region, and the adjacent sea surface background region, and is used as the image branch input in the post-CBAM attention enhancement module. Figure 5 Part b in the figure shows the oil spill extended ROI image in this embodiment.

[0124] Step 4: Initial oil spill mask generation using SAM

[0125] The oil spill target detection boxes obtained in step 2 are used as detection box cues for the SAM model. Initial segmentation is performed on the preprocessed SAR backscattering coefficient image obtained in step 1 to obtain initial oil spill masks corresponding to each detection box. The initial oil spill mask corresponds to the same oil spill target detection box as the expanded ROI image in step 3. The initial oil spill mask is generated by using this detection box as a detection box cue for the SAM model, and the expanded ROI image is obtained by extending and cropping the detection box.

[0126] When the input is subsequently processed by the post-CBAM attention enhancement module, the initial oil spill mask remains in the coordinate system of the preprocessed SAR backscattering coefficient image. Based on the cropping coordinates corresponding to the extended ROI image, a local mask corresponding to the extended ROI image is obtained from the initial oil spill mask and used as the mask branch input. This local mask and the extended ROI image cover the same spatial region in the SAR backscattering coefficient image, therefore they correspond in spatial location.

[0127] Specifically, the YOLOv8 detection box Bj, the extended ROI image Rj, and the initial SAM mask Mj are all generated based on the same preprocessed SAR backscattering coefficient image, and therefore reside in the same pixel coordinate system. For the j-th target: the YOLOv8 output detection box Bj=(x1j,y1j,x2j,y2j); based on the center and width / height of Bj, the extended ROI window Rj=(x1j′,y1j′,x2j′,y2j′) is calculated according to a preset expansion ratio; the extended ROI image is obtained by cropping from the SAR backscattering coefficient image based on Rj; the same detection box Bj is used as the SAM cue to obtain the initial oil spill mask Mj corresponding to the target.

[0128] Since Rj is obtained by expanding Bj, and Mj is also generated from the same Bj prompt, the two have a common target center and spatial correspondence in the original SAR image coordinate system.

[0129] Subsequently, the expanded ROI image and the local mask are adjusted to the same preset input size and then input into the image branch and mask branch respectively. Since the expanded ROI image sizes corresponding to different oil spill target detection boxes are different, in order to ensure that the post-CBAM attention enhancement module can adopt a unified network input format and that the features of the image branch and mask branch can be stitched and fused in the channel dimension, this embodiment adjusts both the expanded ROI image and the corresponding local mask to the same preset input size. In this embodiment, the preset input size is 256×256 pixels.

[0130] In this embodiment, the SAM model can obtain the approximate main area of ​​the oil spill target based on the detection box prompts. However, due to nearshore background interference, sea surface scattering variations, and weak contrast at the oil film boundary in the Mauritius nearshore SAR image, the initial oil spill mask appears as a blocky whole in some areas, with problems such as excessively smoothed boundaries, local outward expansion, filling of internal gaps, and insufficient expression of local slender structures. Figure 5 Section c shows the initial oil spill mask output by the SAM model.

[0131] Steps 5 to 9: Dual-branch feature extraction, feature fusion, and post-CBAM attention enhancement

[0132] The expanded ROI image obtained in step 3 and the initial oil spill mask obtained in step 4 are jointly input into the post-CBAM attention enhancement module. The post-CBAM attention enhancement module includes an image branch, a mask branch, a feature fusion unit, and a post-CBAM attention module. Specifically, the expanded ROI image serves as the input to the image branch, providing SAR local image information of the oil spill target and its adjacent area; the initial oil spill mask serves as the input to the mask branch, providing prior spatial information about the target obtained by the SAM model under the guidance of the detection bounding box.

[0133] In this embodiment, the image branch consists of four convolutional units connected in sequence, each using a 3×3 kernel, with output channels of 32, 32, 64, and 64 respectively. The mask branch consists of two convolutional units connected in sequence, each using a 3×3 kernel and with 32 output channels. Each convolutional unit includes a convolutional layer, a batch normalization layer, and a ReLU activation layer, while maintaining the spatial dimensions of the input features. Thus, the image branch encodes the expanded ROI image into 64-channel ROI image features, and the mask branch encodes the initial oil spill mask into 32-channel initial mask spatial features.

[0134] In the image branch, convolutional feature extraction is performed on the extended ROI image to obtain ROI image features. The ROI image features in this embodiment mainly include four types of specific features: First, low backscattering grayscale features of the oil spill dark spot region, used to characterize the dark spot response of the oil slick region relative to the surrounding sea surface; second, grayscale transition features at the edge of the oil spill dark spot, used to characterize the position where the oil slick boundary transitions from the dark spot region to the adjacent sea surface background; third, local low scattering continuity features within the oil spill body, used to characterize the continuous dark spot distribution of the oil slick body region in the SAR image; and fourth, scattering difference features between the nearshore background and the sea surface background, used to distinguish the response differences between the land and shoal backgrounds and the actual oil spill dark spot in the nearshore area of ​​Mauritius.

[0135] In the masking branch, convolutional feature extraction is performed on the initial oil spill mask of SAM to obtain the initial mask spatial features. The initial mask spatial features in this embodiment mainly include three types of specific features: first, the location features of the oil spill target, used to determine the approximate spatial range of the oil spill target in the extended ROI; second, initial contour features, used to characterize the target boundary position in the initial segmentation result; and third, region connectivity features, used to characterize the spatial connection relationship between each foreground region in the initial SAM mask. For internal breaks and voids in the oil film that were not preserved in the initial SAM segmentation result, their location features are not extracted separately by the masking branch. Instead, they are identified in the subsequent feature fusion process by the difference between the initial mask spatial features and the ROI image features at corresponding positions, thereby providing feature basis for correcting incorrectly filled internal gaps, incorrect connections, and local outward expansion of boundaries in the initial mask.

[0136] Subsequently, image features and spatial features are concatenated along the channel dimension and fused using convolution to obtain a fused feature. This fused feature does not rely solely on the initial SAM mask, nor solely on the SAR grayscale image. Instead, it jointly represents the true grayscale distribution of the oil spill dark spot, the boundary transition position, and the nearshore background scattering difference within the same ROI, along with the main body position, initial contour, blocky connected regions, and internal void-filling regions provided by the SAM. Through this fusion process, the main body region in the initial mask is constrained by the true low backscattering dark spot distribution in the ROI image; the boundary expansion region in the initial mask corresponds to the grayscale transition position in the SAR image; and the filled internal voids in the initial mask correspond to the local grayscale variation regions in the ROI image.

[0137] After obtaining the fused features, they are input into the post-CBAM attention module for enhancement. First, the channel attention submodule adaptively weights the responses of different channels in the fused features. In this embodiment, channel attention is used to enhance feature channels related to low backscattering dark spots in oil spills, gray-scale transitions at dark spot edges, oil film breakage structures, and slender tail structures, while suppressing feature channels related to nearshore land scattering, shallow water background scattering, local sea surface scattering fluctuations, and the blocky outward expansion region of the initial SAM mask. After channel attention processing, the responses in the fused features related to the actual oil spill area are enhanced, while the responses related to the non-oil spill background and the mis-included region of the initial mask are weakened.

[0138] Then, the enhanced features of the channel are adaptively weighted spatially using a spatial attention submodule. In this embodiment, spatial attention focuses on enhancing four types of locations: first, the weak boundary between the oil spill and the adjacent sea surface; second, the locations of fractures and voids within the oil slick; third, the locations of locally broken oil slick patches; and fourth, the ends and edges of slender trailing structures. Spatial attention also reduces the response of two types of locations: first, areas extending outwards into the nearshore background in the initial SAM mask; and second, non-oil spill areas incorrectly connected due to overall blockiness in the initial mask. After spatial attention processing, the enhanced features are more spatially concentrated in the actual oil spill and its boundary details in the SAR image.

[0139] After the aforementioned image branch feature extraction, mask branch feature extraction, dual-branch feature fusion, channel attention enhancement, and spatial attention enhancement, the post-CBAM attention enhancement module outputs attention enhancement features for pixel-level prediction. These attention enhancement features simultaneously preserve the spatial extent of the oil spill subject given by the initial SAM mask and utilize low backscattering dark spots, boundary grayscale transitions, internal breaks, and elongated tail responses in the extended ROI image to constrain and correct the initial mask.

[0140] In this embodiment, after post-CBAM attention enhancement, Figure 5 In section c, the overall blocky region in the initial SAM oil spill mask is refined, the mis-inclusion region near the nearshore background is weakened, the oil spill boundary is more consistent with the edge of the dark spot in the SAR image, the voids inside the oil film are preserved, and the local broken patches and slender tail structures are more clearly expressed. The attention enhancement features are generated after subsequent pixel-level prediction. Figure 5 The refined segmentation result of the oil spill is shown in part d.

[0141] Step 10: Generation of refined oil spill segmentation results

[0142] Steps 3 through 9 are performed on the eight oil spill target detection boxes retained in step 2 to obtain the oil spill segmentation mask corresponding to each detection box. Subsequently, based on the spatial location of each extended ROI in the input SAR image, the corresponding oil spill segmentation mask is restored to the coordinate system of the input SAR image, and the oil spill segmentation masks corresponding to multiple detection boxes are combined into the oil spill segmentation result of the entire image.

[0143] Depend on Figure 5 part c in Figure 5 As can be seen from the comparison of part d in the model, the initial oil spill mask directly output by the SAM model can cover the main oil spill area, but there are problems of blocky expansion and inaccurate boundaries in the nearshore area and local weak boundary areas. After processing by the post-CBAM attention enhancement module, the boundary of the refined oil spill segmentation mask is more consistent with the distribution of oil spill dark spots in the SAR image, the internal gaps and local broken areas are better preserved, and the expression of slender structures and irregular boundaries is clearer.

[0144] Through the above steps, this embodiment demonstrates that the method of the present invention can be applied to the SAR image processing of a real marine oil spill event in Mauritius. Based on YOLOv8 detection and SAM initial segmentation, it can improve the block segmentation, boundary deviation, and local detail loss problems in the initial oil spill mask by expanding the joint input of the ROI image and the initial oil spill mask and applying post-CBAM attention enhancement, thereby obtaining a more refined oil spill segmentation result that conforms to the actual spatial distribution of oil film.

[0145] Step 11: Evaluation of oil spill segmentation accuracy

[0146] To quantitatively evaluate the segmentation effect of the method of the present invention on the real oil spill SAR image of Mauritius described in this embodiment, considering the lack of an objective pixel-level ground truth mask in the real oil spill SAR image, an oil spill reference mask constructed based on manual visual interpretation is used as the evaluation reference. Specifically, the oil spill area is visually interpreted and plotted by combining the low backscattering characteristics, boundary morphology, spatial continuity, and background differences of the adjacent sea surface of the oil spill dark spot in the SAR image to obtain the oil spill reference mask. The refined oil spill segmentation result obtained by the method of the present invention is compared with the oil spill reference mask, and the intersection-over-union ratio (IoU) is used as the evaluation index. The IoU is used to characterize the degree of overlap between the predicted segmentation mask and the oil spill reference mask. The larger the IoU value, the higher the consistency between the segmentation result and the visual interpretation reference result.

[0147] On a SAR image of Mauritius dated August 22, 2020, the IoU of the initial SAM segmentation result was 0.3936, while the IoU of the refined oil spill segmentation result obtained by the method of this invention was 0.6065. This demonstrates that, compared to the initial SAM segmentation result, the method of this invention can improve the consistency between the oil spill segmentation result and the manually labeled mask, indicating that the bi-branch feature learning of the extended ROI image and the initial oil spill mask, as well as the post-processed CBAM attention enhancement, are effective for refined oil spill segmentation.

[0148] To further verify the applicability of the post-CBAM attention enhancement mechanism described in this invention in scenarios containing oil spills and similar SAR targets, this embodiment uses multi-class SAR images from the Multimodal Data Fusion and Analysis (M4D) dataset for segmentation performance comparison. The M4D dataset, created by Krestenitis et al., is a multi-class semantic segmentation dataset specifically for SAR image oil spill detection, including categories such as oil spills, oil slicks, land, and ships, aiming to advance the development of oil spill detection technology. This dataset is supported by geographic coordinates and timestamps provided by the European Maritime Safety Authority's CleanSeaNet service and contains 1112 SAR images of size 650×1250 pixels, with 1002 images in the training set and 110 images in the test set.

[0149] This embodiment selects several typical SAR image examples from the M4D dataset to visualize the multi-class target recognition and segmentation results of the method of this invention, such as... Figure 6 As shown. Figure 6 In this diagram, each row corresponds to a sample result, and the three columns represent the original SAR image, the target recognition visualization result, and the mask result displayed by category. This embodiment uses the manually annotated ground truth provided by the M4D dataset as the judgment benchmark, comparing the prediction results of the method of this invention with the ground truth for each sample. The comparison shows that the predicted category and mask region of the method of this invention in each sample are consistent with the ground truth annotation. The mask result and recognition result use different colors to distinguish different target categories: red for oil spills, yellow for oil slicks, blue for ships, and green for land; the rectangles in the recognition result represent the detection and localization results of the corresponding target category. Figure 6As can be seen, the method of this invention can distinguish targets such as oil spills, oil slicks, ships, and land in different SAR imaging scenarios, and can display the detection and localization results in correspondence with pixel-level segmentation results. For irregularly shaped oil spills and oil slicks, the method of this invention can preserve the main spatial distribution morphology of the targets; for small-scale or scattered ship targets, it can also provide corresponding detection and masking results; for nearshore land areas, the method can distinguish them from dark spot-like targets on the sea surface. The above visualization comparison verification results based on ground truth annotation of the M4D dataset qualitatively demonstrate that the method of this invention has good target recognition and segmentation capabilities in M4D multi-class SAR target scenarios.

[0150] Based on the above qualitative visualization analysis, in order to further quantitatively evaluate the segmentation performance of the method of the present invention on multi-category SAR targets, this embodiment adopts intersection-union ratio (IU). and average intersection ratio As an evaluation metric. For the first The intersection-union ratio (IU) of the following categories is defined as:

[0151]

[0152] in, Indicates the first Predictive segmentation mask for each category, This indicates the corresponding manually labeled mask.

[0153] To ensure consistency in the comparison objects between different methods, this embodiment only calculates the average crossover ratio (CVR) for four categories: oil spills, oil slicks, ships, and land, denoted as . The calculation formula is as follows:

[0154]

[0155] This embodiment compares the method of the present invention with the YOLOv8-SAM method and the SAM-OIL method. YOLOv8-SAM is a baseline method based on the concatenation of a target detector and the original frozen SAM, and its mask fusion employs a random strategy. SAM-OIL is an improved method that introduces a learnable adapter module and an ordered mask fusion (OMF) module on top of YOLOv8-SAM. The comparison results are shown in Table 1.

[0156] Table 1. Comparison of multi-class segmentation performance between the proposed method and the comparative method on the M4D dataset.

[0157]

[0158] The above results demonstrate that the method of this invention can output segmentation results for oil spills, oil slicks, ships, and land targets in the multi-class SAR target segmentation comparison of the M4D dataset. Specifically, for oil spills, the crossover ratio (CRR) of the method of this invention (58.33%) is higher than that of the YOLOv8-SAM method (41.84%) and the SAM-OIL method (51.60%), indicating that the post-CBAM attention enhancement mechanism has a targeted improvement effect on oil spill target segmentation. For ships, the method of this invention also achieves a high CRR (56.85%), outperforming the two comparison methods. In terms of average CRR, the method of this invention (62.20%) is higher than that of the YOLOv8-SAM method (57.53%) and is at a similar level to the SAM-OIL method (62.89%). This shows that the method of this invention is not only applicable to the real oil spill SAR image processing in Example 1, but also maintains a certain segmentation performance in experimental datasets containing multiple types of SAR targets, thus verifying the applicability of the post-CBAM attention enhancement mechanism.

[0159] It should be noted that the parts in this embodiment that are the same as or similar to those in Embodiment 2 can be referred to each other, and will not be repeated in this application.

[0160] Example 4:

[0161] Based on Example 2, Example 4 of the present invention provides a SAR image post-attention enhancement fine segmentation system for complex oil spill morphologies, including:

[0162] The acquisition module is used to acquire raw SAR images and perform preprocessing to obtain SAR backscattering coefficient images;

[0163] The first input module is used to input the SAR backscattering coefficient image into the target detection model for oil spill target detection, filter and deduplicate the detection results, and obtain one or more oil spill target detection boxes.

[0164] The extended segmentation module is used to expand the region based on each oil spill target detection box to obtain an expanded ROI image. At the same time, the detection box is used as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask.

[0165] The second input module is used to input the extended ROI image and the initial oil spill mask into the image branch and the mask branch respectively, extract image features and spatial features and fuse them to obtain fused features;

[0166] The third input module is used to input the fused features into the post-attention module for channel and spatial attention enhancement to obtain the enhanced features;

[0167] The generation module is used to perform pixel-level prediction based on the enhanced features, generate a fine-grained segmentation mask for oil spills, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image. If there are multiple oil spill target detection boxes, the corresponding fine-grained segmentation masks are generated respectively, and the spatial positions are restored and then merged to obtain the final fine-grained segmentation result of the oil spill.

[0168] It should be noted that the system provided in this embodiment is the system corresponding to the method provided in embodiment 2. Therefore, the parts that are the same as or similar to those in embodiment 2 in this embodiment can be referred to each other, and will not be described again in this application.

Claims

1. A method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphologies, characterized in that, include: S1. Acquire the original SAR image and preprocess it to obtain the SAR backscattering coefficient image; S2. Input the SAR backscattering coefficient image into the target detection model to detect oil spill targets, filter and remove duplicates from the detection results, and obtain one or more oil spill target detection boxes. S3. For each oil spill target detection box, expand the region based on the detection box to obtain an expanded ROI image. At the same time, use the detection box as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask. S4. Input the extended ROI image and the initial oil spill mask into the image branch and mask branch respectively, extract image features and spatial features and fuse them to obtain fused features; S5. Input the fused features into the post-attention module to perform channel and spatial attention enhancement to obtain the enhanced features; S6. Perform pixel-level prediction based on the enhanced features to generate a fine-grained oil spill segmentation mask, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image; if there are multiple oil spill target detection boxes, generate corresponding fine-grained oil spill segmentation masks respectively, and merge them after spatial position restoration to obtain the final fine-grained oil spill segmentation result.

2. The method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphology as described in claim 1, characterized in that, In step S1, the preprocessing includes at least one of orbit correction, radiometric calibration, speckle noise suppression, and decibel reduction.

3. The SAR image post-attention enhancement fine segmentation method for complex oil spill morphology according to claim 2, characterized in that, In step S2, the filtering and deduplication includes: performing confidence filtering based on a preset confidence threshold, and performing overlapping box deduplication on the filtered detection results based on a preset intersection-union threshold.

4. The SAR image post-attention enhancement fine segmentation method for complex oil spill morphology according to claim 3, characterized in that, In step S3, the expansion is based on the center of the oil spill target detection frame, and the width and height of the oil spill target detection frame are increased according to a preset expansion ratio.

5. The SAR image post-attention enhancement fine segmentation method for complex oil spill morphology according to claim 4, characterized in that, In step S4, the image features include at least one of the following: grayscale difference between the oil spill dark spot and the surrounding sea background within the extended ROI region, local texture smoothness, dark spot continuity, and weak boundary transition features.

6. The SAR image post-attention enhancement fine segmentation method for complex oil spill morphology according to claim 5, characterized in that, In step S4, the spatial features include at least one of the following: the location of the oil spill object in the initial oil spill mask, the main area range, the initial outline, the regional connectivity relationship, and the internal void distribution features.

7. The SAR image post-attention enhancement fine segmentation method for complex oil spill morphology according to claim 6, characterized in that, In step S6, multiple oil spill segmentation masks corresponding to multiple oil spill target detection boxes are merged using a union operation after spatial position restoration.

8. The method for fine segmentation of SAR images with post-attention enhancement for complex oil spill morphology as described in claim 6, characterized in that, It also includes step S7: comparing the refined oil spill segmentation results obtained in step S6 with the oil spill reference mask constructed based on manual visual interpretation, and using cross-union ratio to evaluate the segmentation accuracy.

9. A SAR image post-attention enhancement fine segmentation system for complex oil spill morphologies, characterized in that, For performing the method as described in any one of claims 1 to 8, comprising: The acquisition module is used to acquire raw SAR images and perform preprocessing to obtain SAR backscattering coefficient images; The first input module is used to input the SAR backscattering coefficient image into the target detection model for oil spill target detection, filter and deduplicate the detection results, and obtain one or more oil spill target detection boxes. The extended segmentation module is used to expand the region based on each oil spill target detection box to obtain an expanded ROI image. At the same time, the detection box is used as a cue for the segmentation model to perform initial segmentation to obtain an initial oil spill mask. The second input module is used to input the extended ROI image and the initial oil spill mask into the image branch and the mask branch respectively, extract image features and spatial features and fuse them to obtain fused features; The third input module is used to input the fused features into the post-attention module for channel and spatial attention enhancement to obtain the enhanced features; The generation module is used to perform pixel-level prediction based on the enhanced features, generate a fine-grained segmentation mask for oil spills, and restore the spatial position to the coordinate system of the SAR backscattering coefficient image. If there are multiple oil spill target detection boxes, the corresponding fine-grained segmentation masks are generated respectively, and the spatial positions are restored and then merged to obtain the final fine-grained segmentation result of the oil spill.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer program; when the computer program is run on the computer, it causes the computer to perform the method described in any one of claims 1 to 8.