Target semantic segmentation model training method, generation method, device and storage medium

Through the method of feature extraction and loss calculation of remote sensing images, the problem of large deviations in the semantic segmentation results of remote sensing images is solved, and the classification accuracy and discrimination ability of the model are improved.

CN118262104BActive Publication Date: 2025-02-21CHINA AERO GEOPHYSICAL SURVEY & REMOTE SENSING CENT FOR LAND & RESOURCES +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410245146.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-02-21
Estimated Expiration
2044-03-05

AI Technical Summary

Technical Problem

In the target semantic segmentation of remote sensing images, the prior art causes large deviations in the target semantic segmentation results due to factors such as complex background, shooting angle, imaging principle, and noise.

Method used

By obtaining the target semantic segmentation data set, feature extraction is performed on the remote sensing image information, shallow, sub-deep and deep fusion features are obtained, and boundary loss, overall loss and segmentation loss are calculated based on these features, and the semantic segmentation model is trained in the comprehensive these losses.

Benefits of technology

By fusing features of different scales and levels, the model's ability to distinguish images is enhanced, the classification accuracy of the target semantic segmentation model is improved, and the deviation of the result is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118262104B_ABST
    Figure CN118262104B_ABST
Patent Text Reader

Abstract

The present invention provides a target semantic segmentation model training method, generation method, device and storage medium, which relates to the field of computer technology, including: obtaining a target semantic segmentation data set, the target semantic segmentation data set includes multiple remote sensing image information, and the remote sensing image information includes a label value; extracting features from the remote sensing image information to obtain fusion features, the fusion features include shallow fusion features, sub-deep fusion features and deep fusion features; obtaining boundary loss and overall loss according to the remote sensing image information, shallow fusion features and sub-deep fusion features; obtaining a predicted value according to the deep fusion features, and obtaining a segmentation loss according to the predicted value and the label value; obtaining a target loss according to the boundary loss, the overall loss and the segmentation loss; based on the target loss, training a preset semantic segmentation model through the target semantic segmentation data set to obtain a target semantic segmentation model. The present invention improves the classification accuracy of the target semantic segmentation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a target semantic segmentation model training method, generation method, device and storage medium. Background Art

[0002] Semantic segmentation has a wide range of applications in the fields of autonomous driving, industrial inspection, and data collection for ocean internal wave recognition. Existing semantic segmentation algorithms rely on manual annotation of image pixels, and then train deep learning networks to use the trained models to perform semantic segmentation of objects. However, when performing semantic segmentation on remote sensing images, the difficulty of identification is greatly increased due to the influence of factors such as complex background, shooting angle, imaging principle, noise, and features such as multi-sized objects, irregular or blurred edges. Therefore, the semantic segmentation results of the target are not accurate, and the classification results are highly biased. Summary of the invention

[0003] The problem solved by the present invention is that the target semantic segmentation result has a large deviation.

[0004] In order to solve the above problems, the present invention provides a target semantic segmentation model training method, comprising:

[0005] Acquire a target semantic segmentation dataset, wherein the target semantic segmentation dataset includes a plurality of remote sensing image information, and the remote sensing image information includes a label value;

[0006] A fusion feature is obtained by extracting features from the remote sensing image information, wherein the fusion feature includes a shallow fusion feature, a sub-deep fusion feature and a deep fusion feature;

[0007] Obtaining boundary loss and overall loss according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features;

[0008] Obtaining a prediction value according to the deep fusion feature, and obtaining a segmentation loss according to the prediction value and the label value;

[0009] Obtaining a target loss according to the boundary loss, the overall loss, and the segmentation loss;

[0010] Based on the target loss, a preset semantic segmentation model is trained using the target semantic segmentation data set to obtain a target semantic segmentation model.

[0011] Optionally, it is characterized in that the fusion features are obtained by extracting features from the remote sensing image information, and the fusion features include shallow fusion features, sub-deep fusion features and deep fusion features, including:

[0012] Inputting the remote sensing image information into a densely connected feature extraction block to obtain the shallow fusion feature;

