Marine oil spill intelligent detection method and device based on SAR image
By preprocessing and detecting SAR images using a convolutional neural network model based on attention mechanism in offshore oil spill detection, the problem of low oil spill detection accuracy in the prior art is solved, and higher detection accuracy is achieved and performance.
Patent Information
- Application Number
- CN202410985294.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing morphological detection algorithm is low in automation when detecting offshore oil spills and is susceptible to uneven distribution of noise and grayscale, resulting in poor segmentation of oil spill areas and low accuracy.
The convolutional neural network model based on attention mechanism is used to preprocess and detect SAR images, and the detection performance is improved by introducing attention mechanism, important feature areas are extracted, and detection difficulty is reduced.
It improves the accuracy of offshore oil spill detection, can effectively identify oil spill areas in complex backgrounds, reduce noise interference, and enhance detection performance.
Smart Images

Figure CN118941979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil spill detection, and in particular to an intelligent offshore oil spill detection method and device based on SAR images. Background Art
[0002] Marine oil spill accidents cause serious damage to the marine ecological environment. Monitoring marine oil spills is of great significance to the protection of the marine ecological environment.
[0003] At present, traditional oil spill detection algorithms are mainly based on morphological detection, such as single threshold segmentation, adaptive threshold segmentation, etc. This type of algorithm has low computational complexity and strong stability, and is widely used in various occasions that require high-intensity real-time computing. It has excellent classification effect in images with obvious grayscale differences between segmented targets and backgrounds. However, in the practice of using SAR images to detect sea surface oil spills, this type of method not only has a low degree of automation, but is also easily affected by speckle noise and uneven grayscale distribution, making it difficult to accurately select the optimal threshold, which can easily lead to poor segmentation of the oil spill area, and then lead to low accuracy of oil spill detection.
[0004] Therefore, how to improve the accuracy of marine oil spill detection based on SAR images is an urgent problem to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for intelligent detection of offshore oil spills based on SAR images, so as to improve the accuracy of detecting offshore oil spills based on SAR images.
[0006] In a first aspect, a method for intelligent detection of offshore oil spills based on SAR images is provided, the method comprising:
[0007] Acquire a SAR image to be detected, where the SAR image to be detected is a sea surface image;
[0008] Preprocessing the SAR image to be detected;
[0009] The pre-processed SAR image to be detected is input into the offshore oil spill intelligent detection model to obtain the corresponding oil spill detection result;
[0010] Among them, the offshore oil spill intelligent detection model is a convolutional neural network model containing an attention mechanism.
[0011] In a second aspect, a marine oil spill intelligent detection device based on SAR images is provided, the device comprising:
[0012] An acquisition module is used to acquire a SAR image to be detected, wherein the SAR image to be detected is a sea surface image;
[0013] A preprocessing module, used for preprocessing the SAR image to be detected;
[0014] The model processing module is used to input the pre-processed SAR image to be detected into the marine oil spill intelligent detection model to obtain the corresponding oil spill detection result;
[0015] Among them, the offshore oil spill intelligent detection model is a convolutional neural network model containing an attention mechanism.
[0016] According to a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect, the second aspect or the third aspect above.
[0017] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method described in the first aspect, the second aspect or the third aspect is implemented.
[0018] After acquiring the SAR image to be detected, the embodiment of the present invention preprocesses the SAR image to be detected, where the SAR image to be detected is a sea surface image. The preprocessed SAR image to be detected is input into an intelligent offshore oil spill detection model to obtain a corresponding oil spill detection result, wherein the intelligent offshore oil spill detection model is a convolutional neural network model containing an attention mechanism. The above method can use SAR images to perform rapid detection of large-scale offshore oil spills. Using the intelligent offshore oil spill detection model to perform oil spill detection can effectively extract important feature areas from complex backgrounds, thereby reducing the difficulty of detection. In addition, an attention mechanism is introduced into the intelligent offshore oil spill detection model to achieve better detection performance and improve the accuracy of offshore oil spill detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0020] Figure 1 It is a flow chart of an intelligent method for detecting oil spills at sea based on SAR images according to an embodiment of the present invention;
[0021] Figure 2 Flow chart of a method for training an intelligent offshore oil spill detection model according to an embodiment of the present invention;
[0022] Figure 3 A flow chart of a method for processing a feature map using a downsampling layer attention mechanism according to an embodiment of the present invention;
[0023] Figure 4A schematic diagram of the U-Net model processing process after the attention mechanism is introduced in an embodiment of the present invention;
[0024] Figure 5 A structural diagram is introduced for the attention mechanism of an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of a detection result graph obtained by using a U-net model according to an embodiment of the present invention;
[0026] Figure 7 Schematic diagram of an intelligent detection device for offshore oil spills based on SAR images according to an embodiment of the present invention;
[0027] Figure 8 Schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.
[0029] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0030] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".
[0031] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0032] Figure 1 FIG. 1 is a flow chart of an intelligent method for detecting oil spills at sea based on SAR images according to an embodiment of the present invention. Figure 1 As shown, the intelligent detection method for offshore oil spills based on SAR images has the following steps:
[0033] Step S101, obtaining a SAR image to be detected, wherein the SAR image to be detected is a sea surface image.
[0034] Among them, the SAR image to be detected is a satellite remote sensing image obtained based on a space-borne synthetic aperture radar. SAR (Synthetic Aperture Radar) is an active remote sensing technology that forms an image by emitting radar signals and receiving reflected signals. SAR can send and receive signals in different frequency bands, capture images of the earth's surface in a large range without being affected by time and climate, and the cost is relatively low. The principle of using SAR for offshore oil spill detection is the damping effect of oil spill on small-scale waves such as capillary waves and gravity waves on the sea surface. Oil spills on the ocean surface will suppress these waves, significantly weaken the scattering of the sea surface, make the sea surface smoother, enhance the specular reflection of the seawater surface under the oil, and weaken the reflected radar backscattering signal, so that the oil spill area in the satellite image is darker than the normal sea surface. By enhancing the contrast between these dark areas and the surrounding sea areas through image processing technology, the oil spill area on the sea surface can be more easily identified. The SAR image to be detected can be obtained through a space-borne synthetic aperture radar system, or through open source data sets, networks or predetermined databases.
[0035] Step S102: preprocessing the SAR image to be detected.
[0036] Specifically, the preprocessing of the SAR image to be detected may include radiation correction, speckle noise suppression, geometric correction, data enhancement, image normalization, image size adjustment, etc.
[0037] In a possible implementation, the preprocessing of the SAR image to be detected may include one or more of the following operations:
[0038] The original DN (Digital Number, electronic signal) value of the SAR image to be detected is converted into a radiation brightness value or backscattering coefficient with physical meaning to eliminate the influence of the radar sensor response difference on the quality of the SAR image to be detected.
[0039] The SAR image to be detected is subjected to radiation normalization processing to eliminate the differences in image radiation characteristics at different times and observation angles.
[0040] Multi-view processing is performed on the SAR image to be detected, and the resolutions in the range and azimuth directions of the SAR image to be detected are averaged to suppress the speckle noise of the SAR image.
[0041] The SAR image to be detected is filtered to suppress the speckle noise of the SAR image.
[0042] The SAR image to be detected is converted from slant range or ground range projection to geographic coordinate projection for spatial analysis and comparison.
[0043] The SAR image to be detected is normalized to normalize its pixel value to between 0 and 1 (or between -1 and 1) to eliminate the influence of the difference in pixel value range between different SAR images to be detected.
[0044] The non-sea surface areas in the SAR image to be detected are eliminated to reduce the amount of data processed by the model and remove the interference of the non-sea surface areas on the model detection.
[0045] The image size of the SAR image to be detected is adjusted to a preset size that meets the input requirements of the offshore oil spill intelligent detection model. If the SAR image to be detected contains multiple targets or areas and needs to be detected separately, image segmentation processing is also required.
[0046] Through the above preprocessing, the SAR image to be detected can meet the input requirements of the model, so that the intelligent detection model for offshore oil spills can perform offshore oil spill detection based on higher quality SAR images to be detected, thereby improving the accuracy of detection. The above preprocessing operation can be selected according to the input requirements and other actual needs of the intelligent detection model for offshore oil spills.
[0047] Step S103, inputting the pre-processed SAR image to be detected into the offshore oil spill intelligent detection model to obtain the corresponding oil spill detection result.
[0048] Among them, the intelligent detection model for offshore oil spills is a convolutional neural network model with an attention mechanism. The intelligent detection model for offshore oil spills can use U-Net and its variant models, SegNet models, DeepLab series models, Faster R-CNN models, Mask R-CNN models, SENet models, or residual / dense network structures such as ResNet and DenseNet. Before using the intelligent detection model for offshore oil spills for detection, the intelligent detection model for offshore oil spills should be built and trained.
[0049] Figure 2 FIG. 1 is a flow chart of a method for training an intelligent offshore oil spill detection model according to an embodiment of the present invention. Figure 2 As shown, the training method comprises the following steps:
[0050] Step S201, obtaining a SAR image training data set and a SAR image verification data set.
[0051] The acquisition methods of SAR image training data sets include accepting manually collected and annotated training data, automatically crawling relevant data from the Internet by web crawlers, obtaining public SAR image data sets or synthesized SAR image data sets, etc. A certain proportion of data can be extracted from the SAR image training data set as the SAR image verification data set, or the SAR image verification data set can be obtained in the same way as the SAR image training data set.
[0052] Step S202: Use the SAR image training data set to train the built intelligent detection model for offshore oil spills, where the intelligent detection model for offshore oil spills includes an encoder and a decoder with an attention mechanism.
[0053] The SAR image training dataset is used to train the intelligent offshore oil spill detection model. The model parameters can be adjusted through the optimization algorithm to minimize the prediction error of the model on the training data.
[0054] Step S203: Use the SAR image verification data set to verify the trained marine oil spill intelligent detection model.
[0055] The SAR image validation dataset is used to validate the offshore oil spill intelligent detection model. It can be used to evaluate model performance, adjust hyperparameters such as learning rate and network structure, and monitor overfitting during training. The loss or accuracy of the validation set is an important basis for selecting the best model version.
[0056] Step S204, adjusting multiple model hyperparameters of the offshore oil spill intelligent detection model according to the verification result until the model hyperparameters of the offshore oil spill intelligent detection model meet the preset requirements.
[0057] The above-mentioned model training method optimizes various model hyperparameters of the network according to the changing trends of accuracy and loss value during the training process of the offshore oil spill intelligent detection model and the network characteristics, so as to construct a convolutional neural network model with high efficiency, accuracy and robustness for oil spill image segmentation, thereby accurately detecting and segmenting the SAR images to be detected.
[0058] In a possible implementation, the intelligent detection model for offshore oil spills is an encoder-decoder structure, that is, the intelligent detection model for offshore oil spills includes at least an encoder and a decoder, so the processing of the SAR image to be detected by the intelligent detection model for offshore oil spills can also be divided into an encoding stage and a decoding stage. After the SAR image to be detected is input into the intelligent detection model for offshore oil spills, the encoding stage is entered. In the encoding stage, the encoder extracts image features and reduces the image size of the SAR image to be detected, thereby obtaining a corresponding feature map. After the encoding stage is completed, the feature map output by the encoder is input into the decoder, so that the decoder combines the jump connection to fuse the image features and restore the image size, thereby obtaining the corresponding oil spill detection result. The above encoding stage gradually reduces the spatial size of the feature map to capture contextual information, and the decoding stage gradually restores the image size to accurately locate the category of each pixel, and combines the feature map in the encoder with the feature map in the decoder through the jump connection to retain more spatial information and improve positioning accuracy.
[0059] Specifically, the encoder may include multiple downsampling layers (or compression layers). After the preprocessed SAR image to be detected is input into the encoder, it is processed in sequence by the multiple downsampling layers of the encoder to extract image features and reduce the image size. In each downsampling layer, at least one convolution layer with a convolution kernel of a first predetermined size is used to extract the image features, and a pooling layer with a predetermined step size is used to reduce the image size to obtain a feature map corresponding to each downsampling layer.
[0060] The decoder also correspondingly includes a multi-layer upsampling layer. After the feature map output by the encoder is input into the decoder, it is processed in sequence by the multi-layer upsampling layers of the decoder to fuse the image features and restore the image size. In each upsampling layer, an upsampling operation is used to increase the image size of the feature map. Combined with a jump connection, the feature map of the upsampling layer is cascaded with the feature map of the corresponding layer in the encoder to obtain a fused feature map, and then at least two convolution layers are used for feature refinement, and the convolution kernel of the convolution layer is a second predetermined size.
[0061] In addition, each upsampling layer contains a corresponding attention gate (AG) mechanism. Figure 3 Flow chart of the method for processing feature maps by the downsampling layer attention mechanism of an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:
[0062] Step S301, obtaining a feature map input to a current upsampling layer and a feature map of a downsampling layer in an encoder corresponding to the current upsampling layer.
[0063] Step S302, convolving the feature map of the current upsampling layer and the feature map of the corresponding downsampling layer respectively.
[0064] The convolution size can be determined according to the actual requirements of the model. For example, a 1×1×1 convolution is performed on the feature map of the current upsampling layer and the feature map of the corresponding downsampling layer.
[0065] Step S303, fusing the two convolved feature maps.
[0066] Specifically, the fusion method may be point addition or splicing.
[0067] Step S304, performing convolution and activation operations on the fused feature map to obtain a weight feature map corresponding to the current upsampling layer.
[0068] Among them, the activation operation can be based on activation functions such as ReLU, Sigmoid, hyperbolic tangent (Tanh) or exponential linear unit (ELU).
[0069] Step S305: Merge the weight feature map with the feature map restored by the current upsampling layer to obtain the feature map output by the current upsampling layer.
[0070] In the last layer of the decoder, the convolution operation is used to map the final feature map to the same number of channels as the number of categories. Each channel represents the possible distribution of a category in the image. The softmax function or other classifier is applied to classify each pixel, and a detection result map with the same size as the input image is generated. The detection result is determined based on the detection result map, for example, the detection result map is directly used as the detection result output by the model, or the information contained in the detection result map is analyzed to obtain the final detection result.
[0071] The method of the embodiment of the present invention obtains a SAR image to be detected, preprocesses the SAR image to be detected, and the SAR image to be detected is a sea surface image. The preprocessed SAR image to be detected is input into an intelligent detection model for offshore oil spills to obtain a corresponding oil spill detection result, wherein the intelligent detection model for offshore oil spills is a convolutional neural network model containing an attention mechanism. The above method can use SAR images to perform rapid detection of large-scale offshore oil spills. The intelligent detection model for offshore oil spills is used to perform oil spill detection, which can effectively extract important feature areas from complex backgrounds and reduce the difficulty of detection. In addition, the attention mechanism is introduced into the intelligent detection model for offshore oil spills, thereby achieving better detection performance and improving the accuracy of offshore oil spill detection.
[0072] The embodiment of the present invention takes the U-Net model as an example of the intelligent detection model for offshore oil spills to explain the model processing training and data processing process.
[0073] U-Net is an image segmentation network with a symmetrical encoder-decoder structure based on FCN (Fully Convolutional Network). U-Net mainly consists of two parts: encoder and decoder. It fuses the low-level features in the encoder and the high-level features in the decoder through jump connections. Among them, the low-level features contain more spatial information, and the high-level features contain more semantic information.
[0074] Figure 4 Schematic diagram of the U-Net model processing process after the attention mechanism is introduced in an embodiment of the present invention. Figure 5 The structure diagram of the attention mechanism of the embodiment of the present invention is introduced. Figure 4 and Figure 5 Provide explanation.
[0075] like Figure 5 As shown, the processing process is divided into an encoding phase and a decoding phase.
[0076] In the encoding stage, the encoder extracts features through a series of convolutional layers. Each convolutional layer contains convolution, activation function (such as ReLU), and possible pooling operations. As the network structure goes deeper, the size of the feature map gradually decreases, while the number of feature channels gradually increases, thereby extracting higher-level semantic information.
[0077] In the decoding phase, the decoder starts with the feature map received from the encoder and gradually increases the size of the feature map through upsampling operations. After each upsampling step, the feature map of the corresponding level of the encoder is concatenated with the feature map of the current level of the decoder through a skip connection. An additional attention mechanism is added at each upsampling layer.
[0078] like Figure 5 As shown in the figure, the attention mechanism processing process is as follows: First, the two received feature maps are respectively subjected to 1x1x1 convolution, and the two feature maps are the up-sampled feature maps W g and the feature map W copied from the downsampling process x The two convolutional feature maps are then fused by point addition or concatenation, and then an activation function (such as ReLU) is used to obtain a merged feature map. The merged feature map is then passed through a 1x1x1 convolution ( Figure 5ф) and activation function (such as Sigmoid) to obtain a series of probability values. The probability value here is equivalent to the weight, or equivalent to a Mask layer, which can then be multiplied to each corresponding pixel in the feature map. The resampler is used to change the size of the weight feature map to make it consistent with the feature map x copied from the downsampling. l The size is the same, so the two are multiplied point by point (correcting the downsampled feature map), and the output The weighting of each pixel is completed. Finally, the weighted map is merged with the feature map restored by upsampling.
[0079] In the last layer of the decoder, a convolution operation is used to map the feature map to the same number of channels as the number of categories. Each channel represents the probability distribution of a category in the image. A softmax function or other classifier is applied to classify each pixel and generate a segmentation result map with the same size as the input image.
[0080] Figure 6 FIG. 1 is a schematic diagram of a detection result diagram obtained by using a U-net model according to an embodiment of the present invention. Figure 6 As shown in the detection result, the white part is oil pollution and the black part is normal sea surface. The image processed by the above U-net model can refine the local features to improve the detection accuracy.
[0081] The method of the embodiment of the present invention obtains a SAR image to be detected, preprocesses the SAR image to be detected, and the SAR image to be detected is a sea surface image. The preprocessed SAR image to be detected is input into an intelligent detection model for offshore oil spills to obtain a corresponding oil spill detection result, wherein the intelligent detection model for offshore oil spills is a convolutional neural network model containing an attention mechanism. The above method can use SAR images to perform rapid detection of large-scale offshore oil spills. The intelligent detection model for offshore oil spills is used to perform oil spill detection, which can effectively extract important feature areas from complex backgrounds and reduce the difficulty of detection. In addition, the attention mechanism is introduced into the intelligent detection model for offshore oil spills, thereby achieving better detection performance and improving the accuracy of offshore oil spill detection.
[0082] Figure 7 FIG. 1 is a schematic diagram of an intelligent detection device for marine oil spills based on SAR images according to an embodiment of the present invention. Figure 7 As shown, the intelligent detection device for offshore oil spills based on SAR images includes:
[0083] The acquisition module 701 is used to acquire a SAR image to be detected, where the SAR image to be detected is a sea surface image.
[0084] The preprocessing module 702 is used to preprocess the SAR image to be detected.
[0085] The model processing module 703 is used to input the pre-processed SAR image to be detected into the marine oil spill intelligent detection model to obtain the corresponding oil spill detection result.
[0086] Among them, the offshore oil spill intelligent detection model is a convolutional neural network model containing an attention mechanism.
[0087] The device of the embodiment of the present invention obtains a SAR image to be detected, preprocesses the SAR image to be detected, and the SAR image to be detected is a sea surface image. The preprocessed SAR image to be detected is input into an intelligent detection model for offshore oil spills to obtain a corresponding oil spill detection result, wherein the intelligent detection model for offshore oil spills is a convolutional neural network model containing an attention mechanism. The device can use SAR images to perform rapid detection of large-scale offshore oil spills. The intelligent detection model for offshore oil spills is used to perform oil spill detection, which can effectively extract important feature areas from complex backgrounds and reduce the difficulty of detection. In addition, an attention mechanism is introduced into the intelligent detection model for offshore oil spills, thereby achieving better detection performance and improving the accuracy of offshore oil spill detection.
[0088] Figure 8 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 8 As shown, Figure 8 The electronic device shown is a general address query device, which includes a general computer hardware structure, which at least includes a processor 801 and a memory 802. The processor 801 and the memory 802 are connected via a bus 803. The memory 802 is suitable for storing instructions or programs executable by the processor 801. The processor 801 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 801 executes the instructions stored in the memory 802, thereby executing the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 803 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 804 and the display device and the input / output (I / O) device 805. The input / output (I / O) device 805 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 805 is connected to the system via an input / output (I / O) controller 806.
[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices (equipment) or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0090] The present application is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.
[0091] These computer program instructions may be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0092] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.
[0093] In the embodiment of the present invention, after obtaining a SAR image to be detected, the SAR image to be detected is preprocessed, and the SAR image to be detected is a sea surface image. The preprocessed SAR image to be detected is input into an intelligent detection model for offshore oil spills to obtain a corresponding oil spill detection result, wherein the intelligent detection model for offshore oil spills is a convolutional neural network model containing an attention mechanism. The SAR image can be used to quickly detect large-scale offshore oil spills. The intelligent detection model for offshore oil spills is used to perform oil spill detection, which can effectively extract important feature areas from complex backgrounds and reduce the difficulty of detection. In addition, the attention mechanism is introduced into the intelligent detection model for offshore oil spills, thereby achieving better detection performance and improving the accuracy of offshore oil spill detection.
[0094] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.
[0095] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by specifying relevant hardware through a program, and the program is stored in a storage medium, including several instructions for a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0096] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An intelligent detection method for offshore oil spills based on SAR images, It is characterized in that The method comprises: Acquire a SAR image to be detected, where the SAR image to be detected is a sea surface image; Preprocessing the SAR image to be detected; The pre-processed SAR image to be detected is input into the offshore oil spill intelligent detection model to obtain the corresponding oil spill detection result; Among them, the offshore oil spill intelligent detection model is a convolutional neural network model containing an attention mechanism.
2. The method according to claim 1, It is characterized in that The preprocessing of the to-be-detected SAR image comprises: Eliminating the non-sea surface area in the SAR image to be detected; Performing normalization processing on the SAR image to be detected; The image size of the SAR image to be detected is adjusted to a preset size that meets the input requirements of the marine oil spill intelligent detection model.
3. The method according to claim 1, It is characterized in that The offshore oil spill intelligent detection model is an encoding-decoding structure; The pre-processed SAR image to be detected is input into the marine oil spill intelligent detection model to obtain the corresponding oil spill detection result, including: Inputting the preprocessed SAR image to be detected into the encoder of the marine oil spill intelligent detection model to extract image features and reduce the image size, thereby obtaining a corresponding feature map; The feature map output by the encoder is input into the decoder, so that the decoder combines the jump connection to fuse the image features and restore the image size, thereby obtaining the corresponding oil spill detection result.
4. The method according to claim 3, It is characterized in that The pre-processed SAR image to be detected is input into the encoder of the marine oil spill intelligent detection model to extract image features and reduce the image size, thereby obtaining a corresponding feature map, including: After the preprocessed SAR image to be detected is input into the encoder, it is processed in sequence by the multi-layer downsampling layers of the encoder to extract image features and reduce image size; Among them, in each downsampling layer, a convolution layer with at least one convolution kernel of a first predetermined size is used to extract the image features, and a pooling layer with a predetermined step size is used to reduce the image size to obtain a feature map corresponding to each downsampling layer.
5. The method according to claim 3, It is characterized in that The step of inputting the feature map output by the encoder into the decoder so that the decoder combines the image features with the jump connection and restores the image size, thereby obtaining the corresponding oil spill detection result, includes: After the feature map output by the encoder is input into the decoder, it is processed in sequence by the multi-layer upsampling layers of the decoder to fuse the image features and restore the image size; In each upsampling layer, an upsampling operation is used to increase the image size of the feature map, and a jump connection is combined to perform feature mapping cascade on the feature map of the upsampling layer and the feature map of the corresponding layer in the encoder to obtain a fused feature map, and then at least two convolution layers are used for feature refinement, and the convolution kernel of the convolution layer is a second predetermined size; In the last upsampling layer, the corresponding feature map is mapped to the same number of channels as the number of categories, and a classifier is used to classify each pixel in the feature map, and the detection result is determined according to the classification result.
6. The method according to claim 5, It is characterized in that Each upsampling layer of the offshore oil spill intelligent detection model includes a corresponding attention mechanism; The step of inputting the feature map output by the encoder into a decoder so that the decoder combines the image features with the jump connection and restores the image size, thereby obtaining a corresponding oil spill detection result, further comprising: Obtain a feature map input to a current upsampling layer and a feature map of a downsampling layer in an encoder corresponding to the current upsampling layer; Convolving the feature map of the current upsampling layer and the feature map of the corresponding downsampling layer respectively; Fusing the two convolved feature maps; Perform convolution and activation operations on the fused feature map to obtain a weight feature map corresponding to the current upsampling layer; The weight feature map is combined with the feature map restored by the current upsampling layer to obtain the feature map output by the current upsampling layer.
7. The method according to claim 1, It is characterized in that The offshore oil spill intelligent detection model is trained by the following steps: Obtain a SAR image training data set and a SAR image verification data set; Using the SAR image training data set to train the built intelligent detection model for offshore oil spills, the intelligent detection model for offshore oil spills includes an encoder and a decoder with an attention mechanism; Using the SAR image verification data set to verify the trained offshore oil spill intelligent detection model; According to the verification results, multiple model hyperparameters of the offshore oil spill intelligent detection model are adjusted until the model hyperparameters of the offshore oil spill intelligent detection model meet the preset requirements.
8. An intelligent detection device for offshore oil spills based on SAR images. It is characterized in that The device comprises: An acquisition module is used to acquire a SAR image to be detected, wherein the SAR image to be detected is a sea surface image; A preprocessing module, used for preprocessing the SAR image to be detected; The model processing module is used to input the pre-processed SAR image to be detected into the marine oil spill intelligent detection model to obtain the corresponding oil spill detection result; Among them, the offshore oil spill intelligent detection model is a convolutional neural network model containing an attention mechanism.
9. An electronic device comprising a memory and a processor, It is characterized in that The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
An attention mechanism U-shaped densely connected retinal blood vessel segmentation method
CN109448006A
Offshore oil spill detection method based on SAR image
CN111861918A
SAR marine oil spill image segmentation method based on improved U-Net
CN117975006A
