Sea surface oil spill detection method and device based on improved U-Net collaborative coding and multi-scale interactive fusion

By combining an improved U-Net co-coding and multi-scale interactive fusion method with convolution and Transformer branching, the problems of boundary breakage and misjudgment in marine oil spill detection are solved, and high-precision automated detection of marine oil spills is achieved.

CN121884115APending Publication Date: 2026-04-17DALIAN MARITIME UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN MARITIME UNIVERSITY
Filing Date
2025-12-22
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing methods for detecting oil spills on the sea surface have limited generalization capabilities under complex sea conditions and varying lighting conditions. They are unable to simultaneously capture long-distance global dependencies and local details, resulting in discontinuous oil spill debris, broken boundaries, and a high rate of false positives.

Method used

An improved U-Net co-coding and multi-scale interactive fusion method is adopted, which combines convolutional and Transformer branches. Through pixel-token bidirectional interaction and adaptive gating fusion, a unified modeling of global semantics and local details is achieved. The method is optimized by a weighted combination of cross-entropy and Dice loss function.

Benefits of technology

It improves the accuracy and robustness of oil spill detection on the sea surface, maintains the integrity of the film boundary, reduces the rate of missed detection and false judgment, and is suitable for automated detection of visible light or infrared images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884115A_ABST
    Figure CN121884115A_ABST
Patent Text Reader

Abstract

The invention discloses a sea surface oil spill detection method and device based on improved U-Net collaborative coding and multi-scale interactive fusion, and relates to the field of maritime affair supervision and marine ecological environment monitoring. The method comprises the following steps: acquiring a sea surface image and carrying out pixel-level labeling and data enhancement; the method comprises the following steps: constructing a dual-branch collaborative encoder consisting of a ResNet50 convolution branch and a TransNeXt Transform branch, introducing an interactive fusion module at each level, and realizing bidirectional interaction and pixel-by-pixel weighted fusion of local-global features through parallel cavity convolution, global average pooling, cross-scale attention and an adaptive gating mechanism; and recovering the spatial resolution by adopting a step-by-step up-sampling decoder and outputting an oil spill segmentation mask. According to the method, the detection precision and robustness under complex sea conditions, weak contrast and similar oil spill interference conditions can be remarkably improved, and the method can be widely applied to real-time oil spill monitoring of unmanned aerial vehicles, satellites and shore-based monitoring systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of maritime supervision and marine ecological environment monitoring. Specifically, it relates to a method and device for detecting oil spills on the sea surface based on improved U-Net collaborative coding and multi-scale interactive fusion. Background Technology

[0002] With the increasing frequency of global offshore oil transportation, extraction, and loading / unloading operations, the risk of oil spills at sea continues to rise. Oil spills not only cause enormous economic losses but also inflict long-term and irreversible damage on the marine ecosystem, nearshore fisheries, and tourism. Traditional methods such as manual patrols, ship sampling, or shore-based lookouts suffer from drawbacks such as slow response, high costs, narrow field of view, and significant susceptibility to weather and sea conditions, making them insufficient to meet the urgent need for "wide-area, all-weather, near-real-time" monitoring.

[0003] In recent years, automated methods such as satellite remote sensing, UAV aerial surveying, and shore-based visible light / infrared video monitoring have been gradually applied to oil spill patrols at sea. However, the amount of image data acquired is enormous, and oil spill films often appear as weak-contrast, irregular fragments, and are highly similar to "oil spill-like" interference targets such as biofilms, wave shadows, suspended sediment, and solar flares. This results in low efficiency and a high misjudgment rate when relying solely on manual interpretation. Therefore, developing artificial intelligence methods that can automatically and accurately detect and segment oil spill areas from visible light or infrared images has become a core technological requirement in the fields of maritime supervision and marine ecological environment monitoring.