[0013] Inputting the shallow fusion features into the densely connected feature extraction block to obtain the sub-deep fusion features;

[0014] The sub-deep fusion features are input into the densely connected feature extraction block to obtain the deep fusion features.

[0015] Optionally, obtaining the boundary loss and the overall loss according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features includes:

[0016] Using the remote sensing image information, boundary information and overall information are obtained respectively;

[0017] The boundary loss is obtained according to the boundary information and the shallow features, and the overall loss is obtained according to the overall information and the sub-deep features.

[0018] Optionally, the using the remote sensing image information to obtain boundary information and overall information respectively includes:

[0019] Get multiple preset convolution kernels;

[0020] Extracting the boundary scale features and the overall scale features of the remote sensing image information respectively according to each of the preset convolution kernels;

[0021] The boundary information and the overall information are obtained by fusing the boundary scale feature and the overall scale feature.

[0022] Optionally, obtaining a prediction value according to the deep fusion feature includes:

[0023] The deep fusion features are used to extract long-distance dependency features to obtain dependency features;

[0024] Obtaining a deep dependency feature by fusing the deep fusion feature and the dependency feature;

[0025] The deep dependency feature is input into a decoder to obtain the predicted value.

[0026] Optionally, obtaining a target loss according to the boundary loss, the overall loss and the segmentation loss includes:

[0027] The sum of the boundary loss, the overall loss and the segmentation loss is taken as the target loss.

[0028] Optionally, obtaining a target semantic segmentation dataset includes:

[0029] The target semantic segmentation dataset is obtained through optical image data, radar image data and / or DEM digital elevation data.

[0030] The target semantic segmentation model training method described in the present invention obtains a target semantic segmentation data set, extracts features from the remote sensing image information, and fuses the extracted features of different scales and levels to obtain fused features, thereby obtaining richer feature information of the remote sensing image information. At the same time, the fused features are divided into shallow fusion features, sub-deep fusion features, and deep fusion features to improve the classification accuracy of the target semantic segmentation model for different scenes in the remote sensing image information. Boundary loss and overall loss are obtained based on the remote sensing image information, the shallow fusion features, and the sub-deep fusion features, and segmentation loss is obtained based on the deep fusion features. Based on the target loss, a preset semantic segmentation model is trained through the target semantic segmentation data set to obtain a target semantic segmentation model. By integrating boundary loss and overall loss into segmentation loss, the model's ability to distinguish images is enhanced, and the classification accuracy of the model is further improved.

[0031] The present invention also provides a method for generating target semantic segmentation, comprising:

[0032] Acquire target remote sensing image information;

[0033] The target remote sensing image information is input into the target semantic segmentation model obtained by the target semantic segmentation model training method as described above to obtain a target semantic segmentation result.

[0034] The target semantic segmentation generation method described in the present invention has the same advantages as the target semantic segmentation model training method over the prior art, which will not be repeated here.

[0035] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the target semantic segmentation model training method or the target semantic segmentation generation method is implemented.

[0036] The computer device described in the present invention and the target semantic segmentation model training method have the same advantages over the prior art and will not be repeated here.

[0037] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is read and executed by a processor, the target semantic segmentation model training method or the target semantic segmentation generation method is implemented.

[0038] The computer-readable storage medium described in the present invention and the target semantic segmentation model training method have the same advantages over the prior art and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 The figure shows an application environment diagram of a target semantic segmentation model training method in an optional embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of the process of training a target semantic segmentation model in an optional embodiment of the present invention;

[0043] Figure 3 Shown is a schematic diagram of a gradient embedding module in an optional embodiment of the present invention;

[0044] Figure 4 Shown is a flow chart of a method for generating target semantic segmentation in an optional embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the optional embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the optional embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0046] Figure 1 FIG. 1 is an application environment diagram of the target semantic segmentation model training method in an optional embodiment of the present invention. Figure 1 , the target semantic segmentation model training method is applied to the target semantic segmentation model training system. The target semantic segmentation model training system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 can be implemented as an independent server or a server cluster composed of multiple servers.

