A flood disaster remote sensing image segmentation method, device and system
By preprocessing and data augmenting flood disaster remote sensing images, multi-scale feature maps are generated. Pixel displacement and shuffling operations are used to solve the problem of weak boundary recognition in flood disaster remote sensing image segmentation, achieving more accurate flood boundary recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTH CHINA INSTITUTE OF SCIENCE & TECHNOLOGY (NATIONAL SAFETY TRAINING CENTER OF COAL MINES)
- Filing Date
- 2025-11-05
- Publication Date
- 2026-06-12
AI Technical Summary
Existing methods suffer from weak boundary judgment and poor consistency of segmentation results in flood disaster remote sensing image segmentation in complex scenarios.
By acquiring original images of the target study area, preprocessing and data augmentation are performed to generate multi-scale feature maps. Then, boundary recognition is improved through pixel shifting, encoding, shuffling, and fusion operations.
It improves the identification effect of flood boundaries, suppresses the segmentation fragmentation caused by intra-class spectral differences, and enhances the identification accuracy of boundaries.
Smart Images

Figure CN121305080B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image segmentation technology, and in particular to a method, apparatus, system and storage medium for segmenting remote sensing images of flood disasters. Background Technology
[0002] Floods are among the most common and destructive natural disasters globally, characterized by high frequency, wide impact, and severe economic losses, seriously threatening national economic development and the safety of people's lives and property. However, existing methods often suffer from weak boundary judgment and poor consistency of segmentation results in complex scenarios. Therefore, accurately and effectively extracting flood boundaries has become an urgent technical problem to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, system, and storage medium for segmenting remote sensing images of flood disasters, in order to improve the identification effect of flood boundaries.
[0004] This application provides a method for segmenting remote sensing images of flood disasters, including:
[0005] Acquire raw images of the target study area, wherein the raw images of the target area include remote sensing images of flood disasters;
[0006] The original image is preprocessed and data augmented to obtain the processed image;
[0007] The processed image is downsampled through a convolutional layer to generate multi-scale feature maps;
[0008] The multi-scale feature map is enhanced by pixel shifting;
[0009] Encode the enhanced multi-scale feature map;
[0010] The encoded multi-scale feature maps are shuffled and fused to generate a multi-scale feature map with fused features.
[0011] The fused feature map is decoded to complete the segmentation task and output the segmented image.
[0012] The beneficial effects of this application are as follows: It acquires original images of the target study area, including remote sensing images of flood disasters; preprocesses and augments the original images to obtain processed images; downsamples the processed images through convolutional layers to generate multi-scale feature maps; enhances the multi-scale feature maps through pixel shifting; encodes the enhanced multi-scale feature maps; shuffles and fuses the encoded multi-scale feature maps to generate a fused multi-scale feature map; decodes the fused feature map to complete the segmentation task and outputs the segmented image. This application enhances boundary sensitivity by introducing pixel shifting operations and effectively suppresses segmentation fragmentation caused by intra-class spectral differences through shuffling operations, thereby improving the recognition effect of flood boundaries.
[0013] In one embodiment, the preprocessing and data augmentation of the original image includes:
[0014] The three-channel labels of the original image are converted into single-channel labels marked with 0 and 1;
[0015] The original image and the corresponding single-channel label are synchronously cropped to generate a smaller image and label block of the same size.
[0016] Data augmentation is performed on the cropped small-sized image and label block, wherein the data augmentation includes rotating the image at multiple preset angles and randomly flipping it horizontally and vertically with a certain probability.
[0017] In one embodiment, the enhancement of the multi-scale feature map through pixel displacement includes:
[0018] Perform a global pooling operation on the channel dimension on the multi-scale feature map to generate a compressed feature map;
[0019] A horizontal shift operation is performed on the compressed feature map, and a vertical shift operation is also performed on the compressed feature map.
[0020] In one embodiment, performing a horizontal shift operation on the compressed feature map includes:
[0021] Shift the first column of pixels in the feature map of each dimension one unit to the right.
[0022] Remove the rightmost column of pixels and fill the leftmost empty space in that row.
[0023] In one embodiment, performing a vertical shift operation on the compressed feature map includes:
[0024] Shift the entire first row of pixels in the feature map down one unit;
[0025] Remove the row of pixels at the bottom boundary and fill the empty area at the top.
[0026] In one embodiment, shuffling and fusing the encoded multi-scale feature maps to generate a fused multi-scale feature map includes:
[0027] The encoded information corresponding to the encoded feature map is divided into N grouped features by a grouping function, and each grouped feature is compressed into a one-dimensional feature sequence by global average pooling in the channel dimension.
[0028] The compressed feature sequences are concatenated to form a global description vector;
[0029] Shuffling is applied to the global description vector to enhance the interaction and fusion of information between different groups and generate intermediate features rich in global context;
[0030] The intermediate features are concatenated with the unpooled grouped features to obtain the fused features;
[0031] The fused features are input into a convolutional layer for linear transformation to learn the non-linear relationships between features.
[0032] The vector after linear transformation of the convolution output is divided into N sub-vectors by a block function, and the sub-vectors are normalized to generate attention weights.
[0033] The attention weights are summed element-wise with the original grouped features to output a multi-scale feature map after feature fusion.
[0034] In one embodiment, the method further includes:
[0035] When the model outputs the segmented image, record the number of model iterations;
[0036] When the number of model iterations reaches the preset number, the model training is considered complete.
[0037] The model was tested using a test sample set;
[0038] The model with the highest evaluation metric is selected as the final model, wherein the evaluation metric includes overall accuracy, precision, recall, F1 score, and intersection / union;
[0039] The final model was then validated using image data from the validation set to obtain a high-resolution remote sensing image target study area extraction model.
[0040] This application also includes a flood disaster remote sensing image segmentation device, comprising:
[0041] An acquisition module is used to acquire original images of the target study area, wherein the original images of the target area include remote sensing images of flood disasters;
[0042] The preprocessing module is used to preprocess and enhance the original image to obtain the processed image;
[0043] The sampling module is used to generate multi-scale feature maps by downsampling the processed image through a convolutional layer;
[0044] The displacement module is used to enhance the multi-scale feature map through pixel displacement;
[0045] The encoding module is used to encode the enhanced multi-scale feature map;
[0046] The shuffling module is used to shuffle and fuse the encoded multi-scale feature maps to generate a multi-scale feature map after feature fusion.
[0047] The decoding module is used to decode the fused feature map, complete the segmentation task of the fused feature map, and output the segmented image.
[0048] In one embodiment, the preprocessing module includes:
[0049] The conversion submodule is used to convert the three-channel labels of the original image into single-channel labels marked with 0 and 1;
[0050] The cropping submodule is used to simultaneously crop the original image and the corresponding single-channel label to generate a smaller image and label block of the same size.
[0051] The enhancement submodule is used to perform data enhancement on the cropped small-sized images and label blocks. The data enhancement includes rotating the images multiple times at preset angles and randomly flipping them horizontally and vertically with a certain probability.
[0052] In one embodiment, the displacement module includes:
[0053] The first generation submodule is used to perform a global pooling operation on the channel dimension on the multi-scale feature map to generate a compressed feature map.
[0054] The displacement submodule is used to perform horizontal displacement operations on the compressed feature map, and simultaneously, to perform vertical displacement operations on the compressed feature map.
[0055] In one embodiment, the displacement submodule is further configured to:
[0056] Shift the first column of pixels in the feature map of each dimension one unit to the right.
[0057] Remove the rightmost column of pixels and fill the leftmost empty space in that row.
[0058] In one embodiment, the displacement submodule is further configured to:
[0059] Shift the entire first row of pixels in the feature map down one unit;
[0060] Remove the row of pixels at the bottom boundary and fill the empty area at the top.
[0061] In one embodiment, the shuffling module includes:
[0062] The sub-module is used to divide the encoded information corresponding to the encoded feature map into N grouped features through a grouping function, and then compress them into one-dimensional feature sequences through global average pooling of the channel dimension.
[0063] The splicing submodule is used to splice the compressed feature sequences to form a global description vector;
[0064] The shuffling module is used to apply a shuffling operation to the global description vector, enhance the interaction and fusion of information between different groups, and generate intermediate features rich in global context.
[0065] The fusion submodule is used to concatenate the intermediate features with the unpooled grouped features to obtain the fused features;
[0066] The transformation submodule is used to input the fused features into the convolutional layer for linear transformation, thereby learning the nonlinear relationship between features;
[0067] The second generation submodule is used to divide the linearly transformed vector of the convolution output into N sub-vectors through a block function, and to normalize the sub-vectors to generate attention weights.
[0068] The output submodule is used to perform element-wise weighted summation of the attention weights and the original grouped features, and output the multi-scale feature map after feature fusion.
[0069] In one embodiment, the apparatus further includes:
[0070] The recording module is used to record the number of iterations of the model when the model outputs the segmented image;
[0071] The determination module is used to determine that the model training is complete when the number of model iterations reaches a preset number.
[0072] The testing module is used to test the model using a test sample set;
[0073] The selection module is used to select the model with the highest evaluation metrics as the final model, wherein the evaluation metrics include overall accuracy, precision, recall, F1 score, and intersection / union.
[0074] The validation module is used to validate the final model using image data from the validation set, so as to obtain a high-resolution remote sensing image target study area extraction model.
[0075] This application also provides a flood disaster remote sensing image segmentation system, including:
[0076] At least one processor; and,
[0077] A memory communicatively connected to the at least one processor; wherein,
[0078] The memory stores instructions that can be executed by the at least one processor to implement a flood disaster remote sensing image segmentation method as described in any of the above embodiments.
[0079] This application also provides a computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor corresponding to a flood disaster remote sensing image segmentation system, enables the flood disaster remote sensing image segmentation system to implement a flood disaster remote sensing image segmentation method described in any of the above embodiments.
[0080] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0081] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0082] The accompanying drawings are provided to further illustrate the present application and form part of the specification. They are used together with the embodiments of the present application to explain the application and do not constitute a limitation thereof. In the drawings:
[0083] Figure 1 This is a flowchart of a flood disaster remote sensing image segmentation method according to an embodiment of this application;
[0084] Figure 2 This application provides an embodiment of a flood disaster remote sensing image segmentation device.
[0085] Figure 3 This is a schematic diagram of the hardware structure of a flood disaster remote sensing image segmentation system according to an embodiment of this application. Detailed Implementation
[0086] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application.
[0087] Figure 1 This is a flowchart of a flood disaster remote sensing image segmentation method according to an embodiment of this application, such as... Figure 1 As shown, the method can be implemented as follows: S101-S107:
[0088] In step S101, the original image of the target study area is acquired, wherein the original image of the target area includes remote sensing image of flood disaster;
[0089] In step S102, the original image is preprocessed and data augmented to obtain the processed image;
[0090] In step S103, the processed image is downsampled through a convolutional layer to generate a multi-scale feature map;
[0091] In step S104, the multi-scale feature map is enhanced by pixel displacement;
[0092] In step S105, the enhanced multi-scale feature map is encoded;
[0093] In step S106, the encoded multi-scale feature maps are shuffled and fused to generate a multi-scale feature map after feature fusion.
[0094] In step S107, the fused feature map is decoded to complete the segmentation task of the fused feature map, and the segmented image is output.
[0095] In this application, original images of the target study area are obtained, wherein the original images of the target area include remote sensing images of flood disasters, and the original images can be images captured by a camera or aerial remote sensing images.
[0096] The original image is preprocessed and data augmented to obtain the processed image. First, the three-channel labels of the original image are converted into single-channel labels marked with 0 and 1. Second, the original image and its corresponding single-channel labels are simultaneously cropped to generate smaller images and label blocks of the same size, for example, cropped to 512×512 pixels. Finally, data augmentation is performed on the cropped smaller images and label blocks. This data augmentation includes multiple rotations at preset angles and random horizontal and vertical flips with a certain probability, for example, rotations of 90°, 180°, and 270°, and random horizontal and vertical flips with a 50% probability. The processed image data is then proportionally divided into training, testing, and validation sets. It is understood that before model training, the preprocessing steps also include scaling, normalization, and denoising of the image to ensure the quality and consistency of the image data, thereby better adapting to the subsequent image segmentation processing requirements.
[0097] The processed image is downsampled through a convolutional layer to generate multi-scale feature maps. After data preprocessing and data augmentation, the processed image can be input into the FloodSeg model. The data-augmented image is then downsampled through a convolutional layer to generate a series of multi-scale feature maps: E 1 / 4 E 1 / 8 E 1 / 16 E 1 / 32 .
[0098] The multi-scale feature maps are enhanced through pixel shifting. To further enhance the model's ability to express deep semantics, the multi-scale feature maps can be enhanced. In this application, some of the multi-scale feature maps are enhanced; of course, all multi-scale feature maps can also be enhanced. Specifically, enhancement is performed through a shifting module. First, a global pooling operation is performed on the multi-scale feature maps along the channel dimension to generate a compressed feature map. That is, by independently performing global statistics (such as mean or maximum value) on each channel, the spatial dimension is compressed into a single value, thereby significantly reducing computational complexity. Then, a horizontal shift operation is performed on the compressed feature map, and simultaneously, a vertical shift operation is performed on the compressed feature map. The horizontal shift operation moves the first column of pixels in each dimension of the feature map one unit to the right; the rightmost boundary pixel column is removed and filled into the leftmost empty position of that row. The vertical shift operation moves the first row of pixels in the feature map one unit down; the bottom boundary pixel row is removed and filled into the top empty area. Using multi-scale feature map E... 1 / 32 Taking downward movement as an example, the formula for calculating the displacement operation is as follows:
[0099] H=Pool(E1 / 32 );
[0100] E' 1 / 32 =S hor (H)+S ver (H)+S bot (H);
[0101] Among them, E' 1 / 32 The enhanced features output by the displacement module; Pool represents the pooling operation; S hor S ver S bot These are the three basic shift operations of the displacement module, which mean that the first row of pixels in the feature map is moved down by one unit, the bottom boundary pixel row is removed, and the empty area at the top is filled.
[0102] Multi-directional displacement of multi-scale features enhances spatial awareness. Furthermore, by implementing shift operations, category semantic information across a larger receptive field can be effectively integrated. During training, this design accurately captures position-aware information and significantly enhances the semantic discriminative power of feature representations, thereby improving the model's performance in fine-grained boundary segmentation and intra-class consistency recognition.
[0103] Encode the enhanced multi-scale feature map E'. 1 / 32 Other unenhanced multiscale feature maps E 1 / 4 E 1 / 8 E 1 / 16 Encoding modeling is performed using a visual state space module to effectively capture long-range dependencies between different feature levels. Specifically, firstly, layer normalization is performed on the input feature maps E at each scale to enhance training stability. Secondly, the normalized multi-scale feature maps are split into two parallel branches: branch 1 performs 1D convolution operations, focusing on local feature extraction, and branch 2 performs depthwise convolutions, extracting features while maintaining channel independence. Then, the features processed by the two branches are fused to achieve complementarity between local and global features. The fused 2D multi-scale feature maps are unfolded into 1D sequences along four different paths (e.g., horizontal, vertical, and diagonal directions), and each unfolded sequence u(t) is mapped to a hidden state h(t). A selective scanning mechanism is used to process the data. The specific calculation formula is as follows:
[0104] h'(t) = Ah(t) + Bu(t);
[0105] y(t) = Ch(t) + Du(t);
[0106] Where u(t) is the expanded input sequence; h(t) is the hidden state of the system; y(t) is the output information; A∈C N ×N Here is the state transition matrix; B∈C N C∈C N D∈C 1 These are learnable weighted parameters.
[0107] Using the two formulas above, at each time step, the system calculates the next state h(t+1) based on the current state h(t) and the current input u(t) using the formula h'(t)=Ah(t)+Bu(t); at the same time, it generates the current output y(t) based on y(t)=Ch(t)+Du(t).
[0108] The sequences processed by the four paths are reverse-reconstructed into 2D feature maps, and then summed and merged according to pixel position, so that each pixel integrates four-way global information to form an encoded multi-scale feature map.
[0109] The encoded multi-scale feature maps are shuffled and fused to generate a fused multi-scale feature map. Specifically, the encoded information corresponding to the encoded feature map is divided into N group features using a grouping function, and each group feature is compressed into a one-dimensional feature sequence using global average pooling along the channel dimension. The compressed feature sequences are concatenated to form a global description vector. A shuffling operation is applied to the global description vector to enhance the interaction and fusion of information between different groups, generating intermediate features rich in global context. The intermediate features are concatenated with the unpooled group features to obtain fused features. The fused features are input into a convolutional layer for linear transformation to learn the nonlinear relationship between features. The linearly transformed vector output by the convolution is divided into N sub-vectors using a block function, and the sub-vectors are normalized to generate attention weights. The attention weights are then summed element-wise with the original group features to output the fused multi-scale feature map. The shuffling and fusion are implemented through a shuffling module, which integrates the shuffling operation with the residual network and weighting mechanism, enabling the model to focus more on low-level features of small targets. The module’s feature rearrangement mechanism enables it to capture complex dependencies between different sequences, thereby making better use of complementary information from different scan directions.
[0110] For example, the encoded information X of each multi-scale feature map is processed by a grouping function φ g The data is divided into N=4 distinct groups to obtain X1, X2, X3, X4, and then subjected to global average pooling φ along the channel dimension. AP Compressed into a one-dimensional feature sequence. This is achieved through a join operation φ. cat These compressed one-dimensional feature sequences are concatenated to form a comprehensive global description vector. A shuffling operation φ is then applied to this vector.s To enhance the interaction and fusion of information between different groups, an intermediate feature X' rich in global context is generated. By rearranging the grouped features so that each new group contains feature fragments from different original groups, the generated intermediate features can contain richer global context information through this cross-group information interaction. X' is then concatenated with the unpooled original grouped features to obtain φ. cat (φ AP (X i Feature fusion is performed, and the fused result is fed into a convolutional layer for linear transformation to learn the non-linear relationships between features and enhance the model's expressive power. This is achieved through a block function φ. chunk The convolutional output features are divided into blocks corresponding to the number of groups N, and then normalized into attention weights W. i The attention weight W i Compared with the original grouping feature X i Weighted summation is performed, and important features are selectively enhanced while redundant information is suppressed by utilizing learned attention weights, thereby achieving adaptive feature fusion and generating the final output information Y of the module. The calculation formula is as follows:
[0111] (X1, X2, X3, X4) = φ g (X);
[0112] X'=φ s (φ cat (φ AP (X i )));
[0113] W=φ chunk (Conv(X'+φ cat (φ AP (X i )));
[0114] Y=ΣW i *X i .
[0115] Finally, the fused feature map is decoded to complete the segmentation task and output the segmented image. The decoder decodes the integrated features to output the segmented image.
[0116] Furthermore, during model training, the number of iterations can be recorded when the model outputs segmented images. Training is considered complete when the preset number of iterations is reached. The model is tested using a test sample set, and the model with the highest evaluation metrics is selected as the final model. These evaluation metrics include overall accuracy, precision, recall, F1 score, and intersection / union. The final model is then validated using image data from a validation set to obtain a high-resolution remote sensing image target area extraction model. For example, experiments can be conducted using the PyTorch deep learning framework, employing overall accuracy, precision, recall, F1 score, and intersection / union for quality evaluation. Experiments can be performed on a computer server equipped with an NVIDIA GeForce RTX 3060 (12GB) to fully utilize GPU capabilities for accelerated computation. Multiple comparative experiments can be conducted with the following parameter configurations: the optimizer uses AdamW, the initial learning rate is 0.00006, weight decay is added, each dataset is trained 40,000 times, and the batch size is set to 2. The FloodSeg model with the best test accuracy is saved and validated using image data from the validation set to obtain a high-resolution remote sensing image flood area extraction product. Specifically, the images and corresponding labels in the training set are input into a model built with Python software for training to obtain a parametric model. This parametric model is then used to perform flood area extraction and prediction on the images in the validation set, and the accuracy is evaluated according to the evaluation metrics. If the accuracy does not meet the expected results, the training set data is re-inputted, and finally, the parametric model with the best evaluation metrics is saved.
[0117] The beneficial effects of this application are as follows: It acquires original images of the target study area, including remote sensing images of flood disasters; preprocesses and augments the original images to obtain processed images; downsamples the processed images through convolutional layers to generate multi-scale feature maps; enhances the multi-scale feature maps through pixel shifting; encodes the enhanced multi-scale feature maps; shuffles and fuses the encoded multi-scale feature maps to generate a fused multi-scale feature map; decodes the fused feature map to complete the segmentation task and outputs the segmented image. This application enhances boundary sensitivity by introducing pixel shifting operations and effectively suppresses segmentation fragmentation caused by intra-class spectral differences through shuffling operations, thereby improving the recognition effect of flood boundaries.
[0118] In one embodiment, step S102 above can be implemented as steps A1-A3 as follows:
[0119] In step A1, the three-channel labels of the original image are converted into single-channel labels marked with 0 and 1;
[0120] In step A2, the original image and the corresponding single-channel label are synchronously cropped to generate a small image and label block of the same size;
[0121] In step A3, data augmentation is performed on the cropped small-sized image and label block. The data augmentation includes rotating the image at multiple preset angles and randomly flipping it horizontally and vertically with a certain probability.
[0122] In one embodiment, step S103 above can be implemented as steps B1-B3 as follows:
[0123] In step B1, a global pooling operation is performed on the channel dimension of the multi-scale feature map to generate a compressed feature map;
[0124] In step B2, a horizontal shift operation is performed on the compressed feature map, and simultaneously, a vertical shift operation is performed on the compressed feature map.
[0125] In one embodiment, the horizontal shift operation on the compressed feature map described in step B2 above can be implemented as follows: steps B21-B22:
[0126] In step B21, the first column of pixels in the feature map of each dimension is shifted one unit to the right.
[0127] In step B22, the rightmost edge of the pixel column is removed and filled into the leftmost empty position of the row.
[0128] In one embodiment, the vertical shift operation on the compressed feature map described in step B2 above can be implemented as follows: steps B23-B24:
[0129] In step B23, the first row of pixels in the feature map is shifted down by one unit.
[0130] In step B24, the pixel row at the bottom boundary is removed and filled into the empty area at the top.
[0131] In one embodiment, step S106 above can be implemented as steps C1-C7 as follows:
[0132] In step C1, the encoded information corresponding to the encoded feature map is divided into N grouped features by a grouping function, and each grouped feature is compressed into a one-dimensional feature sequence by global average pooling of the channel dimension.
[0133] In step C2, the compressed feature sequences are concatenated to form a global description vector;
[0134] In step C3, a shuffling operation is applied to the global description vector to enhance the interaction and fusion of information between different groups and generate intermediate features rich in global context;
[0135] In step C4, the intermediate features are concatenated with the unpooled grouped features to obtain the fused features;
[0136] In step C5, the fused features are input into a convolutional layer for linear transformation to learn the nonlinear relationships between features;
[0137] In step C6, the vector after linear transformation of the convolution output is divided into N sub-vectors by a block function, and the sub-vectors are normalized to generate attention weights.
[0138] In step C7, the attention weights are summed element-wise with the original grouped features to output a multi-scale feature map after feature fusion.
[0139] In one embodiment, the method may also be implemented as steps D1-D5:
[0140] In step D1, when the model outputs the segmented image, the number of model iterations is recorded;
[0141] In step D2, when the number of model iterations reaches the preset number, the model training is considered complete.
[0142] In step D3, the model is tested using a test sample set;
[0143] In step D4, the model with the highest evaluation metric is selected as the final model, wherein the evaluation metric includes overall accuracy, precision, recall, F1 score, and intersection / union.
[0144] In step D5, the final model is validated using image data from the validation set to obtain a high-resolution remote sensing image target study area extraction model.
[0145] Figure 2 As an embodiment of this application, a flood disaster remote sensing image segmentation device is provided, such as... Figure 2 As shown, the device includes:
[0146] The acquisition module 201 is used to acquire the original images of the target study area, wherein the original images of the target area include remote sensing images of flood disasters;
[0147] Preprocessing module 202 is used to preprocess and enhance the original image to obtain the processed image;
[0148] Sampling module 203 is used to generate multi-scale feature maps by downsampling the processed image through a convolutional layer;
[0149] The displacement module 204 is used to enhance the multi-scale feature map by pixel displacement;
[0150] Encoding module 205 is used to encode the enhanced multi-scale feature map;
[0151] Shuffling module 206 is used to shuffle and fuse the encoded multi-scale feature maps to generate a multi-scale feature map after feature fusion.
[0152] The decoding module 207 is used to decode the fused feature map, complete the segmentation task of the fused feature map, and output the segmented image.
[0153] In one embodiment, the preprocessing module includes:
[0154] The conversion submodule is used to convert the three-channel labels of the original image into single-channel labels marked with 0 and 1;
[0155] The cropping submodule is used to simultaneously crop the original image and the corresponding single-channel label to generate a smaller image and label block of the same size.
[0156] The enhancement submodule is used to perform data enhancement on the cropped small-sized images and label blocks. The data enhancement includes rotating the images multiple times at preset angles and randomly flipping them horizontally and vertically with a certain probability.
[0157] In one embodiment, the displacement module includes:
[0158] The first generation submodule is used to perform a global pooling operation on the channel dimension on the multi-scale feature map to generate a compressed feature map.
[0159] The displacement submodule is used to perform horizontal displacement operations on the compressed feature map, and simultaneously, to perform vertical displacement operations on the compressed feature map.
[0160] In one embodiment, the displacement submodule is further configured to:
[0161] Shift the first column of pixels in the feature map of each dimension one unit to the right.
[0162] Remove the rightmost column of pixels and fill the leftmost empty space in that row.
[0163] In one embodiment, the displacement submodule is further configured to:
[0164] Shift the entire first row of pixels in the feature map down one unit;
[0165] Remove the row of pixels at the bottom boundary and fill the empty area at the top.
[0166] In one embodiment, the shuffling module includes:
[0167] The sub-module is used to divide the encoded information corresponding to the encoded feature map into N grouped features through a grouping function, and then compress them into one-dimensional feature sequences through global average pooling of the channel dimension.
[0168] The splicing submodule is used to splice the compressed feature sequences to form a global description vector;
[0169] The shuffling module is used to apply a shuffling operation to the global description vector, enhance the interaction and fusion of information between different groups, and generate intermediate features rich in global context.
[0170] The fusion submodule is used to concatenate the intermediate features with the unpooled grouped features to obtain the fused features;
[0171] The transformation submodule is used to input the fused features into the convolutional layer for linear transformation, thereby learning the nonlinear relationship between features;
[0172] The second generation submodule is used to divide the linearly transformed vector of the convolution output into N sub-vectors through a block function, and to normalize the sub-vectors to generate attention weights.
[0173] The output submodule is used to perform element-wise weighted summation of the attention weights and the original grouped features, and output the multi-scale feature map after feature fusion.
[0174] In one embodiment, the apparatus further includes:
[0175] The recording module is used to record the number of iterations of the model when the model outputs the segmented image;
[0176] The determination module is used to determine that the model training is complete when the number of model iterations reaches a preset number.
[0177] The testing module is used to test the model using a test sample set;
[0178] The selection module is used to select the model with the highest evaluation metrics as the final model, wherein the evaluation metrics include overall accuracy, precision, recall, F1 score, and intersection / union.
[0179] The validation module is used to validate the final model using image data from the validation set, so as to obtain a high-resolution remote sensing image target study area extraction model.
[0180] Figure 3This is a schematic diagram of the hardware structure of a flood disaster remote sensing image segmentation system according to an embodiment of this application, as shown below. Figure 3 As shown, this flood disaster remote sensing image segmentation system includes:
[0181] At least one processor 320; and,
[0182] Memory 304 communicatively connected to the at least one processor 320; wherein,
[0183] The memory 304 stores instructions that can be executed by the at least one processor 320 to implement a flood disaster remote sensing image segmentation method as described in any of the above embodiments.
[0184] Reference Figure 3 The flood disaster remote sensing image segmentation system 300 may include one or more of the following components: processing component 302, memory 304, power supply component 306, multimedia component 308, audio component 310, input / output (I / O) interface 312, sensor component 314, and communication component 316.
[0185] Processing component 302 typically controls the overall operation of a flood disaster remote sensing image segmentation system 300. Processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the method described above. Furthermore, processing component 302 may include one or more modules to facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
[0186] Memory 304 is configured to store various types of data to support the operation of a flood disaster remote sensing image segmentation system 300. Examples of this data include instructions for any application or method operating on the flood disaster remote sensing image segmentation system 300, such as text, images, videos, etc. Memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0187] Power supply component 306 provides power to various components of a flood disaster remote sensing image segmentation system 300. Power supply component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the vehicle control system 300.
[0188] Multimedia component 308 includes a screen that provides an output interface between a flood disaster remote sensing image segmentation system 300 and a user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 308 may also include a front-facing camera and / or a rear-facing camera. When the flood disaster remote sensing image segmentation system 300 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0189] Audio component 310 is configured to output and / or input audio signals. For example, audio component 310 includes a microphone (MIC) configured to receive external audio signals when a flood disaster remote sensing image segmentation system 300 is in an operating mode, such as alarm mode, recording mode, voice recognition mode, and voice output mode. The received audio signals may be further stored in memory 304 or transmitted via communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.
[0190] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.
[0191] Sensor assembly 314 includes one or more sensors for providing status assessments of various aspects of a flood disaster remote sensing image segmentation system 300. For example, sensor assembly 314 may include a sound sensor. Additionally, sensor assembly 314 can detect the on / off state of the flood disaster remote sensing image segmentation system 300, the relative positioning of components (e.g., the display and keypad of the flood disaster remote sensing image segmentation system 300), and the operational status of the flood disaster remote sensing image segmentation system 300 or a component of the system. Sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 314 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0192] Communication component 316 is configured to enable a flood disaster remote sensing image segmentation system 300 to provide wired or wireless communication capabilities with other devices and cloud platforms. The flood disaster remote sensing image segmentation system 300 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 316 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0193] In an exemplary embodiment, a flood disaster remote sensing image segmentation system 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform a flood disaster remote sensing image segmentation method described in any of the above embodiments.
[0194] This application also provides a computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor corresponding to a flood disaster remote sensing image segmentation system, enables the flood disaster remote sensing image segmentation system to implement a flood disaster remote sensing image segmentation method described in any of the above embodiments.
[0195] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0196] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0197] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0198] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0199] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for flood disaster remote sensing image segmentation, characterized in that, include: Acquire raw images of the target study area, wherein the raw images of the target study area include remote sensing images of flood disasters; The original image is preprocessed and data augmented to obtain the processed image; The processed image is downsampled through a convolutional layer to generate multi-scale feature maps; The multi-scale feature map is enhanced by pixel shifting; Encode the enhanced multi-scale feature map; The encoded multi-scale feature maps are shuffled and fused to generate a multi-scale feature map with fused features. The fused feature map is decoded to complete the segmentation task and output the segmented image. The enhancement of the multi-scale feature map through pixel displacement includes: Perform a global pooling operation on the channel dimension on the multi-scale feature map to generate a compressed feature map; Perform a horizontal shift operation on the compressed feature map, and simultaneously perform a vertical shift operation on the compressed feature map. The process of shuffling and fusing the encoded multi-scale feature maps to generate a fused multi-scale feature map includes: The encoded information corresponding to the encoded feature map is divided into N grouped features by a grouping function, and each grouped feature is compressed into a one-dimensional feature sequence by global average pooling in the channel dimension. The compressed feature sequences are concatenated to form a global description vector; Shuffling is applied to the global description vector to enhance the interaction and fusion of information between different groups and generate intermediate features rich in global context; The intermediate features are concatenated with the unpooled grouped features to obtain the fused features; The fused features are input into a convolutional layer for linear transformation to learn the non-linear relationships between features. The vector after linear transformation of the convolution output is divided into N sub-vectors by a block function, and the sub-vectors are normalized to generate attention weights. The attention weights are summed element-wise with the original grouped features to output a multi-scale feature map after feature fusion.
2. The method as described in claim 1, characterized in that, The preprocessing and data augmentation of the original image includes: The three-channel labels of the original image are converted into single-channel labels marked with 0 and 1; The original image and the corresponding single-channel label are synchronously cropped to generate a smaller image and label block of the same size. Data augmentation is performed on the cropped small-sized image and label block, wherein the data augmentation includes rotating the image at multiple preset angles and randomly flipping it horizontally and vertically with a certain probability.
3. The method as described in claim 1, characterized in that, The horizontal shift operation on the compressed feature map includes: Shift the first column of pixels in the feature map of each dimension one unit to the right. Remove the rightmost column of pixels and fill the leftmost empty space in that row.
4. The method as described in claim 1, characterized in that, The vertical shift operation on the compressed feature map includes: Shift the entire first row of pixels in the feature map down one unit; Remove the row of pixels at the bottom boundary and fill the empty area at the top.
5. The method as described in claim 1, characterized in that, The method further includes: When the model outputs the segmented image, record the number of model iterations; When the number of model iterations reaches the preset number, the model training is considered complete. The model was tested using a test sample set; The model with the highest evaluation metric is selected as the final model, wherein the evaluation metric includes overall accuracy, precision, recall, F1 score, and intersection / union; The final model was then validated using image data from the validation set to obtain a high-resolution remote sensing image target study area extraction model.
6. A flood disaster remote sensing image segmentation device, used in the flood disaster remote sensing image segmentation method as described in any one of claims 1-5, characterized in that, include: An acquisition module is used to acquire original images of the target study area, wherein the original images of the target study area include remote sensing images of flood disasters; The preprocessing module is used to preprocess and enhance the original image to obtain the processed image; The sampling module is used to generate multi-scale feature maps by downsampling the processed image through a convolutional layer; The displacement module is used to enhance the multi-scale feature map through pixel displacement; The encoding module is used to encode the enhanced multi-scale feature map; The shuffling module is used to shuffle and fuse the encoded multi-scale feature maps to generate a multi-scale feature map after feature fusion. The decoding module is used to decode the fused feature map, complete the segmentation task of the fused feature map, and output the segmented image.
7. A flood disaster remote sensing image segmentation system, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to implement a flood disaster remote sensing image segmentation method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor corresponding to a flood disaster remote sensing image segmentation system, the flood disaster remote sensing image segmentation system is able to implement the flood disaster remote sensing image segmentation method as described in any one of claims 1-5.