A boundary-driven neural network architecture for unmanned vessel environment understanding
By designing a boundary-driven neural network structure in the unmanned ship environment, combined with Resnet101 and multi-layer convolution pyramid modules, the problem of low accuracy in extracting marine environment feature information in the unmanned ship environment is solved, and high-precision water surface boundary extraction and Boundary feature extraction is suitable for autonomous navigation of unmanned ships in complex maritime environments.
Patent Information
- Application Number
- CN202410867559.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-01
AI Technical Summary
In the unmanned ship environment, existing technology is difficult to effectively extract marine environment feature information, especially in complex maritime environments, resulting in large errors in water surface boundary prediction, and traditional vision methods are difficult to handle ocean background changes.
A boundary-driven neural network structure for unmanned ship environment understanding is designed, including the network main branch, edge extraction module, edge enhancement module and loss function. It adopts the Resnet101 structure and multi-layer convolution pyramid module, and uses edge attention flow. Multi-scale features are integrated with the channel attention module to improve the accuracy of boundary extraction.
It achieves fast and accurate water surface boundary extraction, reduces the false detection rate, and improves the accuracy of boundary features in maritime environment feature information. It is suitable for autonomous navigation of unmanned ships in complex maritime environments.
Smart Images

Figure QLYQS_6
Abstract
Description
Technical Field
[0001] The invention discloses a boundary-driven neural network structure for understanding the environment of an unmanned ship, and belongs to the technical field of neural network structures. Background Art
[0002] Unmanned surface vehicles (USVs) are small in size, highly portable, and usually equipped with low-power sensors that can perform autonomous navigation. Therefore, USVs are mainly used in various scenarios for scientific exploration, environmental information collection, search and rescue, and inspection. When performing autonomous navigation, USVs must be able to perceive the surrounding environment, understand the location of obstacles and drivable waters, and plan paths and avoid obstacles in advance. Due to factors such as the limited size, small load capacity, limited energy supply, and cost constraints of USVs, common ship sensors such as radar and sonar cannot be installed on USVs. Cameras are power-saving and lightweight and can provide rich environmental information. In many application scenarios, people usually use cameras combined with deep learning networks to replace sensors such as radars, and USVs are no exception. Therefore, extracting navigation-related information from the camera's original image information is crucial for unmanned ships to achieve autonomous navigation.
[0003] In the field of unmanned vehicles and autonomous guided vehicles (AGVs), the research on autonomous navigation using sensors has developed rapidly in recent years. However, due to the many differences in the application scenarios between AGVs and USVs, the network used on AGVs cannot be easily applied to USVs. During the driving process of unmanned ships, due to the constantly changing background of the surrounding ocean, it is difficult to effectively handle such situations based on traditional visual methods, and methods based on ship hardware equipment also face great difficulties. With the rise of new deep learning network architectures, the technology for extracting marine environmental feature information from the perspective of unmanned ships is also constantly improving. At the same time, in order to segment the target objects more accurately, research has emerged on the introduction of edge information to assist unmanned ships in extracting marine environmental features. These include methods that fuse the inertial data of the inertial measurement unit (IMU) with the visual information of the decoder to improve the accuracy of water surface boundary segmentation, and methods that use least squares and median filtering to estimate the water surface boundary to improve segmentation accuracy. The above studies all estimate the position of the water surface boundary and use the auxiliary network to extract the characteristic information of the marine environment. However, in complex marine environments, there are often large errors in the prediction of the water surface boundary. In addition, when the USV is driving, the edge information captured is not only the water surface boundary, but also the boundary between the sky and obstacles, the boundary of underwater obstacles, etc. There are great challenges in using existing methods to extract the characteristic information of the marine environment from the perspective of unmanned ships. Summary of the invention
[0004] The purpose of the present invention is to provide a boundary-driven neural network structure for unmanned ship environment understanding to solve the problem of low accuracy in extracting marine environment feature information in the prior art.
[0005] A boundary-driven neural network structure for unmanned ship environment understanding includes a network main branch, an edge extraction module, an edge reinforcement module and a loss function; the network main branch includes an encoder and a decoder, the encoder adopts a Resnet101 structure, including five residual convolution blocks, a maximum pooling layer and an average pooling layer, and the decoder includes two attention refinement modules, a feature fusion module and a hole convolution pyramid pooling module; the edge extraction module includes three serial boundary attention flows, multiple convolution layers with a convolution kernel size of 1×1 and an upsampling layer; the edge reinforcement module includes a hole convolution pyramid module, a channel attention module and a convolution layer with a convolution kernel size of 1×1;
[0006] The marine environment images taken by the unmanned ship are divided into several data sets, and the data sets are imported into the neural network structure to extract the features of the marine environment information.
[0007] There are 1, 9, 12, 69, and 9 convolutional layers in the five residual convolutional blocks of the encoder respectively. The convolution kernel sizes of the convolutional layers include 7×7, 1×1, and 3×3. In the first residual convolutional block, the stride of the convolutional layer is 2, and the stride of the convolutional layers of the remaining residual convolutional blocks is 1.
[0008] In the decoder, the attention refinement module includes a downsampling layer, a convolution layer with a convolution kernel size of 1×1, a normalization layer, and a sigmoid activation layer. One attention refinement module accepts the output of the encoder pooling layer, and the other attention refinement module accepts the output of the second residual convolution block of the encoder.
[0009] The feature fusion module includes a convolution layer with a convolution kernel size of 3×3, two convolution layers with a convolution kernel size of 1×1, a normalization and ReLu activation function layer, a downsampling layer, and a Sigmoid activation function layer. The outputs of the two attention refinement modules are concat-joined. The feature fusion module receives the concatenation result and the output result of the second residual convolution block.
[0010] The atrous convolution pyramid pooling module includes four atrous convolution layers, one pooling layer, two convolution layers with a convolution kernel size of 1×1 and an upsampling layer. The convolution kernel sizes of the four atrous convolution layers are 1×1, 3×3, 3×3, and 3×3, respectively, and the expansion rates are 1, 6, 12, and 18, respectively. The atrous convolution pyramid pooling module receives the output from the feature fusion layer and processes it through an upsampling operation as the output result of the main branch.
[0011] The boundary attention flow consists of three convolutional layers with a convolution kernel size of 1×1, a ReLu activation function layer, and a Sigmoid activation function layer;
[0012] The input of the first boundary attention stream is the input image processed by the 1×1 convolution layer and the output of the first residual convolution block of the main branch processed by the upsampling layer. The input of the second boundary attention stream is the output of the first boundary attention stream processed by the 1×1 convolution layer and the output of the main branch maximum pooling layer processed by the upsampling layer. The input of the third boundary attention stream is the output of the second boundary attention stream processed by the 1×1 convolution layer and the output of the third residual convolution block of the main branch processed by the upsampling layer. The three boundary attention streams are concat spliced as the final output of the edge extraction module.
[0013] The atrous convolution pyramid module consists of four atrous convolution layers, with convolution kernel sizes of 1×1, 3×3, 3×3, and 3×3, and expansion rates of 1, 1, 4, and 8, respectively. The input of the atrous convolution pyramid module is the result of concatenating the output of the main branch of the network and the output of the edge extraction module. The result of the atrous convolution pyramid module is concatenated and output after Concat.
[0014] The channel attention module includes a maximum pooling layer, an average pooling layer, a multi-layer perceptron, and a Sigmoid activation function layer. It accepts the output of the dilated convolutional pyramid module as input and outputs it through a convolutional layer with a convolution kernel size of 1×1 as the final output of the edge enhancement module.
[0015] The loss function includes feature segmentation loss , Boundary loss and focal loss ;
[0016] The feature segmentation loss is calculated by the output of the fourth residual convolution block of the main branch, and the output of the third edge attention stream is compared with the boundary truth value. The boundary loss is calculated, and the focus loss is calculated by the output of the edge enhancement module and the feature true value. The total loss function of the network The weighted sum of the three is:
[0017] ;
[0018] , , They are the weights corresponding to the three losses.
[0019] Train the neural network structure, iterate and optimize the network parameters through stochastic gradient descent, using the constructed dataset Pre-train the neural network structure;
[0020] Using the training set and validation set Perform network training, set pre-training hyperparameters and loss function weights, and pre-training hyperparameters include the maximum number of iterations , initial learning rate , weight decay rate and batch size .
[0021] After training the neural network structure, test the neural network structure to verify the environmental information extraction effect.
[0022] Compared with the prior art, the present invention has the following beneficial effects: the neural network structure trained by the present invention can quickly extract the water surface boundary with high extraction accuracy and low false detection rate, and has good edge segmentation effect, thereby improving the accuracy of boundary feature extraction in marine environment feature information. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] A boundary-driven neural network structure for unmanned ship environment understanding includes a network main branch, an edge extraction module, an edge reinforcement module and a loss function; the network main branch includes an encoder and a decoder, the encoder adopts a Resnet101 structure, including five residual convolution blocks, a maximum pooling layer and an average pooling layer, and the decoder includes two attention refinement modules, a feature fusion module and a hole convolution pyramid pooling module; the edge extraction module includes three serial boundary attention flows, multiple convolution layers with a convolution kernel size of 1×1 and an upsampling layer; the edge reinforcement module includes a hole convolution pyramid module, a channel attention module and a convolution layer with a convolution kernel size of 1×1;
[0025] The marine environment images taken by the unmanned ship are divided into several data sets, and the data sets are imported into the neural network structure to extract the features of the marine environment information.
[0026] There are 1, 9, 12, 69, and 9 convolutional layers in the five residual convolutional blocks of the encoder respectively. The convolution kernel sizes of the convolutional layers include 7×7, 1×1, and 3×3. In the first residual convolutional block, the stride of the convolutional layer is 2, and the stride of the convolutional layers of the remaining residual convolutional blocks is 1.
[0027] In the decoder, the attention refinement module includes a downsampling layer, a convolution layer with a convolution kernel size of 1×1, a normalization layer, and a sigmoid activation layer. One attention refinement module accepts the output of the encoder pooling layer, and the other attention refinement module accepts the output of the second residual convolution block of the encoder.
[0028] The feature fusion module includes a convolution layer with a convolution kernel size of 3×3, two convolution layers with a convolution kernel size of 1×1, a normalization and ReLu activation function layer, a downsampling layer, and a Sigmoid activation function layer. The outputs of the two attention refinement modules are concat-joined. The feature fusion module receives the concatenation result and the output result of the second residual convolution block.
[0029] The atrous convolution pyramid pooling module includes four atrous convolution layers, one pooling layer, two convolution layers with a convolution kernel size of 1×1 and an upsampling layer. The convolution kernel sizes of the four atrous convolution layers are 1×1, 3×3, 3×3, and 3×3, respectively, and the expansion rates are 1, 6, 12, and 18, respectively. The atrous convolution pyramid pooling module receives the output from the feature fusion layer and processes it through an upsampling operation as the output result of the main branch.
[0030] The boundary attention flow consists of three convolutional layers with a convolution kernel size of 1×1, a ReLu activation function layer, and a Sigmoid activation function layer;
[0031] The input of the first boundary attention stream is the input image processed by the 1×1 convolution layer and the output of the first residual convolution block of the main branch processed by the upsampling layer. The input of the second boundary attention stream is the output of the first boundary attention stream processed by the 1×1 convolution layer and the output of the main branch maximum pooling layer processed by the upsampling layer. The input of the third boundary attention stream is the output of the second boundary attention stream processed by the 1×1 convolution layer and the output of the third residual convolution block of the main branch processed by the upsampling layer. The three boundary attention streams are concat spliced as the final output of the edge extraction module.
[0032] The atrous convolution pyramid module consists of four atrous convolution layers, with convolution kernel sizes of 1×1, 3×3, 3×3, and 3×3, and expansion rates of 1, 1, 4, and 8, respectively. The input of the atrous convolution pyramid module is the result of concatenating the output of the main branch of the network and the output of the edge extraction module. The result of the atrous convolution pyramid module is concatenated and output after Concat.
[0033] The channel attention module includes a maximum pooling layer, an average pooling layer, a multi-layer perceptron, and a Sigmoid activation function layer. It accepts the output of the dilated convolutional pyramid module as input and outputs it through a convolutional layer with a convolution kernel size of 1×1 as the final output of the edge enhancement module.
[0034] The loss function includes feature segmentation loss , Boundary loss and focal loss ;
[0035] The feature segmentation loss is calculated by the output of the fourth residual convolution block of the main branch, and the output of the third edge attention stream is compared with the boundary truth value. The boundary loss is calculated, and the focus loss is calculated by the output of the edge enhancement module and the feature true value. The total loss function of the network The weighted sum of the three is:
[0036] ;
[0037] , , They are the weights corresponding to the three losses.
[0038] Train the neural network structure, iterate and optimize the network parameters through stochastic gradient descent, using the constructed dataset Pre-train the neural network structure;
[0039] Using the training set and validation set Perform network training, set pre-training hyperparameters and loss function weights, and pre-training hyperparameters include the maximum number of iterations , initial learning rate , weight decay rate and batch size .
[0040] After training the neural network structure, test the neural network structure to verify the environmental information extraction effect.
[0041] Due to the limitation of unmanned ship size, load capacity and power consumption, the application of the technology of semantic segmentation of marine environment based on ship hardware equipment on unmanned ships is difficult; the current research on semantic segmentation technology in marine environment mainly focuses on eliminating the influence of environmental noise and improving model performance, while ignoring the research on boundary features that affect segmentation accuracy; and the existing semantic segmentation technology based on edge features, its edge features only involve the boundary of the water surface, but not the boundary between the sky and obstacles, the boundary of underwater obstacles, etc. In order to deal with the problem of accurate semantic segmentation of camera input images in complex marine environments, so as to effectively guide unmanned ships to perform autonomous navigation, the present invention designs a boundary-driven neural network structure for understanding the environment of unmanned ships. The network structure introduces an edge extraction module and an edge enhancement module. Through the synergy of these two modules, the network can effectively identify the boundary features between each category, thereby achieving more accurate segmentation of various environmental elements at sea.
[0042] The sample size of the MaSTr1325 dataset commonly used in the field of maritime semantic segmentation is adjusted to 512px×384px and recorded as , and according to the label value of the data set, the boundary truth value is extracted separately and recorded as , and then according to the ratio of 8:1:1 Divided into training set, validation set and test set, denoted as , and .
[0043] When the unmanned ship is traveling on the sea, the information captured by the camera mainly consists of three parts: the sky, the coast, and the sea surface. Due to the fluctuations and reflections on the sea surface, the sea surface information is relatively complex, which puts higher requirements on the network encoder. Referring to the analysis of different network encoder architectures, the backbone of the existing Deeplabv2 with Resnet101 has higher accuracy than other networks in dealing with complex marine environment segmentation tasks, so it is used as the encoder of this network.
[0044] Test the network model and verify the segmentation effect.
[0045] Sub-step 1: Test on the MaSTr1325 dataset. The dataset constructed in step 1 , which is divided into a test set Use the trained network to predict the images in the test set and use the evaluation index and To evaluate the segmentation accuracy and quality of the network. At the same time, Deeplabv3+, a semantic segmentation network commonly used in the field of deep learning, is introduced to compare HRNet with the semantic segmentation network WaSRNet used in the maritime field and the designed network to further verify the effectiveness of the designed network.
[0046] Sub-step 2: Test on the MODD2 dataset. Use the trained network to predict the images in the dataset, and use the MODS, an object detection and obstacle segmentation evaluation system for unmanned ship driving environments, to evaluate the segmentation accuracy and quality of the network. At the same time, Deeplabv3+, a semantic segmentation network commonly used in the field of deep learning, is introduced. The key point detection network HRNet and the semantic segmentation network WaSRNet used in the maritime field are compared with the designed network to further verify the effectiveness of the designed network.
[0047] Sub-step 3: Conduct ablation experiments on the edge extraction module and edge enhancement module on the MODD2 dataset. In order to further verify the role of the edge extraction module and edge enhancement module in the designed network, the datasets constructed in step 1 are respectively constructed for the network containing only the main branch, the network with the edge extraction module added, the network with the edge enhancement module added, and the network with the edge extraction module and edge enhancement module added. , that is, trained on the MaSTr1325 dataset and tested on the MODD2 dataset using the MODS evaluation system.
[0048] In order to achieve more accurate semantic segmentation in a complex marine environment, so as to better guide the unmanned ship to perform autonomous navigation, the present invention proposes a boundary reinforcement network that integrates multi-scale features. The network fully compensates for the boundary information loss caused by deep convolution in the image encoder, and solves the problem of inaccurate segmentation caused by blurred category edges in the marine environment by integrating boundary information and semantic information. The present invention proposes an edge extraction module. The module integrates the low-level and high-level features of the main branch to enrich the feature information of the boundary. At the same time, the information irrelevant to the boundary is adaptively filtered out by using the serial edge attention flow, ensuring the independence of the edge feature and other semantic features. And the edge loss function is introduced to ensure the accuracy of the edge extraction module through additional supervision. The present invention proposes an edge reinforcement module. The module integrates the edge extraction result with the semantic segmentation result, uses the hole convolution layer to form a hole convolution pyramid module, and introduces the channel attention module, which expands the receptive field while enhancing the connection between the features of each channel, strengthens the perception of the edge information context, and improves the accuracy of the edges of each category in the segmentation result.
[0049] The input image of the network is a three-channel RGB image, which is extracted layer by layer by the encoder part, and finally the high-level features output by the average pooling layer are sent to the decoder. In the decoder part, the feature is first input into the attention refinement module, and the low-level features through the residual convolution block are also input into the attention refinement module. The main branch can effectively segment each category by extracting the feature map and fusing the low-level features with the high-level features. However, since the main branch does not learn the edge features of the category, the network does not understand it enough, and the edges between categories of the output results are fuzzy. In order to make up for this limitation, the edge extraction module and the edge enhancement module are introduced to enhance the model's capture of edge features and improve the accuracy of semantic segmentation.
[0050] The key to high-precision semantic segmentation in a complex marine environment is to accurately divide the boundaries between semantic information of each category. In order to obtain accurate boundary information from the input image and the decoder, the present invention designs a boundary extraction module. Compared with the high-level feature map, the low-level feature map close to the input image has a higher resolution, that is, it has more edge features, but less semantic information. The high-level feature map has richer semantic information and a larger receptive field, but due to its low resolution, it leads to the loss of edge features. Therefore, in order to combine the advantages of the two, in order to maintain rich semantics while reducing the loss of boundary information, the present invention fuses the high-resolution low-level features and low-resolution high-level features of the network, so that the low-level features provide clear edge information and the high-level features provide rich semantic information. Since the fusion of features will introduce interference information irrelevant to the task, thereby affecting the extraction of edge information, an edge attention flow is designed. This module can focus the network's attention on edge-related information and adaptively eliminate irrelevant information.
[0051] The number of channels is adjusted through a 1×1 convolution layer and a Sigmoid activation function layer to obtain the attention weight map A. The size of A and (1-A) is determined, and the larger one is assigned to the attention weight map B, and the smaller one is assigned to the attention weight map C.
[0052] This operation is defined as follows:
[0053] ;
[0054] Multiplying the attention weight map B by input_1 element by element can retain the edge information missing in the high-level features in the fused feature map, while reducing the interference of irrelevant information. This strengthens the network's ability to learn edge features without significantly increasing the computational complexity.
[0055] After obtaining the semantic segmentation results and edge extraction results of the image, in order to accurately segment the input image in a complex marine environment, it is necessary to further fuse the two to solve the problem of unclear edges between different categories. Therefore, an edge enhancement module is designed. While fusing the two types of features, this module strengthens the edge features to make the edge information more prominent. This design aims to solve the problem of blurred category edges and improve the accuracy of semantic segmentation. The edge enhancement module contains two submodules, namely the atrous convolution pyramid module and the channel attention module. The two inputs of the answer clustering predictor ACP are the output results of the main branch and the output results of the edge extraction module. After splicing the two, they are sent to four convolutional layers for convolution. The purpose of this design is to expand the receptive field, especially to have a more comprehensive understanding of edge features, including the background and structure around them. At the same time, it also better captures the semantic information of each category, thereby improving the accuracy of semantic segmentation and adaptability in complex scenes. The features processed by the atrous convolution pyramid module are spliced together through the Concat operation and passed to the channel attention module as input. First, in order to retain the most significant spatial features in each channel, the input is average pooled and max pooled, and then the two pooling results are sent to the same multi-layer perceptron, which includes two hidden layers, and the number of neurons in each hidden layer is set to half the number of channels. This step aims to further integrate the multi-scale and multi-channel feature information; finally, the two outputs of the multi-layer perceptron are added and normalized through the Sigmoid activation function layer to obtain the channel attention weight map M. The inputs of the M-channel attention module are multiplied channel by channel to obtain the adjusted channel features. The feature is added to the original input again, and the number of channels is adjusted through a 1×1 convolution layer to finally obtain the prediction result. Through the synergy of ACP and attention mechanism CA, the Bayesian expectation maximization method BEM can more effectively integrate the semantic features output by the main branch and the edge features output by the bidirectional associative memory network BAM, so that the network can more accurately capture the position and relationship of the edge in the entire image, and improve the global understanding of edge features. At the same time, BEM helps to better understand the relationship between edge information and surrounding semantic information, improve the contextual perception of edges, enhance the model's ability to segment class edges, and improve the accuracy of the final segmentation.
[0056] The output of the network designed by the present invention includes two parts: one part is the edge features extracted by the last edge attention flow in the edge extraction module, and the other part is the semantic segmentation result obtained by the edge enhancement module. In the semantic segmentation task, the goal is to classify the elements in the image into three categories: sea surface, sky and obstacles. However, there are two problems that need to be solved: first, under normal circumstances, the elements of the sea surface and the sky occupy the vast majority of the image, and the number is larger than that of the obstacle elements, which leads to an imbalance in the number of samples between different categories; second, due to the complex optical phenomena such as reflections and waves on the sea surface, the characteristic information of the sea surface changes significantly, and there is a problem of difficulty in segmenting the sea surface elements.
[0057] To address the problem of sample imbalance between classes, this network uses focal loss , which alleviates the problem by adjusting the weights of the loss function so that the model pays more attention to samples that are difficult to classify. In view of the difficulty in segmenting sea surface elements, it is necessary to focus on the sea surface segmentation task during the training process to better capture and learn the unique visual features of the sea surface, thereby improving the performance of the segmentation model in dealing with the complexity of the sea surface. According to research, the main reason why sea surface elements are difficult to learn and segment is that the sea surface is reflective when there is sufficient sunlight, so part of the sea surface will be mistaken for the sky or obstacles. During the driving process of the unmanned ship, misdetecting the sky as the sea surface has little impact on path planning and driving safety. However, misidentifying obstacles as the sea surface may lead to errors in the driving planning of the unmanned ship, which may lead to serious consequences. In order to avoid such false detections, the network should accurately learn the encoding at the initial level to ensure that highly similar features are generated for the appearance of the sea surface, while generating significantly different features for obstacles. Therefore, the introduction of , the calculation result of the fourth residual convolution block of the main branch is used as the input of the loss. By learning the appearance features of the sea surface, the sea surface semantic information is clustered and separated from the obstacle semantic information, making the two types of information independent of each other, thereby achieving better separation of the sea surface and obstacles. For the edge extraction results, the network is introduced , and use the edge truth value to supervise the accuracy of edge extraction. Edge extraction is usually a pixel-level binary classification problem, that is, each pixel is either classified as an edge (positive category) or classified as a non-edge (negative category). Therefore, the present invention uses binary cross entropy loss for calculation, which effectively penalizes the model's misclassification of each pixel, prompting the model to better learn the fine features of the edge, which is defined as follows:
[0058] ;
[0059] in, is the pixel location, N is all the pixel locations, is the marginal truth value, is the marginal prediction value, is the base of the logarithm, the specific value is 2 or , When it is equal to 2, the unit of entropy is bits; equal The unit of entropy is nats.
[0060] Iterate and optimize the network parameters through the stochastic gradient descent method. Use the dataset constructed in step 1 Pre-train the designed deep learning network, that is, use the training set , about 1060 images, and a validation set , about 130 images, network training, and set pre-training hyperparameters and loss function weights. The pre-training hyperparameters include: maximum number of iterations The initial learning rate is 100. 1×10 -6 , weight decay rate 1×10 -6 , batch size is 8.
[0061] The loss function weights include: is 1, is 0.1, is 0.1.
[0062] Tested on the MaSTr1325 dataset. The dataset constructed in step 1 , which is divided into a test set , about 133 images. Use the trained network to predict the images in the test set and use the evaluation index and To evaluate the segmentation accuracy and quality of the network, its definition is as follows:
[0063] ; ;
[0064] In the formula, TP, FP and FN represent the true positive, false positive and false negative counts respectively. represents the number of categories, Indicates categories;
[0065] At the same time, Deeplabv3+, a semantic segmentation network commonly used in the field of deep learning, is introduced to compare HRNet with the semantic segmentation network WaSRNet used in the maritime field and the designed network to further verify the effectiveness of the designed network. The results are as follows. The comparison is shown in Table 1.
[0066] Table 1 Effect comparison
[0067] ;
[0068] Table 1 summarizes the prediction results of the data set MaStr1325 on different networks. It can be seen from the observation results that the segmentation accuracy of the network of the present invention is better than all other networks in the sea surface, sky and obstacles. When segmenting the sea surface and the sky, since the proportion of the sea surface and the sky in the picture is relatively high, the difference in segmentation accuracy of each network is small. Compared with the second-place WaSRNet, BEM has only a slight difference in the IoU index of 0.03% and 0.04% respectively. When segmenting obstacles, since the network of the present invention strengthens the boundary information and the proportion of obstacles in the picture is smaller than that of the sky and the sea surface, the network of the present invention has a significant gap with other networks in the IoU index. Compared with the second-place WaSRNet, the network designed by the present invention leads by about 0.28%, and the advantage is more obvious compared with HRNet. Segmentation effect of different networks in the data set MaStr1325. For the building supports on the shore (the first, third, and fifth rows), offshore buoys (the fourth row) and yachts (the second row), the segmentation effect of the network of the present invention on the boundary is better than that of the other networks. This further proves that the present invention can actually complete the semantic segmentation task in the unmanned ship marine environment.
[0069] Tested on the MODD2 dataset. All 94 sequences in the dataset were used for prediction, totaling 80,828 images. All images were resized from 640×480 to 512×384 before entering the network. The trained network was used to predict the images in the test set, and the MODS, an object detection and obstacle segmentation evaluation system for unmanned ship driving environments, was used to evaluate the segmentation accuracy and quality of the network. The evaluation criteria involved are as follows:
[0070] Obstacle-water surface edge positioning accuracy The water edge position of each image is included in the true value of the evaluation dataset. The obstacle-water edge positioning accuracy is defined as: for the mask of the water surface category in the predicted mask, the square root of the average square distance of the layer of pixels closest to the water edge true value among all pixels in the predicted mask. Its definition is as follows:
[0071] ;
[0072] In the formula, For the The distance between pixels and the true value of the water edge, is the average distance between the pixel and the true value of the water edge;
[0073] Accuracy is the accuracy and recall rate of the model for semantic segmentation is the recall rate of the model for semantic segmentation, which reflects the model's ability to successfully identify all positive samples, and the error rate is the average number of false positive detections per 100 images. It is an indicator that comprehensively considers precision and recall, and is used to comprehensively evaluate the performance of the model. The prediction results are shown in Table 2.
[0074] Table 2 Comparison of prediction results
[0075] ;
[0076] Table 2 summarizes the prediction results of different networks on the dataset MODD2 and evaluates them using the MODS evaluation criteria. In terms of obstacle-water edge positioning accuracy, due to the introduction of the boundary extraction and enhancement module in the network of the present invention, the average deviation of the detection of the water edge reaches 16.4 pixels, which is about 0.5 pixels better than the second-place WaSRNet. This result proves that the boundary module plays an important role in improving edge accuracy and confirms that the boundary module has a significant impact on the improvement of water edge positioning accuracy. Similarly, in terms of accuracy (Pr), the network of the present invention is superior to other networks, with an accuracy of 96.3%, followed by WaSRNet, which reaches 95.2%. Since these two networks are mainly used in marine environments, their accuracy is much higher than other networks. The segmentation effect of the network of the present invention on the boundary is better than that of the other networks. In summary, the network designed by the present invention has the highest obstacle-water edge positioning accuracy, the lowest false detection rate, the highest F1, and the best edge segmentation effect, so it is more competent for the autonomous navigation guidance task of unmanned ships.
[0077] Ablation experiments were conducted on the MODD2 dataset for the edge extraction module and the edge enhancement module. In order to further verify the role of the edge extraction module and the edge enhancement module in the designed network, the datasets constructed in step 1 were constructed for the network containing only the main branch, the network with the edge extraction module added, the network with the edge enhancement module added, and the network with the edge extraction module and the edge enhancement module added. , that is, the MaSTr1325 dataset is trained using the same parameters and segmentation ratio as in step 3, and tested using the MODS evaluation system on the MODD2 dataset. The MODD2 dataset settings and evaluation parameters are the same as those in sub-step 2 of this step. The prediction results are shown in Table 3.
[0078] Table 3 Comparison of ablation experiment results
[0079] ;
[0080] The addition of the boundary extraction module will The edge extraction module has been added to the image processing module, which has reduced the image size by 0.4px. The main reason is that the edge extraction module integrates multi-scale semantic information, making the sea surface boundary division more accurate. Reduced by 0.3px, and the accuracy increased by 0.5%. It has been reduced by 0.3%. The main reason is that the boundary enhancement module expands the receptive field and enhances the contextual connection between the semantic information of each channel through the void convolution and channel attention mechanism. The addition of the boundary enhancement module has supplemented the boundary details, but there are still defects. After introducing the boundary enhancement module and the boundary extraction module, the network successfully integrates multi-scale semantic information and boundary information, and strengthens the association between boundary information and multi-channel information. The edge details of the segmentation results are more improved than the main branch. At the same time, as shown in Table 3, all indicators show the effectiveness of these modules compared with the baseline model and other models.
[0081] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features may be replaced by equivalents, and these modifications or replacements 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 constructing a boundary-driven neural network structure for unmanned ship environment understanding, characterized in that: It includes a main network branch, an edge extraction module, an edge enhancement module and a loss function; the main network branch includes an encoder and a decoder. The encoder adopts the Resnet101 structure, including five residual convolution blocks, a maximum pooling layer and an average pooling layer. The decoder includes two attention refinement modules, a feature fusion module and a hole convolution pyramid pooling module; the edge extraction module includes three serial boundary attention streams, multiple convolution layers with a convolution kernel size of 1×1 and an upsampling layer; the edge enhancement module includes a hole convolution pyramid module, a channel attention module and a convolution layer with a convolution kernel size of 1×1; The marine environment images taken by the unmanned ship are divided into several data sets, and the data sets are imported into the neural network structure to extract the features of the marine environment information; The five residual convolution blocks of the encoder have 1, 9, 12, 69, and 9 convolution layers respectively. The convolution kernel sizes of the convolution layers include 7×7, 1×1, and 3×3. In the first residual convolution block, the stride of the convolution layer is 2, and the stride of the convolution layers of the remaining residual convolution blocks is 1. In the decoder, the attention refinement module includes a downsampling layer, a convolution layer with a convolution kernel size of 1×1, a normalization layer, and a sigmoid activation layer. One attention refinement module receives the output of the encoder pooling layer, and the other attention refinement module receives the output of the second residual convolution block of the encoder. The feature fusion module includes a convolution layer with a convolution kernel size of 3×3, two convolution layers with a convolution kernel size of 1×1, a normalization and ReLu activation function layer, a downsampling layer, and a Sigmoid activation function layer. The outputs of the two attention refinement modules are concat-joined. The feature fusion module receives the concatenation result and the output result of the second residual convolution block. The dilated convolution pyramid pooling module includes four dilated convolution layers, one pooling layer, two convolution layers with a convolution kernel size of 1×1, and an upsampling layer. The convolution kernel sizes of the four dilated convolution layers are 1×1, 3×3, 3×3, and 3×3, respectively, and the expansion rates are 1, 6, 12, and 18, respectively. The dilated convolution pyramid pooling module receives the output from the feature fusion layer and processes it through the upsampling operation as the output result of the main branch. The boundary attention flow consists of three convolutional layers with a convolution kernel size of 1×1, a ReLu activation function layer, and a Sigmoid activation function layer; The input of the first boundary attention stream is the input image processed by the 1×1 convolution layer and the output of the first residual convolution block of the main branch processed by the upsampling layer. The input of the second boundary attention stream is the output of the first boundary attention stream processed by the 1×1 convolution layer and the output of the main branch maximum pooling layer processed by the upsampling layer. The input of the third boundary attention stream is the output of the second boundary attention stream processed by the 1×1 convolution layer and the output of the third residual convolution block of the main branch processed by the upsampling layer. The three boundary attention streams are concat spliced as the final output of the edge extraction module. The dilated convolutional pyramid module consists of four dilated convolutional layers, with convolution kernel sizes of 1×1, 3×3, 3×3, and 3×3, and expansion rates of 1, 1, 4, and 8, respectively. The input of the dilated convolutional pyramid module is the result of concatenating the output of the main branch of the network and the output of the edge extraction module. The result of the dilated convolutional pyramid module is concatenated and output. The channel attention module includes a maximum pooling layer, an average pooling layer, a multi-layer perceptron, and a Sigmoid activation function layer. It accepts the output of the dilated convolutional pyramid module as input and outputs it through a convolutional layer with a convolution kernel size of 1×1 as the final output of the edge enhancement module. The loss function includes feature segmentation loss , Boundary loss and focal loss ; The feature segmentation loss is calculated by the output of the fourth residual convolution block of the main branch, and the output of the third edge attention stream is compared with the boundary truth value. The boundary loss is calculated, and the focus loss is calculated by the output of the edge enhancement module and the feature true value. The total loss function of the network The weighted sum of the three is: ; , , They are the weights corresponding to the three types of losses; Train the neural network structure, iterate and optimize the network parameters through stochastic gradient descent, using the constructed dataset Pre-train the neural network structure; Using the training set and validation set Perform network training, set pre-training hyperparameters and loss function weights, and pre-training hyperparameters include the maximum number of iterations , initial learning rate , weight decay rate and batch size ; After training the neural network structure, test the neural network structure to verify the environmental information extraction effect.