[0004] Among existing deep learning-based oil spill detection patents, Chinese patent application CN202311202507.0 discloses a marine oil spill detection method based on an improved Deeplabv3+. This method achieves multi-scale context fusion by introducing self-attention and deformable ROI pooling in the ASPP hollow pyramid and decoding stages, focusing on improving the segmentation of dark spots and complex boundaries. Chinese patent application CN201810330536.8 discloses a marine oil spill detection system and method based on deep semantic segmentation, employing an end-to-end process with an FCN / U-Net backbone and Softmax supervision, emphasizing ease of engineering and use. Chinese patent application CN202111169802.1 discloses a marine oil spill detection method based on multi-kernel classification model decision fusion, utilizing multi-kernel SVM weighted voting to complete decision-level fusion, favoring classification discrimination rather than pixel-level segmentation. Chinese patent application CN201910206168.0 discloses a multi-scale feature deep convolutional neural network (DCNN) method, which trains the DCNN on multi-scale images reconstructed by wavelet to improve scale adaptability. Chinese patent application CN202110540801.7 discloses a fully convolutional network (FCN) method for detecting oil spills on the sea surface, which decodes and aggregates multi-layer features through an FCN layer by layer to output an oil spill mask. Chinese patent application CN202210479344.X discloses a visible light-infrared dual-modal oil spill detection algorithm, which uses visible light pre-segmentation plus infrared texture features, followed by random forest fusion to enhance cross-modal robustness.

[0005] Although the above solutions have improved oil spill detection performance to varying degrees, they still have the following common problems: First, simple convolutional structures struggle to capture long-range global dependencies simultaneously, leading to discontinuities in oil spill debris or large-area voids within the film. Second, while visual Transformers excel at modeling global semantics, they are insufficient at preserving local edge details, making them prone to boundary drift under weak contrast or wave-like effects. Furthermore, multi-scale feature fusion often employs a "stitching or addition" approach, lacking an adaptive trade-off between local and global information, resulting in film boundary breaks, over-smoothing, or misclassification of similar interfering objects as oil spills. Additionally, loss functions are generally based on cross-entropy, failing to adequately consider the class imbalance caused by the extremely small proportion of the oil spill area, leading to models tending to miss small oil films.

[0006] In summary, existing methods are mostly designed for single imaging conditions and have limited generalization ability under complex sea conditions, lighting variations, and sensor differences. Summary of the Invention

[0007] In view of the shortcomings of existing technologies, this application provides a method and apparatus for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion. This invention synergistically utilizes the advantages of convolutional local detail preservation and the global modeling capabilities of Transformer, and achieves pixel-token bidirectional interaction and adaptive gating fusion at multiple scales to overcome problems such as boundary breaks, missed detections, and false detections of similar objects, thereby improving the accuracy, robustness, and engineering deployment adaptability of oil spill detection on the sea surface.

[0008] The technical means employed in this invention are as follows: A method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion includes the following steps: Obtain an oil spill image dataset, and preprocess the oil spill image data in the oil spill image dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas. An oil spill detection model is constructed based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules cascaded in sequence. The Transformer branch includes Transformer modules in sequence, with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module. The oil spill detection model is trained based on the training dataset; An image of the sea surface to be detected is acquired, and the image is input into the trained oil spill detection model to obtain the oil spill detection result.

[0009] Furthermore, the oil spill image data includes visible light oil spill image data or infrared oil spill image data.

[0010] Furthermore, the oil spill image data undergoes preprocessing, including: The input oil spill image is subjected to noise and glare suppression processing. Specifically, the image brightness channel is thresholded. When the brightness of a local area exceeds the preset threshold, a combination of filtering and morphological operations is used to suppress the bright glare area. The image after noise and glare suppression is normalized to map the pixel values ​​to a preset range in order to reduce the impact of brightness differences under different imaging conditions. Image resizing is performed by adjusting the image to a uniform resolution through interpolation scaling or cropping. During the model training phase, data augmentation operations are performed synchronously on the image and its corresponding pixel-level labeled mask. The data augmentation operations include random rotation, random flipping, random scaling, and random cropping or padding. Contrast and color perturbation operations are performed on the enhanced image to simulate imaging changes under different lighting and sea conditions, thereby improving the model's generalization ability.