[0047] Combination Figure 2 As shown, this embodiment provides a target semantic segmentation model training method, including:

[0048] Step 210: Acquire a target semantic segmentation dataset, where the target semantic segmentation dataset includes a plurality of remote sensing image information, and the remote sensing image information includes a label value.

[0049] Specifically, the remote sensing image may be a remote sensing image of ocean internal waves. The collected remote sensing image information of ocean internal waves may be labeled, and a target semantic segmentation data set may be established using the labeled remote sensing image information, which is used for model training.

[0050] Step 220, obtaining fusion features by extracting features from the remote sensing image information, wherein the fusion features include shallow fusion features, sub-deep fusion features and deep fusion features.

[0051] Specifically, densely connected features are extracted from remote sensing image information, and the extracted features of different scales and levels are fused to obtain fused features, which can have a better recognition effect on internal waves of different scales.

[0052] Step 230 , obtaining boundary loss and overall loss according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features.

[0053] Specifically, relevant boundary information and overall information are extracted through the remote sensing image information, and the boundary loss and overall loss are calculated for the shallow fusion features with less boundary information loss and the sub-deep fusion features with stronger semantic information to guide the main branch to focus on the boundary and overall information.

[0054] Step 240, obtaining a prediction value according to the deep fusion feature, and obtaining a segmentation loss according to the prediction value and the label value.

[0055] Specifically, the deep dependency feature is input into a decoder to obtain a prediction value, and the segmentation loss is calculated for the prediction value and the label value.

[0056] Step 250, obtaining a target loss according to the boundary loss, the overall loss and the segmentation loss.

[0057] Step 260: Based on the target loss, a preset semantic segmentation model is trained using the target semantic segmentation dataset to obtain a target semantic segmentation model.

[0058] Specifically, the boundary loss, the overall loss and the segmentation loss are added and then back-propagated to obtain the target semantic segmentation model. The boundary loss, the overall loss and the segmentation loss are added to form a new loss, and the new loss is back-propagated to better guide the classification effect of the main line model.

[0059] In this embodiment, feature extraction is performed on the remote sensing image information, and the extracted features of different scales and levels are fused to obtain fused features, so as to obtain richer feature information of the remote sensing image information. At the same time, the fused features are divided into shallow fusion features, sub-deep fusion features and deep fusion features to improve the classification accuracy of the target semantic segmentation model for different scenes in the remote sensing image information. Boundary loss and overall loss are obtained according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features, and segmentation loss is obtained according to the deep fusion features. Based on the target loss, a preset semantic segmentation model is trained through the target semantic segmentation data set to obtain a target semantic segmentation model. This allows the model to integrate segmentation loss through boundary and overall loss, thereby enhancing the model's ability to distinguish images and further improving the classification accuracy of the model.

[0060] In an optional embodiment of the present invention, the fusion feature is obtained by extracting features from the remote sensing image information, and the fusion feature includes a shallow fusion feature, a sub-deep fusion feature and a deep fusion feature, including:

[0061] Inputting the remote sensing image information into a densely connected feature extraction block to obtain the shallow fusion feature;

[0062] Inputting the shallow fusion features into the densely connected feature extraction block to obtain the sub-deep fusion features;

[0063] The sub-deep fusion features are input into the densely connected feature extraction block to obtain the deep fusion features.

[0064] Specifically, the remote sensing image information is input into the densely connected feature extraction block for densely connected feature extraction, and the extracted features of different scales and levels are fused to obtain fused features. The features that pass through 1, 2, and 3 densely connected feature extraction blocks are divided into shallow fusion features, sub-deep fusion features, and deep fusion features. For example, there are internal waves of different scales in the ocean internal wave scene. As the convolution deepens, small-scale internal waves will cause serious information loss. Therefore, through dense connection, features of different scales and levels are fused layer by layer to alleviate the serious information loss of small-scale internal waves.

