A ship instance segmentation method in foggy scenes based on interference suppression and dynamic contours
By using interference suppression and dynamic contour methods under foggy conditions, extracting feature pyramid and contour features, and optimizing the loss function to train the network, the problem of low ship segmentation accuracy in foggy weather is solved, achieving higher segmentation accuracy and reducing leakage. Check.
Patent Information
- Application Number
- CN202111411500.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-11-25
AI Technical Summary
Existing instance segmentation methods are difficult to accurately segment ships under foggy conditions, resulting in reduced ship segmentation accuracy and missed detections, especially the lack of effective solutions in visible light images.
Using a ship instance segmentation method based on interference suppression and dynamic contours, the feature pyramid is extracted through a deep residual convolution network, combined with the interference suppression module and contour branch, a loss function is designed to optimize network training, and the dynamic contour learning module is used to assist in predicting ship masks. Reduce fog interference.
It improves the accuracy of ship segmentation in foggy scenes, reduces missed ship detections, and improves segmentation accuracy.
Smart Images

Figure CN114219989B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of instance segmentation in computer vision and image processing, and in particular relates to a ship instance segmentation method in foggy scenes based on interference suppression and dynamic contours. Background Art
[0002] Today's world has entered the era of intelligent development of "Industry 4.0". Intelligent ships are the inevitable trend of future ship development and have good application needs and development prospects. Instance segmentation is a basic but challenging task in computer vision. Its purpose is to assign each pixel of an instance to a specific semantic category and distinguish different instances in the same category. In particular, instance segmentation technology related to intelligent ships can accurately perceive the shape and position information of ships at sea, and is applicable to various fields such as maritime traffic supervision, marine surveillance, and navigation safety. However, the rapid changes in marine climate and frequent occurrence of severe weather seriously threaten the safety of ship operations. At the same time, the visual signals of computer vision systems can also be damaged and distorted under severe weather conditions, especially in foggy conditions. Sea fog data has the characteristics of blurred images, easy confusion between ships and sea and sky backgrounds, and difficulty in identifying long-distance targets. In this case, low-quality imaging will seriously affect the instance segmentation results of foggy ships.
[0003] The current most advanced instance segmentation methods such as Mask R-CNN, Solo, CondInst, etc., directly used for ship segmentation tasks in foggy weather, will cause a large number of ship missed detections and incomplete segmentation problems, resulting in a serious decrease in ship segmentation accuracy. These algorithms are mainly applicable to sunny scenes, without considering the above-mentioned severe weather conditions. At the same time, the existing related ship instance segmentation is mainly concentrated on high-resolution SAR (synthetic aperture radar) images and remote sensing images. However, due to the timeliness of image acquisition, ship segmentation of SAR and optical remote images is difficult to meet real-time requirements. In contrast, visible light images have better detection accuracy and real-time performance. However, existing studies rarely pay attention to ship instance segmentation of visible light images, and cannot provide an effective solution for ship instance segmentation in foggy scenes. Summary of the invention
[0004] The purpose of the present invention is to reduce the severe interference caused by sea fog, improve the ship segmentation accuracy, and provide a foggy scene ship instance segmentation method based on interference suppression and dynamic contours that can completely segment ship targets in foggy scenes.
[0005] The object of the present invention is achieved in that:
[0006] Step 1: Establish a ship instance segmentation network in foggy scenes
[0007] The ship instance segmentation network in the foggy scene includes a feature extraction network, a parameter generation network, an interference suppression module, a contour branch and a segmentation network.
[0008] The feature extraction network uses a deep residual convolutional network to output features of different sizes to fuse high-level and low-level features to form a feature pyramid.
[0009] The parameter generation network is connected to different output feature maps of the feature pyramid to perform parameter prediction, ensuring the segmentation accuracy of multi-scale targets. The parameter generation network consists of 3 sets of parallel Convs convolutional layers, and the output is the controller Classifier p x,y and controller θ x,y .
[0010] The interference suppression module makes the ship instance segmentation network pay more attention to effective information features and suppresses the interference of sea fog on the segmentation of ships. The interference suppression module extracts effective features from both pixels and channels, and the output result is F IR .
[0011] The contour branch is used to extract contour features as the input of the dynamic contour learning module. The contour branch consists of four 3×3 convolutions connected to a feature fusion module to fuse the contour features F contour and the mask feature F mask .
[0012] The segmentation network is used to dynamically predict the mask and contour of each instance. The segmentation network includes a mask module and a dynamic contour learning module, both of which are composed of three 1×1 8-channel convolutions. At the same time, the dynamic convolution is used in combination with the contour branch to learn the contour of the blurred ship and assist in mask prediction in foggy scenes. The dynamic contour learning module is only used to assist the training of the main network and does not participate in the final test.
[0013] Step 2: Train the foggy ship instance segmentation network
[0014] The loss function is designed to optimize the training of the ship instance segmentation network in foggy weather.
[0015] The loss function is L = L fcos +L mask +λL contour , where L contour (p b ,g b )= L dice (p b ,g b )+L BCE (p b ,g b ). fcos , Lmask and L contour They represent Fcos loss, mask loss and contour loss respectively. λ represents L contour The weight coefficient is set to 1. dice represents Dice loss and L BCE is the binary cross entropy loss, g b is the true result of the contour, p b is the contour prediction result.
[0016] A ship instance segmentation dataset Foggy ShipInsseg was established for network training.
[0017] The Foggy ShipInsseg dataset contains 5739 foggy images and 10900 fine instance mask annotations, which are divided into three sub-datasets: Fog-Train, Fog-Test, and Real-Fog. The ship data in foggy weather at sea is expanded using a foggy image simulation method. This method generates simulated fog on real ocean images. The dataset includes real foggy images and simulated foggy images.
[0018] Step 3: Test the ship instance segmentation effect in foggy weather
[0019] The images of the Fog-Test and Real-Fog datasets to be tested are input into the trained foggy ship instance segmentation model to obtain the ship segmentation results.
[0020] Furthermore, the feature pyramids of the feature extraction network are Resnet-50-FPN and Resnet-101-FPN.
[0021] Furthermore, in the loss function Where DCLM stands for Dynamic Contour Learning Module, is the contour feature, is the convolution parameter of the dynamic contour learning module. Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. The present invention utilizes an interference suppression module to extract important features from pixels and channels and reduce the interference caused by foggy weather on ship segmentation, and dynamically learns contour information to assist in predicting the mask of foggy weather ships.
[0023] 2. The accuracy of ship instance segmentation in foggy scenes has been comprehensively improved, reducing missed ship detections. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart of the present invention;
[0025] Figure 2It is a schematic diagram of the interference suppression module of the present invention;
[0026] Figure 3 This is a schematic diagram of annotation of the foggy ship dataset of the present invention;
[0027] Figure 4 It is a schematic diagram of the segmentation result of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0029] Reference Figure 1 , introduces a specific implementation method of a ship instance segmentation method in foggy scenes based on interference suppression and dynamic contours, which specifically includes:
[0030] S1: Establish a ship instance segmentation network in foggy scenes;
[0031] S11: Input a two-dimensional foggy ship image, that is, a three-channel RGB color visible light image.
[0032] S12: Construct a feature extraction network, use a deep residual convolutional network to output features of different sizes {C3, C4, C5}, and fuse high-level and low-level features to form a feature pyramid {P3, P4, P5, P6, P7}.
[0033] S13: a parameter generation network, wherein the parameter generation network is respectively connected to different output feature maps of the feature pyramid to perform parameter prediction, thereby ensuring the segmentation accuracy of multi-scale targets.
[0034] The parameter generation network consists of 3 sets of parallel Convs convolutional layers, and the output is the controller Classifier p x,y and controller θ x,y The Convs are four 3×3 convolutional layers. Controller Predict the convolution kernel parameters, i.e. weights and biases, of the dynamic contour learning module for each instance. Classifier p x,y Predict the class probability of the target at position (x, y). Controller θ x,y Predict the convolution kernel parameters, i.e. weights and biases, of the mask module for each instance.
[0035] S14: Interference suppression module, which makes the ship instance segmentation network pay more attention to effective information features and suppresses the interference of sea fog on the segmented ships.
[0036] The interference suppression module extracts effective features from both pixel and channel aspects. Figure 2As shown in the figure, first, in terms of pixel feature extraction, a 1×1 convolution operation is used for each output layer {P4, P5, P6} of the feature pyramid to reduce the number of channels from 256 to 128. Then the pixel feature extraction module (PFE) is connected respectively. PFE consists of two 1×1 convolutions for reshaping features and two activation functions relu and sigmoid. Output The number of channels is 128, and the fusion operation x of the input and output is element-wise multiplication. All feature maps are upsampled to match Finally, Use pixel-wise additive fusion to merge information from different levels.
[0037] Secondly, channel feature extraction is first used A 3×3 convolution operation is performed to obtain F1. A large convolution kernel 5×5 is used to obtain a larger receptive field feature F2. The global average pooling operation is used to compress the global spatial information into one channel. Two fully connected layers generate a set of modulation weights F3 for each channel to re-match the channel information. F4 and F1 are connected on the channel, and the output channel is 256. Conv1×1 convolution performs channel dimension reduction from 256 to 128. The final output feature of the interference suppression module is F IR .
[0038] S15: Contour branch, used to extract contour features as input to the dynamic contour learning module.
[0039] The contour branch consists of four 3×3 convolutions, connected to a feature fusion module to fuse the contour features F contour and the mask feature F mask . F contour It can provide accurate overall information features for the mask to help obtain more complete segmentation of ships in foggy scenes. The mask feature F mask It is used as input to the mask module to predict the required instance mask.
[0040] S16: Segmentation network for dynamically predicting the mask and contour of each instance.
[0041] The segmentation network includes a mask module and a dynamic contour learning module. The mask module is combined with the mask branch to dynamically predict the mask of each instance. It is composed of three 1×1 8-channel convolution layers stacked together. The dynamic contour learning module is connected in parallel with the mask module to output the contour of each object. The dynamic contour learning module consists of three 1×1 8-channel convolutions, and uses dynamic convolutions in combination with the above-mentioned contour branch to learn the contour of the blurred ship and assist in mask prediction in foggy scenes. Here, the dynamic contour learning module is only used to assist the training of the main network and does not participate in the final test.
[0042] S2: training foggy ship instance segmentation network;
[0043] S21: Design a loss function to optimize the training of the ship instance segmentation network in foggy weather.
[0044] The loss function is L = L fcos +L mask +λL contour , where L fcos , L mask and L contour They represent Fcos loss, mask loss and contour loss respectively. λ represents L contour The weight coefficient is set to 1 after experimental verification.
[0045] The contour loss is L contour (p b , g b )=L dice (p b , g b )+L BCE (p b , g b ), where L dice represents Dice loss and L BCE is the binary cross entropy loss, g b is the contour true result, generated by the Laplacian operator based on the mask true result. b is the contour prediction result, Where DCLM stands for Dynamic Contour Learning Module, is the contour feature, are the convolution parameters of the dynamic contour learning module.
[0046] S22: Establish a ship instance segmentation dataset in foggy sea for network training.
[0047] Considering the scarcity of ocean data in foggy weather, a foggy image simulation method is used for data expansion. This method generates simulated fog on real ocean images. In this way, a ship instance segmentation dataset for foggy scenes is established, named Foggy ShipInsseg dataset. The Foggy ShipInsseg dataset contains 5739 foggy images and 10900 fine instance mask annotations, which are divided into three sub-datasets: Fog-Train, Fog-Test and Real-Fog. Among them, Fog-Train contains 604 real foggy images and 3,447 simulated foggy images. The total number of instances is 10900, and the number of small, medium and large targets is 2619, 3462 and 4819 respectively.
[0048] The real ocean image here is a clear sea scene, including the real distribution of different types and numbers of ships. The Foggy ShipInsseg dataset uses the Labelme marking tool to mark the instance masks of ships, using polygons of different colors to distinguish different ships. Figure 3 shown.
[0049] In the experiment, the Fog-Train dataset is used to train the instance segmentation network, and the model is tested on Fog-Test and Real-Fog. In addition, Foggy ShipInsseg is also suitable for ship detection in foggy scenes.
[0050] S3: Test the segmentation effect of ship instances in foggy weather;
[0051] The images of the Fog-Test and Real-Fog datasets to be tested are input into the trained foggy ship instance segmentation model to obtain the ship segmentation results.
[0052] Figure 4 To compare the segmentation results of different instance segmentation methods, Figure 4 (1) is the input image, Figure 4 (2) is the true result, Figure 4 (3) and Figure 4 (4) are the results of CondInst and the method of the present invention. The results show that CondInst cannot detect and segment dense foggy blurred ships. The method of the present invention reduces missed detection of ships and can improve the accuracy of ship segmentation in foggy scenes.
[0053] The present invention uses an interference suppression module to extract important features from pixels and channels and reduce the interference caused by fog on ship segmentation, and dynamically learns contour information to assist in predicting the mask of foggy ship. The present invention reduces ship missed detection to a certain extent and can accurately segment ships in foggy scenes.
Claims
1. A ship instance segmentation method in foggy scenes based on interference suppression and dynamic contours, characterized by: The following steps are involved: Step 1: Establish a ship instance segmentation network in foggy scenes The ship instance segmentation network in the foggy scene includes a feature extraction network, a parameter generation network, an interference suppression module, a contour branch and a segmentation network. The feature extraction network uses a deep residual convolutional network to output features of different sizes to fuse high-level and low-level features to form a feature pyramid. The parameter generation network is connected to different output feature maps of the feature pyramid for parameter prediction, ensuring the segmentation accuracy of multi-scale targets. The parameter generation network consists of three groups of parallel Convs convolutional layers, and the output is the controller Classifier x,y and controller θ x,y, The interference suppression module makes the ship instance segmentation network pay more attention to effective information features and suppresses the interference of sea fog on the segmentation of ships. The interference suppression module extracts effective features from both pixels and channels, and the output result is F IR, The contour branch is used to extract contour features as the input of the dynamic contour learning module. The contour branch consists of four 3×3 convolutions connected to a feature fusion module to fuse the contour features F contour and the mask feature F mask, The segmentation network is used to dynamically predict the mask and contour of each instance. The segmentation network includes a mask module and a dynamic contour learning module, both of which are composed of three 1×1 8-channel convolutions. The dynamic contour learning module is only used to assist the training of the main network and does not participate in the final test. At the same time, the dynamic convolution is used in combination with the contour branch to learn the contour of the blurred ship and assist in the mask prediction in the foggy scene. Step 2: Train the foggy ship instance segmentation network Design a loss function to optimize the training of the foggy ship instance segmentation network. The loss function is L = L fcos +L mask +λL contour , where L contour (p b , g b )=L dice (p b , g b )+L BCE (p b , g b ), L fcos , L mask and L contour They represent Fcos loss, mask loss and contour loss respectively, and λ represents L contour The weight coefficient is set to 1, L dice represents Dice loss and L BCE is the binary cross entropy loss, g b is the true result of the contour, p b is the contour prediction result, Establish the sea foggy ship instance segmentation dataset Foggy ShipInsseg for network training. The Foggy ShipInsseg dataset contains 5739 foggy images and 10900 fine instance mask annotations, which are divided into three sub-datasets: Fog-Train, Fog-Test, and Real-Fog. The ship data on foggy sea is expanded using a foggy image simulation method, which generates simulated fog on real ocean images. The dataset includes real foggy images and simulated foggy images. Step 3: Test the ship instance segmentation effect in foggy weather The images of the Fog-Test and Real-Fog datasets to be tested are input into the trained foggy ship instance segmentation model to obtain the ship segmentation results.
2. The method for segmenting ship instances in foggy scenes based on interference suppression and dynamic contours according to claim 1 is characterized by: The feature pyramids of the feature extraction network are Resnet-50-FPN and Resnet-101-FPN.
3. The method for segmenting ship instances in foggy scenes based on interference suppression and dynamic contours according to claim 1 is characterized by: The loss function Where DCLM stands for Dynamic Contour Learning Module, is the contour feature, are the convolution parameters of the dynamic contour learning module.