[0011] Furthermore, the interactive fusion module is used to jointly process the pixel-level features output by the convolution branch and the token-level features output by the Transformer branch, including the following steps: Parallel dilated convolution and global average pooling operations are performed on pixel-level features from convolution branches to extract local contextual features under different receptive fields. The pixel-level features are converted into pixel token representations through linear projection. Meanwhile, in the Transformer branch, the input image or the feature map of the corresponding layer is divided into several fixed-size image blocks, and each image block is mapped into a low-dimensional embedding vector through linear projection. The embedding vectors constitute the token representation of the visual transformer, and after being modeled by a multi-layer self-attention structure, the token-level features containing global context information are output. The pixel token and the token-level features output from the visual transformer branch are input together into the cross-scale interactive attention module to calculate the response relationship between local pixel features and global semantic features, and obtain globally semantically guided attention features. The token features, weighted by the attention mechanism, are back-projected into the pixel space. The pixel features at the corresponding positions are modulated according to the global semantic guidance result to realize the feature back-injection from the token to the pixel, thereby enhancing the ability of pixel-level features to perceive long-range semantic information. The pixel features that have been re-injected will participate in the next round of cross-scale interactive attention calculation again, realizing the reverse feedback from pixel features to token features, thereby forming a two-way interaction between pixel features and token features; Based on the aforementioned local context features and global semantic features, an adaptive gating fusion mechanism is constructed, the implementation of which includes: The features before fusion are divided into several feature groups along the channel dimension. Each feature group is transformed by group convolution with different dilation rates to extract channel response information under different receptive fields. The outputs of each feature group are concatenated along the channel dimension, and the channel information is integrated through convolution operation. Then, the channel rearrangement operation is performed to enhance the correlation modeling between different channel groups. The rearranged features are subjected to global context encoding, and corresponding channel weight coefficients are generated by a multilayer perceptron. The channel weight coefficients are used to characterize the importance of different channel features to the response of the current sea surface scene. The channel weight coefficients are applied to the corresponding feature channels to perform channel-by-channel weighted modulation of the features, thereby achieving adaptive selective enhancement of local context features and global semantic features, and outputting the final fused features.

[0012] Furthermore, when training the oil spill detection model, the loss function includes the cross-entropy loss function and the Dice loss function; The cross-entropy loss function is used to measure the difference between the predicted pixel-level class probability distribution and the true annotation, and it is calculated as follows:

[0013] Where N represents the total number of pixels in the input image, C represents the number of categories, and y ic p represents the true label of the i-th pixel in the c-th category. ic This represents the corresponding predicted probability value; The Dice loss function is used to measure the degree of overlap between the predicted segmentation result and the real segmentation mask at the region level, and its calculation method is as follows:

[0014] Where P represents the oil spill area predicted by the model, and G represents the corresponding actual oil spill area; The final total loss function is the sum of the cross-entropy loss function and the Dice loss function, and it is calculated as follows: .

[0015] Furthermore, the convolutional branch uses ResNet50 as the backbone network and downsampling units to form a multi-level feature extraction network; the Transformer branch uses TransNeXt as the backbone network, forming a token pyramid structure.

[0016] This invention also discloses a marine oil spill detection device based on improved U-Net co-coding and multi-scale interactive fusion, used to implement the above method, comprising: The data acquisition unit is used to acquire an oil spill image dataset and preprocess the oil spill image data in the oil spill image dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas. The model building unit is used to build an oil spill detection model. The oil spill detection model is based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules that are cascaded in sequence. The Transformer branch includes Transformer modules that are cascaded in sequence with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module. A model training unit is used to train the oil spill detection model based on the training dataset. The detection unit is used to acquire the sea surface image to be detected, and input the sea surface image to be detected into the trained oil spill detection model to obtain the oil spill detection result.

[0017] Compared with the prior art, the present invention has the following advantages: This invention presents an improved U-Net co-coding and multi-scale interactive fusion-based method for detecting oil spills on the sea surface. Through the collaborative representation of convolutional branches (ResNet50) and Transformer branches (TransNeXt), and by introducing dilated convolutional pyramids and global average pooling in the interactive fusion module, it achieves unified modeling of global semantics and local details. Combined with gated fusion, it adaptively weights global / local information pixel-by-pixel, maintaining the boundary integrity and stable response of thin-film oil spills even under weak contrast and other noise interference. The decoding stage employs progressive upsampling and skip connections to improve mask continuity and geometric description stability. Training uses a weighted combination loss of cross-entropy and Dice, balancing class imbalance and region overlap. The overall process is applicable to visible light or infrared imagery, facilitating integration into existing monitoring systems. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a diagram of the oil spill detection model architecture in an embodiment of the present invention.

[0020] Figure 2 This is an architecture diagram of the interactive fusion module in an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] This invention provides a method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion, which mainly includes the following steps.

[0024] S1. Obtain the oil spill image dataset and preprocess the oil spill image data in the oil spill image dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas.

[0025] First, pixel-level annotations are created on the acquired raw sea surface scene images to generate corresponding annotation masks for oil spill areas and non-oil spill areas. Then, during model training, the images and their corresponding annotation masks are used as sample pairs for sea state adaptive preprocessing and data augmentation operations. The sea state adaptive preprocessing includes noise suppression, glare suppression, normalization, and size alignment. The data augmentation operations include rotation, flipping, scaling, random cropping or padding, and contrast and color perturbations. Operations involving geometric transformations are applied synchronously to the image and its corresponding annotation mask with the same parameters to maintain consistency between pixel-level annotations and image content. After completing the above preprocessing and data augmentation, the processed sample pairs are divided into training, validation, and test sets for model training and performance evaluation.