[0065] In some embodiments, features of different scales and depths are obtained by densely connecting feature extraction blocks, and convolution operations are first performed according to a 1×1 convolution kernel with a set step size of 1, a 3×3 convolution kernel with a step size of 1, and a 3×3 convolution kernel with a step size of 2. After sequentially undergoing 1×1, 3×1, 1×1, 3×2, 3×1, 3×1, 3×1, 3×1 convolutions, the features that have undergone 3×1, 3×1, 3×1 convolutions and the features that have undergone 1×1 convolutions and then pooling maxpoling (2) are superimposed by cat operations, and the obtained features are sequentially subjected to 1×1, 3×1, 3×1, 3×1, and the features of these four parts are superimposed by cat operations to output the final features.

[0066] In some embodiments, Figure 3 As shown in the figure, a gradient embedding module is added after each densely connected feature extraction block. The gradient embedding module is to combine the gradient features M extracted from the original image with the features I after the three densely connected feature extraction blocks. n After embedding the gradient features obtained from the original image into each improved densely connected block, Gaussian filtering is used to alleviate the noise. The Gaussian kernel is set to 8×8 after experimental comparison. The gradient feature M extracted from the original image is convolved, and the convolution kernel is set to d x and d y , calculate the gradient of the horizontal x and vertical y, and thus calculate the gradient feature M.

[0067] Wherein, the Gaussian filter includes

[0068]

[0069] Among them, σ is the standard deviation of the Gaussian kernel, which determines the smoothness of the filter, i and j are the pixel positions in the image, and e and π are constants.

[0070] Among them, the d x and d y include:

[0071]

[0072] Wherein, the M includes:

[0073]

[0074] Among them, the B n include:

[0075] B n (i, j) = I n (i,j)×M(i,j)n=(1,2,3),

[0076] Among them, B nis the result obtained after gradient embedding processing, I n It is the feature map obtained after n densely connected feature extraction blocks.

[0077] The target semantic segmentation model training method of this embodiment obtains deep features by extracting features of different scales and levels, and can obtain richer overall information in the remote sensing image information. Since the remote sensing image information loses some detail information after multi-layer convolution, the loss of important image information with the increase of network depth can be avoided by densely connecting the features of each level. The fused features obtained by densely connecting and fusing the features of each level retain both rich overall image information and important detail image information, thereby improving the model's ability to distinguish remote sensing image features and further improving the classification accuracy of the model.

[0078] In an optional embodiment of the present invention, the boundary loss and the overall loss are obtained according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features, including:

[0079] Using the remote sensing image information, boundary information and overall information are obtained respectively;

[0080] The boundary loss is obtained according to the boundary information and the shallow features, and the overall loss is obtained according to the overall information and the sub-deep features.

[0081] Specifically, by resampling the boundary information and the overall information, the boundary information and the overall information that are equal in size to the shallow features and the second-deep features are respectively calculated with the shallow fusion features with less boundary information loss and the second-deep fusion features with stronger semantic information, so as to guide the main branch to focus on the boundary and overall information.

[0082] The boundary loss obtained according to the boundary information and the shallow features includes: extracting the boundary through a commonly used canny operator, and performing 3×1, 3×2, and 3×4 convolutions on the extracted boundaries. Since the steps of their convolutions are different, the output image sizes are different, so it is necessary to resample the images after 3×2 and 3×4 convolutions to the same size as after 3×1 convolution, and then superimpose the three features to perform cat, and then adjust them to the boundary information of 1 channel through 1×1 convolution. Finally, this boundary information and the shallow fusion feature generated by the first improved dense connection block are adjusted to the features of 1 channel through a 1×1 convolution to calculate a bce_loss and a dice_loss.