[0026] The specific preprocessing steps include: Preprocessing, including: a. Perform noise and glare suppression processing on the input oil spill image. Specifically, perform threshold detection on the image brightness channel. When the brightness of a local area exceeds the preset threshold, use a combination of filtering and morphological operations to suppress the bright glare area.

[0027] b. Normalize the image after noise and glare suppression, mapping the pixel values ​​to a preset range to reduce the impact of brightness differences under different imaging conditions.

[0028] c. Perform image resizing, adjusting the image to a uniform resolution through interpolation scaling or cropping.

[0029] d. During the model training phase, data augmentation operations are performed synchronously on the image and its corresponding pixel-level labeled mask. The data augmentation operations include random rotation, random flipping, random scaling, and random cropping or padding.

[0030] e. Perform contrast and color perturbation operations on the enhanced image to simulate imaging changes under different lighting and sea conditions, thereby improving the model's generalization ability.

[0031] Through the above processing, training sample pairs for model training are constructed.

[0032] S2. Construct an oil spill detection model. The oil spill detection model is based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules that are cascaded in sequence. The Transformer branch includes Transformer modules that are cascaded in sequence with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module.

[0033] Specifically, such as Figure 1 As shown, the oil spill detection model in this application is constructed using a dual-branch co-encoder, which feeds the preprocessed image into a co-encoder consisting of a convolutional branch and a visual transformer branch running in parallel. The convolutional branch uses ResNet50 as the backbone network and downsampling units to form a multi-level feature extraction network (Stage 1-Stage 4), focusing on local texture and boundary details; The Transformer branch uses TransNeXt as its backbone network, forming a token pyramid structure from Stage 1 to Stage 4. Through Patch Merging downsampling, the outputs at each stage are aligned with the convolutional branches in scale, which is used to model global context and long-range dependencies.

[0034] The two branches are aligned at each level to provide input for subsequent interactive fusion.

[0035] Furthermore, at each level, the alignment features of the convolutional branch and the Transformer branch are fed into the interactive fusion module to achieve bidirectional pixel-token interaction and output the fused features to the decoding end.

[0036] As shown in Figure 2, the interactive fusion module is used to jointly process the pixel-level features output by the convolution branch and the token-level features output by the Transformer branch.

[0037] The first input data of the interactive fusion module is pixel-level features from the convolutional branch. Parallel dilated convolution and global average pooling operations are performed on the first input data to extract local contextual features under different receptive fields. Specifically, the first input data is input in parallel to five feature extraction branches, which include: one global average pooling branch, one 1×1 convolution branch, and three parallel 3×3 dilated convolution branches. The dilation rates of the three 3×3 dilated convolution branches are set to 2, 4, and 6, respectively. The features output by each branch are concatenated along the channel dimension and integrated through 3×3 convolution to obtain local contextual features.

[0038] The second input data of the interactive fusion module is the token-level features from the Transformer branch. In the Transformer branch, the input image or the feature map of the corresponding layer is divided into several fixed-size image blocks, and each image block is mapped into a low-dimensional embedding vector through linear projection. The embedding vector constitutes the token representation of the visual transformer, and after being modeled by a multi-layer self-attention structure, the token-level features containing global context information are output.

[0039] Pixel-level features are converted into pixel token representations through linear projection. The pixel tokens and token-level features output by the Transformer branch are then input into the cross-scale interactive attention module. By calculating the response relationship between local pixel features and global semantic features, attention features guided by global semantics are obtained.

[0040] The token-level features, weighted by the attention mechanism, are back-projected back into the pixel space. The pixel-level features at the corresponding positions are modulated according to the global semantic guidance results, realizing feature back-injection from the token to the pixel. The back-injected pixel-level features then participate in the next round of cross-scale interactive attention calculation, realizing reverse feedback from pixel-level features to token-level features, thereby forming a bidirectional interaction between pixel-level features and token-level features.