[0083] The overall loss obtained according to the overall information and the sub-deep features includes: extracting the original image based on the internal wave as a whole, first calculating the horizontal a and vertical b gradients of the original image, then calculating the total gradient of the square of a plus the square of b under the square root of the corresponding pixels in the gradient a and b, then setting a threshold, setting the elements that meet the threshold range to 1, and setting the others to 0, generating the overall information, and then performing 3×1, 3×2, and 3×4 convolutions on the overall information respectively. Since the different convolution steps lead to different output image sizes, it is necessary to resample the images after 3×2 and 3×4 convolutions to the same size as after 3×1 convolution, and then superimpose the three features by cat, and then adjust them to the overall information of 1 channel through 1×1 convolution. Finally, the overall information and the sub-deep fusion features generated by the second improved dense connection block are adjusted to the features of 1 channel through a 1×1 convolution to calculate a bce_loss and a dice_loss. Finally, the cross entropy loss of the main branch is added to these four losses and back-propagated, and the boundary and overall feature enhancement modules are used to guide the main branch model to focus on the boundary features of the internal waves.

[0084] Wherein, the bce_loss includes:

[0085] bce_loss=-[ylog(p(x))+(1-y)log(1-p(x))],

[0086] Among them, bce_loss is the bce loss, y is the label value, and p(x) is the model output.

[0087] Wherein, the dice_loss includes:

[0088]

[0089] Among them, dice_loss is dice loss, y i and is the label value and predicted value of pixel i, and N is the total number of pixels.

[0090] In an optional embodiment of the present invention, the step of obtaining boundary information and overall information respectively by using the remote sensing image information includes:

[0091] Get multiple preset convolution kernels;

[0092] Extracting the boundary scale features and the overall scale features of the remote sensing image information respectively according to each of the preset convolution kernels;

[0093] The boundary information and the overall information are obtained by fusing the boundary scale feature and the overall scale feature.

[0094] Specifically, the remote sensing image information is respectively subjected to boundary extraction based on the Canny operator and gradient extraction, and three preset convolution kernels are obtained. According to each preset convolution kernel, boundary feature extraction and overall feature extraction are performed on the boundary and the whole to obtain corresponding scale features. The scale features are fused to obtain boundary information and overall information. For example, the boundary and overall range of ocean internal waves are important information for studying the intensity of internal waves. Due to the huge disturbance of the ocean environment, ocean internal waves have blurred edges in SAR images. Therefore, the extraction of boundary information based on the Canny operator and the extraction of overall information based on the unique gradient features of internal waves on SAR images are introduced.

[0095] The target semantic segmentation model training method of this embodiment extracts boundaries of remote sensing image information based on the Canny operator and extracts the whole based on the gradient, and then generates boundary information and overall information through a pyramid extraction information module, and calculates boundary and overall losses with shallow fusion features and sub-deep fusion features respectively, so that the model can more accurately identify ocean internal waves.

[0096] In an optional embodiment of the present invention, obtaining a prediction value according to the deep fusion feature includes:

[0097] The deep fusion features are used to extract long-distance dependency features to obtain dependency features;

[0098] Obtaining a deep dependency feature by fusing the deep fusion feature and the dependency feature;

[0099] The deep dependency feature is input into a decoder to obtain the predicted value.

[0100] Specifically, the Transformer extracts long-distance dependency information from deep features, generates dependency features, and fuses deep features and dependency features to obtain deep dependency features. Transformer is a model that uses the attention mechanism to increase the speed of model training. The core idea of ​​the Transformer model is the self-attention mechanism - the ability to pay attention to different positions of the input sequence to calculate the representation of the sequence.

[0101] The target semantic segmentation model training method of this embodiment uses Transformer to extract long-distance dependency information of deep features, thereby realizing parallel computing to improve feature extraction efficiency.

[0102] In an optional embodiment of the present invention, obtaining the target loss according to the boundary loss, the overall loss and the segmentation loss includes:

[0103] The sum of the boundary loss, the overall loss and the segmentation loss is taken as the target loss.

[0104] In an optional embodiment of the present invention, the step of obtaining a target semantic segmentation dataset includes:

[0105] The target semantic segmentation dataset is obtained through optical image data, radar image data and / or DEM digital elevation data.

[0106] The target semantic segmentation model training method described in the present invention obtains a target semantic segmentation data set, extracts features from the remote sensing image information, and fuses the extracted features of different scales and levels to obtain fused features, thereby obtaining richer feature information of the remote sensing image information. At the same time, the fused features are divided into shallow fusion features, sub-deep fusion features, and deep fusion features to improve the classification accuracy of the target semantic segmentation model for different scenes in the remote sensing image information. Boundary loss and overall loss are obtained based on the remote sensing image information, the shallow fusion features, and the sub-deep fusion features, and segmentation loss is obtained based on the deep fusion features. Based on the target loss, a preset semantic segmentation model is trained through the target semantic segmentation data set to obtain a target semantic segmentation model. This allows the model to integrate segmentation loss through boundary and overall losses, thereby enhancing the model's ability to distinguish images and further improving the classification accuracy of the model.

[0107] Corresponding to the above target semantic segmentation model training method, such as Figure 4 As shown, another embodiment of the present invention further provides a method for generating target semantic segmentation, comprising:

[0108] Step 410, obtaining target remote sensing image information;

[0109] Step 420 , input the target remote sensing image information into the target semantic segmentation model obtained by the target semantic segmentation model training method as described above, to obtain a target semantic segmentation result.

[0110] Specifically, the remote sensing image information to be processed is input into the target semantic segmentation model obtained by the above-mentioned target semantic segmentation model training method. The model is obtained by comprehensive feature training of remote sensing images with remote sensing image edge information, label information and feature information. Considering the class imbalance problem, the loss function adopts the classic focal loss function. Compared with the existing technology, it effectively improves the accuracy of semantic segmentation of ocean internal waves.

[0111] The target semantic segmentation generation method described in the present invention has the same advantages as the target semantic segmentation model training method over the prior art, which will not be repeated here.

[0112] Another embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the following steps are implemented when the processor executes the computer program: acquiring a target semantic segmentation dataset, wherein the target semantic segmentation dataset includes a plurality of remote sensing image information, wherein the remote sensing image information includes a label value;

[0113] A fusion feature is obtained by extracting features from the remote sensing image information, wherein the fusion feature includes a shallow fusion feature, a sub-deep fusion feature and a deep fusion feature;

[0114] Obtaining boundary loss and overall loss according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features;

[0115] Obtaining a prediction value according to the deep fusion feature, and obtaining a segmentation loss according to the prediction value and the label value;

[0116] Obtaining a target loss according to the boundary loss, the overall loss, and the segmentation loss;

[0117] Based on the target loss, a preset semantic segmentation model is trained using the target semantic segmentation data set to obtain a target semantic segmentation model.

[0118] The computer device described in the present invention and the target semantic segmentation model training method have the same advantages over the prior art and will not be repeated here.

[0119] Another embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is read and executed by a processor, the following steps are implemented: obtaining a target semantic segmentation dataset, wherein the target semantic segmentation dataset includes a plurality of remote sensing image information, wherein the remote sensing image information includes a label value;

[0120] A fusion feature is obtained by extracting features from the remote sensing image information, wherein the fusion feature includes a shallow fusion feature, a sub-deep fusion feature and a deep fusion feature;

[0121] Obtaining boundary loss and overall loss according to the remote sensing image information, the shallow fusion features and the sub-deep fusion features;

[0122] Obtaining a prediction value according to the deep fusion feature, and obtaining a segmentation loss according to the prediction value and the label value;

[0123] Obtaining a target loss according to the boundary loss, the overall loss, and the segmentation loss;

[0124] Based on the target loss, a preset semantic segmentation model is trained using the target semantic segmentation data set to obtain a target semantic segmentation model.

[0125] The computer-readable storage medium described in the present invention and the target semantic segmentation model training method have the same advantages over the prior art and will not be repeated here.

[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0127] It should be noted that, in the present invention, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0128] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features of the present invention.

Claims