[0041] Based on the aforementioned local contextual features and global semantic features, an adaptive gating fusion mechanism is constructed. Its implementation includes: dividing the features before fusion into several feature groups along the channel dimension; performing feature transformation on each feature group using grouped convolutions with different dilation rates to extract channel response information under different receptive fields; concatenating the outputs of each feature group along the channel dimension and integrating channel information through convolution operations, followed by channel rearrangement; performing global context encoding on the rearranged features, generating corresponding channel weight coefficients through a multilayer perceptron, and applying these channel weight coefficients to the corresponding feature channels to perform channel-by-channel weighted modulation, thereby achieving adaptive selective enhancement of local contextual features and global semantic features, and outputting the final fused features of the interactive fusion module.

[0042] Furthermore, a step-by-step upsampling decoder is used to concatenate the output of the previous layer with the fused features of the corresponding coding layer through channel concatenation and element-wise addition to obtain high-resolution features and generate an initial segmentation map.

[0043] S3. Train the oil spill detection model based on the training dataset.

[0044] During the training phase, a weighted combination loss is used for optimization, which includes a weighted combination of cross-entropy loss and Dice loss as the overall optimization objective function.

[0045] The cross-entropy loss function measures the difference between the predicted pixel-level class probability distribution and the true label. Its calculation method is as follows:

[0046] Where N represents the total number of pixels in the input image, C represents the number of categories, and y ic p represents the true label of the i-th pixel in the c-th category. ic This represents the corresponding predicted probability value; The Dice loss function measures the degree of overlap between the predicted segmentation result and the true segmentation mask at the region level. Its calculation method is as follows:

[0047] Where P represents the oil spill area predicted by the model, and G represents the corresponding actual oil spill area; The final total loss function is the sum of the cross-entropy loss function and the Dice loss function, and it is calculated as follows: .

[0048] The trained oil spill detection model passed the validation set test.

[0049] S4. Obtain the sea surface image to be detected, and input the sea surface image to be detected into the trained oil spill detection model to obtain the oil spill detection result.

[0050] This invention also discloses a marine oil spill detection device based on improved U-Net co-coding and multi-scale interactive fusion, used to implement the aforementioned marine oil spill detection method based on improved U-Net co-coding and multi-scale interactive fusion, comprising: The data acquisition unit is used to acquire an oil spill image dataset and preprocess the oil spill image data in the oil spill image dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas. The model building unit is used to build an oil spill detection model. The oil spill detection model is based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules that are cascaded in sequence. The Transformer branch includes Transformer modules that are cascaded in sequence with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module. A model training unit is used to train the oil spill detection model based on the training dataset. The detection unit is used to acquire the sea surface image to be detected, and input the sea surface image to be detected into the trained oil spill detection model to obtain the oil spill detection result.

[0051] Specific examples in this embodiment can be found in the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion, characterized in that, Includes the following steps: Obtain an oil spill image dataset and preprocess the oil spill image data in the dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas. An oil spill detection model is constructed based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules cascaded in sequence. The Transformer branch includes Transformer modules in sequence, with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module. The oil spill detection model is trained based on the training dataset; An image of the sea surface to be detected is acquired, and the image is input into the trained oil spill detection model to obtain the oil spill detection result.

2. The method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion as described in claim 1, characterized in that, The oil spill image data includes visible light oil spill image data or infrared oil spill image data.

3. The method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion as described in claim 1, characterized in that, Preprocessing of oil spill image data includes: The input oil spill image is subjected to noise and glare suppression processing. Specifically, the image brightness channel is thresholded. When the brightness of a local area exceeds the preset threshold, a combination of filtering and morphological operations is used to suppress the bright glare area. The image after noise and glare suppression is normalized to map the pixel values ​​to a preset range in order to reduce the impact of brightness differences under different imaging conditions. Image resizing is performed by adjusting the image to a uniform resolution through interpolation scaling or cropping. During the model training phase, data augmentation operations are performed synchronously on the image and its corresponding pixel-level labeled mask. The data augmentation operations include random rotation, random flipping, random scaling, and random cropping or padding. Contrast and color perturbation operations are performed on the enhanced image to simulate imaging changes under different lighting and sea conditions, thereby improving the model's generalization ability.