1. A target semantic segmentation model training method, characterized in that: include: Acquire a target semantic segmentation dataset, wherein the target semantic segmentation dataset includes a plurality of remote sensing image information, and the remote sensing image information includes a label value; The fusion features are obtained by extracting features from the remote sensing image information, and the fusion features include shallow fusion features, sub-deep fusion features and deep fusion features, including: Inputting the remote sensing image information into a densely connected feature extraction block to obtain the shallow fusion feature; Inputting the shallow fusion features into the densely connected feature extraction block to obtain the sub-deep fusion features; Inputting the sub-deep fusion feature into the densely connected feature extraction block to obtain the deep fusion feature; According to the remote sensing image information, the shallow fusion features and the sub-deep fusion features, a boundary loss and an overall loss are obtained, including: Using the remote sensing image information, boundary information and overall information are obtained respectively; Obtaining the boundary loss according to the boundary information and the shallow fusion feature, and obtaining the overall loss according to the overall information and the second deep fusion feature; Obtaining a prediction value according to the deep fusion feature, and obtaining a segmentation loss according to the prediction value and the label value; Obtaining a target loss according to the boundary loss, the overall loss, and the segmentation loss; Based on the target loss, a preset semantic segmentation model is trained by using the target semantic segmentation data set to obtain a target semantic segmentation model; The boundary loss is obtained according to the boundary information and the shallow fusion feature, including: performing boundary extraction through a canny operator, performing 3×1, 3×2, and 3×4 convolutions on the extracted boundaries respectively, resampling the images after the 3×2 and 3×4 convolutions to the same size as after the 3×1 convolution, superimposing the three features, adjusting the boundary information to 1 channel through a 1×1 convolution, and performing a 1×1 convolution on the boundary information and the shallow fusion feature to adjust the feature to 1 channel to obtain a BCE loss and a DICE loss; The overall loss is obtained according to the overall information and the sub-deep fusion feature, including: performing horizontal a and vertical b gradient calculations on the original image, performing square root a plus square b calculations on corresponding pixels in the gradients a and b to obtain a total gradient, setting a threshold, setting elements that meet the threshold range to 1, and setting others to 0, generating the overall information, performing 3×1, 3×2, and 3×4 convolutions on the overall information, respectively, resampling the images after 3×2 and 3×4 convolutions to the same size as after 3×1 convolution, superimposing the three features, adjusting the overall information to 1 channel through 1×1 convolution, and performing a 1×1 convolution on the overall information and the sub-deep fusion feature to adjust the features to 1 channel to obtain a BCE loss and a DICE loss.

2. The target semantic segmentation model training method according to claim 1, characterized in that: The obtaining a prediction value according to the deep fusion feature comprises: The deep fusion features are used to extract long-distance dependency features to obtain dependency features; Obtaining a deep dependency feature by fusing the deep fusion feature and the dependency feature; The deep dependency feature is input into a decoder to obtain the predicted value.

3. The target semantic segmentation model training method according to claim 1, characterized in that: The obtaining of the target loss according to the boundary loss, the overall loss and the segmentation loss comprises: The sum of the boundary loss, the overall loss and the segmentation loss is taken as the target loss.

4. The target semantic segmentation model training method according to claim 1, characterized in that: The step of obtaining a target semantic segmentation dataset includes: The target semantic segmentation dataset is obtained through optical image data, radar image data and / or DEM digital elevation data.

5. A method for generating target semantic segmentation, characterized in that: include: Acquire target remote sensing image information; The target remote sensing image information is input into the target semantic segmentation model obtained by the target semantic segmentation model training method according to any one of claims 1 to 4 to obtain a target semantic segmentation result.

6. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the target semantic segmentation model training method as described in any one of claims 1 to 4 or the target semantic segmentation generation method as described in claim 5 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is read and executed by a processor, the target semantic segmentation model training method as described in any one of claims 1 to 4 or the target semantic segmentation generation method as described in claim 5 is implemented.

Citation Information

Patent Citations

  • Remote sensing image building segmentation method based on attention mechanism and multi-scale features

    CN113298818A

  • Sea-land segmentation method based on context attention and boundary perception guidance

    CN117635628A