4. The method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion as described in claim 1, characterized in that, The interactive fusion module is used to jointly process the pixel-level features output by the convolution branch and the token-level features output by the Transformer branch, including the following steps: Parallel dilated convolution and global average pooling operations are performed on pixel-level features from convolution branches to extract local contextual features under different receptive fields. The pixel-level features are converted into pixel token representations through linear projection. Meanwhile, in the Transformer branch, the input image or the feature map of the corresponding layer is divided into several fixed-size image blocks, and each image block is mapped into a low-dimensional embedding vector through linear projection. The embedding vectors constitute the token representation of the visual transformer, and after being modeled by a multi-layer self-attention structure, the token-level features containing global context information are output. The pixel token and the token-level features output from the visual transformer branch are input together into the cross-scale interactive attention module to calculate the response relationship between local pixel features and global semantic features, and obtain globally semantically guided attention features. The token features, weighted by the attention mechanism, are back-projected back into the pixel space. The pixel features at the corresponding positions are modulated according to the global semantic guidance result to realize the feature back-injection from the token to the pixel, thereby enhancing the ability of pixel-level features to perceive long-range semantic information. The pixel features that have been re-injected will participate in the next round of cross-scale interactive attention calculation again, realizing the reverse feedback from pixel features to token features, thereby forming a two-way interaction between pixel features and token features; Based on the aforementioned local context features and global semantic features, an adaptive gating fusion mechanism is constructed, the implementation of which includes: The features before fusion are divided into several feature groups along the channel dimension. Each feature group is transformed by group convolution with different dilation rates to extract channel response information under different receptive fields. The outputs of each feature group are concatenated along the channel dimension, and the channel information is integrated through convolution operation. Then, the channel rearrangement operation is performed to enhance the correlation modeling between different channel groups. The rearranged features are subjected to global context encoding, and corresponding channel weight coefficients are generated by a multilayer perceptron. The channel weight coefficients are used to characterize the importance of different channel features to the response of the current sea surface scene. The channel weight coefficients are applied to the corresponding feature channels to perform channel-by-channel weighted modulation of the features, thereby achieving adaptive selective enhancement of local context features and global semantic features, and outputting the final fused features.

5. The method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion as described in claim 1, characterized in that, When training the oil spill detection model, the loss function includes the cross-entropy loss function and the Dice loss function; The cross-entropy loss function is used to measure the difference between the predicted pixel-level class probability distribution and the true annotation, and it is calculated as follows: in, N This represents the total number of pixels in the input image. C Indicates the number of categories. y ic Indicates the first i The pixel in the first c Real labels under the category p ic This represents the corresponding predicted probability value; The Dice loss function is used to measure the degree of overlap between the predicted segmentation result and the real segmentation mask at the region level, and its calculation method is as follows: in, P This indicates the oil spill area predicted by the model. G This indicates the corresponding actual oil spill area; The final total loss function is the sum of the cross-entropy loss function and the Dice loss function, and it is calculated as follows: 。 6. The method for detecting oil spills on the sea surface based on improved U-Net co-coding and multi-scale interactive fusion according to claim 1, characterized in that, The convolutional branch uses ResNet50 as the backbone network and downsampling units to form a multi-level feature extraction network; the Transformer branch uses TransNeXt as the backbone network, and the structure forms a token pyramid.

7. A marine oil spill detection device based on improved U-Net co-coding and multi-scale interactive fusion, used to implement the marine oil spill detection method based on improved U-Net co-coding and multi-scale interactive fusion as described in any one of claims 1-6, characterized in that, include: The data acquisition unit is used to acquire an oil spill image dataset and preprocess the oil spill image data in the oil spill image dataset to construct a training dataset. The oil spill image data includes pixel-level annotations to distinguish between oil spill areas and non-oil spill areas. The model building unit is used to build an oil spill detection model. The oil spill detection model is based on an improved U-Net network. The improved U-Net network includes an encoder and a decoder. The encoder includes a convolutional branch and a Transformer branch. The convolutional branch includes several convolutional neural network modules that are cascaded in sequence. The Transformer branch includes Transformer modules that are cascaded in sequence with the same number of convolutional neural network modules. The convolutional neural network modules and Transformer modules at the same level are connected to an interactive fusion module. A model training unit is used to train the oil spill detection model based on the training dataset. The detection unit is used to acquire the sea surface image to be detected, and input the sea surface image to be detected into the trained oil spill detection model to obtain the oil spill detection result.

Citation Information

Patent Citations

  • Deep semantic segmentation-based ocean oil spill detection system and method

    CN108596065A

  • A method for detecting oil spills on the sea surface based on multi-scale feature deep convolutional neural networks

    CN109919123B

  • Sea surface oil spill detection method and system based on full convolutional network and application thereof

    CN113177929A

  • Sea surface oil spill detection method based on multi-kernel classification model decision fusion

    CN113920445A

  • Water surface oil spill detection algorithm based on visible light infrared image

    CN114863261A