Remote sensing image green roof intelligent identification method and system based on improved mask RCNN
By improving the Mask RCNN algorithm and combining multiple network modules and loss functions, the problem of accurate detection of green roofs in complex environments has been solved, achieving efficient and accurate green roof identification and parameter extraction, and supporting intelligent monitoring at the city level.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to accurately identify green roofs in complex built environments. Semantic segmentation methods cannot effectively distinguish between different green roof instances and cannot extract key morphological parameters, resulting in high false detection and false negative rates, failing to meet the needs of large-scale coverage and efficient monitoring.
An improved Mask R-CNN algorithm is adopted, which combines residual network, feature pyramid network, dual-channel attention enhancement module and region proposal network. By constructing a joint loss function, the feature extraction capability is enhanced, and accurate detection and morphological parameter extraction of green roofs are achieved.
It achieves high-precision identification and feature parameter extraction of green roofs, reduces the cost of manual surveys, supports large-scale intelligent identification and dynamic detection, and improves the monitoring efficiency and accuracy of urban green infrastructure.
Smart Images

Figure CN120808139B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of remote sensing image processing, and particularly relates to a remote sensing image green roof intelligent identification method based on an improved Mask RCNN. BACKGROUND
[0002] As the "fifth facade" of the city, green roofs have become an important carrier for breaking through the constraints of two-dimensional space and constructing a three-dimensional ecological network in high-density built-up areas where land resources are scarce. Green roofs can significantly alleviate the urban heat island effect, regulate rainwater runoff, improve air quality, enhance carbon sink function, and provide new ecological corridors for biodiversity protection. Under the combined influence of climate change and rapid urbanization, green roofs play an irreplaceable role in improving the climate resilience of cities. Therefore, accurately identifying the location, quantity and shape of green roofs is crucial for scientifically quantifying their comprehensive ecological and environmental benefits. However, in complex built environments, green roof detection faces many technical challenges, mainly manifested in the complexity of roof structures, the high similarity of green roofs and ground vegetation features, and the interference of factors such as building shadows, obstructions and uneven lighting. These problems together restrict the accurate identification of green roofs, greatly increasing the difficulty of identification.
[0003] Currently, green roof detection mainly relies on traditional field investigation methods, which involve professional personnel conducting on-site surveys, recording and classification, and collecting relevant parameter data. Although field investigation can obtain high-precision data, it has obvious limitations: low data collection efficiency, high labor and material costs, long update cycle, poor timeliness, and difficulty in achieving wide coverage. In contrast, remote sensing image recognition technology based on computer vision has significant advantages such as wide coverage, fast data update, and lower cost. However, only a small number of studies have attempted to apply it to green roof detection. Existing methods for identifying green roofs based on remote sensing images mainly use semantic segmentation, which uses convolutional neural networks to classify remote sensing images at the pixel level, thereby separating green roofs from the background. This method still faces many challenges: first, semantic segmentation cannot distinguish between different green roof instances within the same category, and the recognition accuracy is insufficient for green roofs that are close to each other or partially overlapping; second, the complex structure of building roofs, combined with factors such as shadows and reflections, results in high false detection and missed detection rates for green roofs; finally, this method can only achieve pixel-level classification and cannot effectively extract key shape parameters such as the shape and area of green roofs, limiting the ability of fine-grained analysis. SUMMARY
[0004] In view of the problems in the prior art, the present application provides an improved Mask RCNN algorithm-based remote sensing image green roof intelligent identification method, which enhances the feature extraction capability of the algorithm by introducing an attention mechanism, and improves the edge segmentation accuracy of the target by constructing a joint loss function, so as to realize accurate detection of green roofs in complex built environments. The present application embeds a morphological parameter analysis module in the mask post-processing process, which can automatically extract geometric feature parameters such as green roof area, perimeter and shape index, realizing integrated processing of green roof identification and feature parameter extraction. Compared with traditional methods, the present application can effectively solve the problems of difficult target instance differentiation and poor environmental adaptability, and provides a reliable technical means for monitoring and ecological environment benefit evaluation of green roofs.
[0005] The technical scheme adopted by the present application is as follows: The improved Mask RCNN-based remote sensing image green roof intelligent identification method comprises the following steps:
[0006] Step 1: Obtain high-resolution remote sensing image data set;
[0007] Step 2: Build an improved Mask RCNN green roof detection model, including integrating a residual network, a feature pyramid network, a dual-channel attention enhancement module, a region proposal network and a region of interest alignment module;
[0008] The high-resolution remote sensing image is first subjected to multi-level feature extraction by the ResNet-101 residual network, and the extracted multi-level features are fused by the feature pyramid network to obtain a multi-scale feature map, then the dual-channel attention enhancement module is used to dynamically calibrate the spectral and spatial response related to the green roof in the feature map to obtain an enhanced multi-scale feature map; the region proposal network extracts candidate regions that may contain green roofs from the enhanced multi-scale feature map, then the candidate regions and the feature map generated by the ResNet-101 residual network are input into the region of interest alignment module to realize feature alignment and generate standardized feature representation, and finally through multi-task collaborative processing, target classification, bounding box regression and instance segmentation mask generation are completed;
[0009] Step 3: Design a loss function to train and evaluate the improved Mask RCNN green roof detection model;
[0010] Step 4: Use the trained optimal model to realize green roof detection.
[0011] Further, the specific implementation process of step 1 comprises:
[0012] Step 11: Obtain high-resolution remote sensing images, and enhance the vegetation spectral and texture features of green roofs in the images through multi-spectral band fusion, vegetation index enhancement, spatial domain enhancement and noise suppression image processing techniques;
[0013] Step 12, using the sliding window method to process the high-resolution remote sensing image, and performing normalization processing on the RGB three channels of each block, recording the top-left pixel coordinates and corresponding geographic coordinates of each block while sliding, and generating a metadata file;
[0014] Step 13, filtering out effective samples containing clear green roofs from the block images generated in step 12, and using the image labeling tool LabelMe to label the filtered samples, and saving the labeling results in JSON file format, which contains image path, resolution, polygon vertex coordinates and class label;
[0015] Step 14, converting the generated JSON file into an MS COCO2017 dataset format JSON file, and automatically generating an annotation index file containing image ID, class ID, segmentation mask coordinates and bounding box information for the improved Mask RCNN green roof detection model to read;
[0016] Step 15, randomly dividing all samples into training set, validation set and test set according to a certain proportion, where the training set is used for model training, the validation set is used for parameter optimization and performance adjustment, and the test set is used to evaluate the generalization performance of the model.
[0017] Further, the specific process of the dual-channel attention enhancement module is as follows:
[0018] (A1) Denote the multi-scale feature map output by the feature pyramid network as , respectively, to generate two channel description vectors and , where the former represents the global response strength of the channel, and the latter captures the local significant features within the channel;
[0019] (A2) Input the above two channel description vectors into a multi-layer perceptron (MLP) with shared parameters, respectively, to perform channel compression and expansion operations, establish the dependency relationship between channels through nonlinear transformation, add the results of the two paths, and then normalize them through Sigmoid to generate channel attention weights that identify the importance of vegetation-related channels, and the formula is:
[0020]
[0021] (A3) Multiply the weight with the input feature map channel by channel to suppress the channel response unrelated to the green roof and strengthen the semantic information related to the target, and obtain the channel-enhanced feature map , and the formula is:
[0022]
[0023] (A4) For each spatial position in the feature map , average pooling and max pooling are performed along the channel dimension to generate two single-channel feature maps and , representing the average response and local maximum response at each position, respectively;
[0024] (A5) The two single-channel feature maps are concatenated along the channel direction, and a 7x7 convolution kernel is used to capture local spatial context information. Finally, the Sigmoid function is used for normalization to generate spatial attention weights , which are used to quantify the response strength of each position in the feature map to the green roof target region, with the formula:
[0025]
[0026] (A6) The spatial attention weights are multiplied element-wise with in the spatial dimension to output the final two-channel enhanced feature map , with the formula:
[0027]
[0028] In each formula, is the Sigmoid function, denotes element-wise multiplication, denotes feature extraction using a 7x7 convolution kernel.
[0029] Further, the region proposal network receives four feature maps of different scales, P2, P3, P4, and P5, output by the feature pyramid network and enhanced by the two-channel attention enhancement module, as input. Through the sliding window mechanism, it generates a variety of pre-defined anchor boxes of different sizes and aspect ratios on the feature maps to cover the various morphological features that green roofs may exhibit. For each anchor box, the region proposal network performs two key tasks: foreground / background classification and bounding box coordinate regression. For foreground / background classification, first, a 3x3 convolution layer is used to extract spatial features, and then a 1x1 convolution layer is used to output the probability value of each anchor box being foreground or background. The bounding box regression task regresses the position and size increment of the anchor box to make it more consistent with the green roof boundary, including the following steps:
[0030] (B1) The region proposal network uses a 3x3 convolution layer to extract features and generate multiple pre-set anchor boxes at each position , where is the anchor box center coordinate, is the width and height of the anchor box;
[0031] (B2) For each anchor box, calculate the geometric difference between it and the matched ground truth box coordinate, i.e. the real offset , which is calculated as:
[0032]
[0033] (B3) The region proposal network predicts the four-dimensional offset of the anchor box through a 1x1 convolutional layer . The model-predicted offset is compared with the real offset through a loss function to quantify the prediction error, which is calculated as:
[0034]
[0035] (B4) The loss function is calculated using the backpropagation algorithm to respond to the model parameters, and the parameter update strategy of the optimizer drives the predicted offset to gradually approach the real offset in a gradient descent manner.
[0036] (B5) The predicted offset is used to adjust the anchor box parameters to obtain the refined predicted box coordinates , which is calculated as:
[0037]
[0038] In the above formulas, is the number of anchor boxes participating in regression; is the th anchor box sample; is the smooth L1 function used to segment the error; respectively represent the horizontal coordinate , the vertical coordinate , the width , and the height of the center point of the anchor box, and the offset compared to the real anchor box; is the real offset of the th anchor box in dimension , and is the predicted offset of the th anchor box in dimension ;
[0039] After classification and regression, the region proposal network sorts the anchor boxes according to the foreground probability values, selects high-score anchor boxes as initial candidate regions, and adopts a non-maximum suppression algorithm for post-processing, sorts the candidate regions according to the probability from high to low, retains high-probability regions and eliminates regions highly overlapped with the high-probability regions, thereby effectively removing redundant candidate boxes.
[0040] Further, the region of interest alignment module receives the ROI candidate boxes generated by the region proposal network and the feature map extracted by the backbone network ResNet-101 as inputs, maps the ROI boundary box coordinates in the original image space to the feature map space according to the downsampling rate N of the backbone network, scales N times and converts to the feature map space coordinates after scaling N times ); the region of interest alignment module performs standardization processing on each mapped ROI region to generate a fixed-scale feature map;
[0041] The region of interest alignment module is differentially processed according to different task requirements: for the target detection task, each candidate box region is divided into 7x7 equal-size grid units; for the mask prediction task, a 14x14 fine-grained grid division is adopted to retain detailed features, 4 uniformly distributed sampling points are set in each grid unit, based on the relative distance of the sampling points and the adjacent integer coordinates, the weighted average value is calculated through the bilinear interpolation algorithm as the feature value of the sampling point, and finally, the feature values of all sampling points in the grid are aggregated by mean value to output 7x7x256 and 14x14x256 standardized feature maps.
[0042] Further, the 7x7x256 feature map output by the region of interest alignment module is compressed into a 1024-dimensional feature vector through a fully connected layer, which encodes the global semantic information of the target region; the feature vector is then shunted to two parallel processing branches: the classification branch and the bounding box regression branch; the classification branch outputs the confidence score of the target class through a fully connected layer, which is normalized by the Softmax function to filter high-probability targets, thereby determining whether the current region belongs to a green roof; the bounding box regression branch outputs four-dimensional geometric correction amounts ) of the anchor box to perform secondary correction on the candidate boxes generated by the region proposal network, thereby improving the target positioning accuracy;
[0043] Meanwhile, the higher resolution feature map 14x14x256 output by the region of interest alignment module is used for the mask generation branch. The branch first enhances the local features of the 14x14x256 feature map through four layers of consecutive 3x3 convolution operations. Each layer of convolution uses 256 3x3x256 convolution kernels, without changing the spatial size and the number of channels of the input, so as to gradually strengthen the texture details of the vegetation coverage area and the spectral mutation features of the building boundary while maintaining the original spatial dimensions. Subsequently, a single layer of 2x2 transpose convolution is used to upsample the feature map in space, expanding the feature map size from 14x14 to 28x28, so as to restore the spatial details of the target outline. Finally, a 1x1x256 convolution kernel is used to compress the number of channels of the feature map from 256 to 1, generating a single-channel 28x28 probability mask for instance segmentation prediction at the pixel level.
[0044] Further, in step 3, the designed loss function is a multi-task weighted loss, including a target classification loss, a bounding box regression loss, and an instance segmentation mask loss. The instance segmentation mask loss function is composed of a binary cross-entropy loss and a gradient constraint loss, and the specific steps are as follows:
[0045] (31) The Sobel operator is used to calculate the horizontal direction gradient and the vertical direction gradient , which are used to detect the intensity mutation of the mask in the horizontal direction and the spectral transition in the vertical direction, and the specific definitions are as follows:
[0046]
[0047] (32) The gradient operator and are applied to the predicted mask and the real mask respectively to extract the horizontal and vertical gradient responses. Subsequently, the edge gradient amplitude is calculated by fusing the responses of the two directions, and the edge gradient amplitude maps of the predicted mask and the real mask are obtained respectively to improve the edge sharpening degree of the green roof target area, and the formula is:
[0048]
[0049]
[0050] (33) The traditional BCE loss function is calculated, and the formula is:
[0051]
[0052] (34) Define gradient constraint loss , the L1 norm is used to measure the difference between the predicted mask and the real mask gradient amplitude, which forces the model to learn the detailed information of the edge structure, and the formula is:
[0053]
[0054] (35) Combine the gradient loss with the original BCE loss to construct a joint loss function , the formula is:
[0055]
[0056] In the above formulas, N is the total number of pixels; represents the pixel position; and are the weighting coefficients of the classification loss and the edge loss, respectively.
[0057] Further, an incremental loss weighting strategy is introduced: in the early stage of training, the weight of the gradient loss term is increased to strengthen the learning of edge details; as the training gradually converges, gradually adjust its weight to a fixed value to achieve a balance between stable optimization and convergence effect.
[0058] Further, it also includes further splicing the output block prediction mask into a complete remote sensing image mask: first, based on the metadata file, which records the top-left corner geographic coordinates of each block image and its pixel position coordinates in the original image, accurately map each sub-mask to the original image coordinate system; then, for the overlapping area between adjacent blocks, a weighted fusion and edge smoothing strategy is used to generate a complete mask image with smooth edge characteristics and good spatial continuity; finally, a binary mask image with the same spatial range and resolution as the original remote sensing image is generated, 0 represents the background area, 1 represents the green roof area, and is saved in GeoTIFF format, embedding the corresponding geographic coordinate information;
[0059] After obtaining the final prediction mask, first perform morphological closing operation on it to fill small holes and remove isolated noise, so as to optimize the integrity and continuity of the mask boundary; then perform contour extraction operation on the processed mask to vectorize the green roof area; all vector objects are stored as GeoJSON or Shapefile format vector files, and each object is attached with area, centroid coordinates, and model prediction confidence information.
[0060] The application also provides a remote sensing image green roof intelligent identification system based on an improved Mask RCNN, characterized by comprising a memory and a processor in communication connection with the memory, the memory storing computer program instructions, and the processor implementing the computer program instructions to realize the green roof intelligent identification method based on the improved Mask RCNN.
[0061] Compared with the prior art, the technical scheme has the following advantages:
[0062] 1. Compared with the traditional field investigation method, the application realizes wide-range intelligent identification and dynamic detection of green roofs, can effectively reduce the time cost and economic investment of manual investigation, has the technical advantages of rapidness, high efficiency and reusability, and can meet the application requirements of intelligent monitoring and management of urban-level green infrastructure.
[0063] 2. For the technical problem of green roof detection in a complex scene, a green roof high-precision intelligent identification algorithm based on an improved Mask RCNN architecture is proposed, which effectively solves the problem that the traditional semantic segmentation cannot effectively distinguish green roof instances, and the specific technical advantages are as follows:
[0064] (1) A series module composed of a channel attention mechanism and a spatial attention mechanism is embedded between the FPN and the RPN, which enhances the spectral feature response and spatial structure information of the green roof area, suppresses complex background interference, and improves the generation quality of the candidate area.
[0065] (2) For the problem of reduced segmentation accuracy caused by the fuzzy boundary of the green roof, a joint loss function is proposed, which fuses gradient constraint loss and binary cross-entropy loss, and introduces a dynamic weight adjustment strategy to adaptively balance the contributions of the two, significantly improving the accuracy and robustness of the segmentation result.
[0066] (3) By fusing geographic registration information and mask post-processing procedures, the prediction result is converted into standardized GeoTIFF mask data and vectorized GeoJSON or Shapefile files, and additional attribute information such as roof area, centroid coordinates, model confidence is added, so that it can be directly loaded in mainstream GIS platforms, thereby improving the application value of the results. BRIEF DESCRIPTION OF DRAWINGS
[0067] Figure 1 is a flowchart of the backbone network ResNet-101 and FPN algorithm;
[0068] Figure 2 is a schematic diagram of RPN bounding box regression;
[0069] Figure 3The flow chart of the improved Mask RCNN algorithm, wherein the bolded block is the improved DAM and mask module;
[0070] Figure 4 The flow chart of the green roof instance segmentation. DETAILED DESCRIPTION
[0071] The technical solutions of the present application will be further described in detail below in combination with the drawings and examples.
[0072] The present application aims to provide a remote sensing image green roof intelligent identification method based on an improved target segmentation algorithm Mask Region Convolutional Neural Network (Mask RCNN). This method can accurately detect and segment green roofs and extract their complete contours in complex built environments, while supporting green roof area measurement and spatial distribution feature analysis. Compared with traditional investigation methods, this method has the advantages of low cost, high efficiency, and good precision, which can greatly improve the timeliness and accuracy of urban green infrastructure monitoring, and provides reliable technical support for intelligent management and ecological benefit evaluation of green roof resources.
[0073] As shown in Figure 4 The present application provides a remote sensing image green roof intelligent identification method based on an improved Mask RCNN, and the specific steps are as follows:
[0074] S1: For high spatial resolution remote sensing images, the vegetation spectrum and texture features of green roofs in the images are enhanced through multi-spectral band fusion, vegetation index enhancement, spatial domain enhancement, noise suppression, and other image processing techniques.
[0075] S2: The pre-processed high-resolution remote sensing images are divided into blocks using the sliding window method, and the window size is 1024x1024 pixels. Starting from the top left corner of the image, the image is cut row by row and column by column, and the overlap rate is set to 20% to ensure the integrity of the building edges and avoid cutting the main body of the green roof. The block images are named roof_0001, roof_0002, and roof_NNNN (NNNN is the total number of blocks) in the cutting order. Then, the RGB three channels of each block are normalized, and the pixel values are linearly mapped from 0-255 to 0-1 interval and saved as PNG format. While sliding, the top left pixel coordinates and corresponding geographic coordinates of each block are recorded, and a metadata file is generated to provide positioning basis for subsequent spatial stitching.
[0076] S3: From the patch image generated in S2, filter out the effective samples containing clear green roofs (more than 2500 samples), and remove invalid data such as background with too large proportion, serious shadow coverage interference, and suspected targets confused with ground vegetation spectrum. Use the image labeling tool LabelMe to label the filtered samples: draw along the outer contour of the green roof point by point, form a closed polygon by connecting multiple straight lines, ensure that the contour line strictly fits the target edge, and uniformly label the target class as green_roof. The labeling result is saved in JSON file format, which contains image path, resolution, polygon vertex coordinates and class label.
[0077] S4: Use the labelme2coco conversion tool provided by LabelMe to convert the JSON file generated by labeling into a JSON file in the MSCOCO2017 (Microsoft Common Objects in Context) dataset format. The conversion process automatically generates an annotation index file (annotations.json) containing image ID, class ID, segmentation mask coordinates and bounding box information for improved Mask RCNN model reading.
[0078] S5: Divide all samples into training set, validation set and test set according to the ratio of 70%:15%:15%, where the training set is used for model training, the validation set is used for parameter optimization and performance adjustment, and the test set is used to evaluate the generalization performance of the model.
[0079] S6: Load the Mask RCNN model parameters (i.e. pre-trained weights) pre-trained on the Common Objects in Context (COCO) dataset, and build an improved Mask RCNN green roof detection model by integrating Residual Network (ResNet-101), Feature Pyramid Networks (FPN), dual-channel attention enhancement module, Region Proposal Network (RPN) and Region of Interest Alignment module (ROIAlign).
[0080] S6-1: Use a 101-layer dynamic convolution residual network (ResNet-101) as the backbone network architecture of FPN to realize strong semantic and high resolution feature extraction of green roofs in complex built environment.
[0081] Specifically, after the patch image is input into the Mask RCNN model, it is first subjected to feature extraction by the ResNet-101 residual network. As the backbone network, ResNet-101 extracts multi-level features from shallow to deep by means of convolution layers, batch normalization layers and activation functions in series. This process forms four feature maps of different dimensions and resolutions, namely C2 (256x256x256), C3 (128x128x512), C4 (64x64x1024) and C5 (32x32x2048) from shallow to deep. The shallow feature map has a high resolution and contains spatial detail information such as texture, edge and color, which is used for accurate positioning of the green roof boundary; the deep feature map has a low resolution and contains high-level semantic information such as shape, structure and context relationship, which is used for overall shape recognition of the green roof.
[0082] The multi-level features obtained by the feature extraction network are input into the FPN, which fully utilizes the features extracted by each layer of ResNet-101 to realize the fusion of multi-scale features through the mechanisms of top-down information flow and lateral connection. First, the deep feature maps are upsampled in order from deep to shallow to adjust their spatial dimensions to be consistent with those of the adjacent shallow feature maps. For example, the C5 feature map (32x32x2048) is expanded to 64x64x2048 by 2 times nearest neighbor up-sampling to match the spatial dimension of the C4 feature map. At the same time, the channel dimension of each shallow feature map is reduced by 1x1 convolution to maintain the semantic information while reducing the computational complexity. For example, the C4 feature map (64x64x1024) is processed by a 1x1 convolution layer to reduce the channel number from 1024 to 256, generating a reduced feature map (64x64x256). Subsequently, the up-sampled deep feature map and the processed shallow feature map are added element by element through lateral connection to pass the deep semantic information to the shallow layer. This process finally generates multi-scale feature maps P2 (256x256x256), P3 (128x128x256), P4 (64x64x256) and P5 (32x32x256) of uniform dimension, and the feature maps of different scales correspond to green roof targets of different sizes, enabling the network to detect green roofs of various sizes in complex built environments.
[0083] S6-2: To enhance the expression ability of the green roof area and suppress the interference factors such as building shadows and ground vegetation in complex scenes, the present application embeds a dual-channel attention enhancement module (Dual Attention Module, DAM) before the multi-scale feature maps (P2-P5) output by the FPN enter the RPN. This module dynamically calibrates the spectral and spatial response related to the green roof in the feature map through the series mechanism of channel attention and spatial attention, and the specific process is as follows:
[0084] (1) Denote the multi-scale feature maps output by FPN as , and perform global spatial average pooling and max pooling on each channel respectively, generating two channel description vectors and , respectively. The former represents the global response intensity of the channel, and the latter captures the local salient features within the channel.
[0085] (2) Input the above two channel description vectors into a multi-layer perceptron (MLP) with shared parameters, and perform channel compression and expansion operations respectively to establish the dependency between channels through nonlinear transformation. Add the two results and normalize them through Sigmoid to generate channel attention weights that identify the importance of vegetation-related channels (e.g., high NDVI value channel weights close to 1, and bare roof channel weights approaching 0). The formula is:
[0086]
[0087] (3) Multiply the weight with the input feature map channel by channel to suppress channel responses unrelated to green roofs and strengthen target-related semantic information, resulting in a channel-enhanced feature map . The formula is:
[0088]
[0089] (4) For each spatial position in the feature map , perform average pooling and max pooling along the channel dimension to generate two single-channel feature maps and , representing the average response and local maximum response of each position, respectively.
[0090] (5) Concatenate the two single-channel feature maps along the channel direction, then pass them through a 7x7 convolution kernel to capture local spatial context information (such as edges and textures), and finally normalize them through the Sigmoid function to generate spatial attention weights , which quantify the response intensity of each position in the feature map to the green roof target area (high weight areas correspond to green roof edges or centers, and low weight areas correspond to shadows or bare land). The formula is:
[0091]
[0092] (6) Element-wise multiply the spatial attention weight with in the spatial dimension to highlight the geometric structure of the green roof and suppress background noise interference, outputting the final dual-channel enhanced feature map , where
[0093]
[0094] In each formula, is a Sigmoid function, denotes element-wise multiplication, denotes feature extraction using a 7x7 convolution kernel.
[0095] S6-3: The RPN extracts candidate regions that may contain green roofs from the enhanced multi-scale feature maps (P2~P5) to adapt to the identification needs of green roofs of different sizes and shapes.
[0096] Specifically, the RPN receives the P2, P3, P4, and P5 feature maps of four different scales output by the feature pyramid network and enhanced by DAM as input. Through the sliding window mechanism, a variety of pre-defined anchors of different sizes and aspect ratios are generated on the feature maps to cover the various morphological features that green roofs may present. For each anchor, the RPN performs two key tasks: foreground / background binary classification and bounding box coordinate regression. For foreground / background classification, first, spatial features are extracted through a 3x3 convolution layer, and then a 1x1 convolution layer is used to output the probability value of each anchor being foreground (containing green roofs) or background (not containing green roofs). The bounding box regression task then regresses the position and size increments of the anchor to make it more consistent with the green roof boundary, including the following steps:
[0097] (1) The RPN uses a 3x3 convolution layer to extract features and generate multiple pre-set anchors at each position , where is the anchor center coordinate, is the width and height of the anchor.
[0098] (2) For each anchor, calculate the geometric difference between its matching real box coordinates , i.e., the real offset , the formula is:
[0099]
[0100] (3) The RPN predicts the four-dimensional offset of the anchor through a 1x1 convolution layer . Compare the model-predicted offset with the real offset , and quantify the prediction error through the loss function , the formula is:
[0101]
[0102] (4) The loss function is calculated by using the back propagation algorithm to respond to the model parameters (gradient), and the parameter update strategy of the optimizer drives the predicted offset The true offset is gradually approached in a gradient descent manner .
[0103] (5) The predicted offset is used to adjust the anchor box parameters , and the refined predicted box coordinates are obtained , the formula is:
[0104]
[0105] In the above formulas, is the number of anchor boxes participating in regression; is the th anchor box sample; is a smooth L1 function used to segment the error; respectively represent the horizontal coordinate of the center point (x ), the vertical coordinate of the center point (y ), the anchor box width (w ), and the anchor box height (h ) compared with the true anchor box offset; is the true offset of the th anchor box in dimension , and is the predicted offset of the th anchor box in dimension .
[0106] After classification and regression, RPN sorts the anchor boxes according to the foreground probability value, and selects high-score anchor boxes as initial candidate regions. To solve the problem that there may be a large number of overlapping candidate regions, RPN uses a non-maximum suppression algorithm for post-processing, sorts the candidate regions from high to low probability, retains high-probability regions and eliminates highly overlapping regions, thereby effectively removing redundant candidate boxes. After the above processing, RPN finally outputs high-quality candidate regions containing position information and foreground probability scores.
[0107] S6-4: The ROI candidate regions generated by RPN and the feature maps generated by the ResNet-101 backbone network are input into the ROIAlign module to realize feature alignment and generate standardized feature representations.
[0108] Specifically, the ROIAlign module receives the ROI information generated by RPN and the feature maps extracted by the backbone network ResNet-101 as input. According to the downsampling rate of the backbone network (16 times), the ROI boundary box coordinates in the original image space (x ) to the feature map space, and converted to the feature map space coordinates after scaling 16 times To meet the requirements of the detection and segmentation module on the input size, ROIAlign normalizes each mapped ROI candidate region to generate a fixed-scale feature map.
[0109] ROIAlign is differentially processed for different task requirements: for the target detection task, each ROI candidate region is divided into 7x7 equal-size grid cells; for the mask prediction task, a 14x14 fine-grained grid division is used to preserve detailed features. Four uniformly distributed sampling points are set in each grid cell. Based on the relative distance between the sampling point and the adjacent integer coordinates, the weighted average value is calculated by the bilinear interpolation algorithm as the feature value of the sampling point. The feature values of the four adjacent integer coordinates around the sampling point are fused by weighted integration, effectively eliminating the pixel-level misalignment problem caused by two times of coordinate quantization in the traditional ROI Pooling module. Finally, the feature values of all sampling points in the grid are aggregated by mean, and the standardized feature maps of 7x7x256 (detection) and 14x14x256 (mask) are output respectively. Through this process, the ROIAlign module uniformly converts ROIs of different sizes into standardized feature representations, maintains the spatial correspondence of the features, and eliminates the quantization error in the feature extraction process.
[0110] S6-5: Multi-task collaborative processing of the feature map output by ROIAlign is performed to complete target classification, bounding box regression, and instance segmentation mask generation.
[0111] First, the 7x7x256 feature map output by ROIAlign is compressed into a 1024-dimensional feature vector through a fully connected layer, which encodes the global semantic information of the target region. This feature vector is then split into two parallel processing branches: the classification branch and the bounding box regression branch. The classification branch outputs the confidence score of the target class (green roof / background) through a fully connected layer, which is normalized by the Softmax function to filter high-probability targets, thereby determining whether the current region belongs to the green roof. The bounding box regression branch outputs the four-dimensional geometric correction amount of the anchor box ( ), which performs secondary correction on the candidate box generated by RPN to improve the target positioning accuracy, as in step S6-3.
[0112] Meanwhile, the higher resolution feature map (14x14x256) output by ROIAlign is used for the mask generation branch. This branch first enhances the local features of the 14x14x256 feature map through four layers of consecutive 3x3 convolution operations. Each layer of convolution uses 256 3x3x256 convolution kernels, without changing the spatial size and the number of channels of the input, so as to gradually strengthen the texture details of the vegetation coverage area and the spectral mutation features of the building boundary while maintaining the original spatial dimensions. Subsequently, a single layer of 2x2 transpose convolution (with a step size of 2) is used to upsample the feature map in space, expanding the feature map size from 14x14 to 28x28, so as to restore the spatial details of the target outline. The main function of the transpose convolution is to increase the spatial size of the feature map, rather than adjusting the channel dimension. Finally, through a 1x1x256 convolution kernel, the number of channels of the feature map is compressed from 256 to 1, generating a single-channel 28x28 probability mask for instance segmentation prediction at the pixel level.
[0113] To improve the edge segmentation accuracy of green roofs, the mask generation task of the present application introduces a gradient constraint loss on the basis of the traditional binary cross entropy (BCE) loss, and constructs a joint loss function. The specific steps are as follows:
[0114] (1) The Sobel operator is used to calculate the horizontal direction gradient and the vertical direction gradient , which are used to detect the intensity mutation of the mask in the horizontal direction (X axis) and the spectral transition in the vertical direction (Y axis), and are specifically defined as follows:
[0115]
[0116] (2) The gradient operators and are applied to the predicted mask and the real mask respectively to extract the gradient responses in the horizontal and vertical directions, and then the responses in the two directions are fused to calculate the edge gradient amplitude, and the edge gradient amplitude maps of the predicted mask and the real mask are obtained to improve the edge sharpening degree of the green roof target area, and the formula is:
[0117]
[0118]
[0119] (3) The traditional BCE loss function is calculated, which is used to supervise the model to learn the global probability distribution of the roof vegetation coverage area and the non-vegetation coverage area, and is helpful for the shape recognition of the main area, and the formula is:
[0120]
[0121] (4) Define gradient constraint loss , the L1 norm is used to measure the difference between the predicted mask and the real mask gradient amplitude, which forces the model to learn the edge structure details, the formula is:
[0122]
[0123] (5) Joint loss function is constructed by combining gradient loss and original BCE loss , considering the classification accuracy and edge structure retention ability, the formula is:
[0124]
[0125] In the above formulas, N is the total number of pixels; represents the pixel position; and are the weighting coefficients of classification loss and edge loss. Experiments show that , the classification accuracy and edge sensitivity of the model can be effectively balanced.
[0126] S7: Set key hyperparameters in the training process, including weight initialization method, learning rate, batch size and loss function weight coefficient, and select the optimizer type (Adam optimizer) to improve the training stability and convergence speed. Configure data augmentation strategy, including random flip, rotation, brightness adjustment and other operations, to improve the generalization ability of the model.
[0127] The loss function is used to quantify the difference between the model prediction value and the true value, and provides a reference basis for model parameter optimization. The present application designs a multi-task weighted loss strategy, which allocates weights to the losses of classification, regression and segmentation tasks, and the proportion is set to 1:1:1.5. Among them, the loss functions of classification and regression tasks use the existing standard loss functions in Mask RCNN, which are cross-entropy loss and smooth L1 loss respectively; the loss function of the segmentation task is the joint loss function proposed in the present application, which is composed of binary cross-entropy loss and gradient constraint loss , and the specific form is:
[0128]
[0129] To improve the expression ability of the model on the edge structure, the present application innovatively introduces a progressive loss weighting strategy: increase the weight of the gradient loss term in the early stage of training ( To enhance the learning of edge details, the value is gradually adjusted to 0.5 as the training converges, in order to achieve a balance between stable optimization and convergence effect.
[0130] S8: Input the training set generated in step S5 into the green roof detection model constructed in step S6 for training. A phased training strategy is adopted, first fixing the backbone network for training (40 rounds), and then unfreezing the entire network for fine-tuning.
[0131] S9: Input the validation set generated in step S5 into the trained model for evaluation, and calculate the mask mean accuracy (mAP) after each training round. Implement an early stopping mechanism: terminate training when the mAP metric does not improve for 10 consecutive rounds, and save the weights of the best-performing model corresponding to the highest historical mAP.
[0132] S10: Input the test set into the trained optimal model and perform the green roof detection task to evaluate the model's generalization ability on unseen samples. Specifically, green roof detection can be reduced to an instance-level binary classification problem. Based on the consistency between the model's prediction results and the true labels (i.e., the category labels annotated in S3), the detection results can be divided into the following four categories: TruePositive (TP) means that positive instances are correctly predicted as positive, that is, samples that are actually green roofs are correctly identified as green roofs; False Negative (FN) means that positive instances are incorrectly predicted as negative, that is, samples that are actually green roofs are incorrectly identified as background; False Positive (FP) means that negative instances are incorrectly predicted as positive, that is, samples that are actually background are incorrectly identified as green roofs; True Negative (TN) means that negative instances are correctly predicted as negative, that is, samples that are actually background are correctly identified as background. The model performance is evaluated using the following metrics:
[0133] The Intersection over Union (Iou) ratio is the ratio of the intersection to the union of the ground truth and predicted values. It measures the spatial overlap between the predicted and ground truth masks. The formula is:
[0134]
[0135] Precision represents the proportion of samples identified as green roofs that are actually green roofs. The formula is:
[0136]
[0137] Recall represents the proportion of actual green roof samples that are correctly identified, and the formula is:
[0138]
[0139] F1 score ( ) is the harmonic mean of Precision and Recall, which is used to evaluate the classification performance of the model, and the formula is:
[0140]
[0141] S11: input the high-resolution remote sensing image to be detected into the green roof detection model with the optimal model weight obtained in step S9, complete target detection and segmentation operation, and obtain the spatial position, category and corresponding mask information of the green roof.
[0142] S12: The present application further splices the block prediction mask output in step S11 into a complete remote sensing image mask. First, based on the metadata file (recording the top-left corner geographic coordinates of each block image and its pixel position coordinates in the original image) generated in S2, each sub-mask is accurately mapped to the original image coordinate system. Then, the overlapping area (20%) between adjacent blocks is implemented with a weighted fusion and edge smoothing strategy to generate a complete mask image with smooth edge characteristics and good spatial continuity, so as to solve the edge discontinuity problem caused by block prediction. Finally, a binary mask image (0 represents the background area, and 1 represents the green roof area) consistent with the spatial range and resolution of the original remote sensing image is generated and saved in GeoTIFF format, and the corresponding geographic coordinate information is embedded, which is convenient for subsequent spatial analysis and visualization.
[0143] S13: After obtaining the final prediction mask, the present application first performs a morphological closing operation on it to fill small holes and remove isolated noise, thereby optimizing the integrity and continuity of the mask boundary. Then, the processed mask is subjected to a contour extraction operation to vectorize the green roof area. All vector objects are stored as GeoJSON or Shapefile format vector files, and each object is attached with area, centroid coordinates, model prediction confidence and other attribute information. The finally generated vector results can be directly loaded into mainstream GIS platforms for spatial analysis, statistical analysis and visualization of green roofs.
[0144] The results obtained by the present application will be compared with Mask RCNN below, and three indexes of precision (Precision), recall (Recall) and F1 score (F1 score) are selected for evaluation. The index comparison results before and after improvement are shown in Table 1. It can be seen that the improved Mask RCNN model proposed by the present application is significantly better than the original model in all evaluation indexes: the Precision is improved by 10.83%, the Recall is improved by 11.35%, and the F1 score is improved by 11.09%. From 79.25% to 90.29%. The results show that the improved Mask RCNN model has higher accuracy, stronger robustness and better generalization ability in the green roof recognition task in the complex built environment, and can more effectively distinguish the green roof area from the background area.
[0145] Table 1 Precision comparison of Mask RCNN and improved Mask RCNN model in green roof recognition
[0146]
[0147] In summary, the improvements of the present application are as follows:
[0148] 1. Green roof detection and contour extraction process based on improved Mask RCNN algorithm, including remote sensing image preprocessing, model design, post-processing and geographic data generation.
[0149] 2. Green roof feature expression optimization method based on attention mechanism. A series module combining channel attention mechanism and spatial attention mechanism is constructed and embedded between FPN and RPN network to enhance the response ability of target area in feature map.
[0150] 3. Green roof boundary feature extraction method based on joint loss function. A weighted loss function composed of gradient constraint loss and binary cross entropy loss is constructed, combined with dynamic weight adjustment strategy to improve the segmentation accuracy of green roof edge.
[0151] 4. Mask splicing and standardized spatial data generation method based on geographic registration, including edge fusion, vector conversion, attribute information integration and other key technical links.
[0152] On the other hand, the embodiment of the present application also provides a remote sensing image green roof intelligent identification system based on improved Mask RCNN, comprising a memory and a processor in communication connection with the memory, the memory stores computer program instructions, and the processor executes the computer program instructions to realize the remote sensing image green roof intelligent identification method based on improved Mask RCNN as described in the above technical solution.
[0153] The above is only the preferred specific embodiment of the present application, but the scope of protection of the present application is not limited to this, any modification, equivalent replacement, improvement, etc. made by any person skilled in the art within the technical range disclosed by the present application shall be included in the protection scope of the present application.
Claims
1. A method for intelligent identification of green roofs in remote sensing images based on an improved Mask RCNN, characterized in that, Includes the following steps: Step 1: Obtain a high-resolution remote sensing image dataset; Step 2: Build an improved Mask RCNN green roof detection model, including an integrated residual network, feature pyramid network, dual-channel attention enhancement module, region proposal network, and region of interest alignment module; High-resolution remote sensing images are first processed by a ResNet-101 residual network for multi-level feature extraction. The extracted multi-level features are then fused using a feature pyramid network to obtain a multi-scale feature map. A dual-channel attention enhancement module is then used to dynamically calibrate the spectral and spatial responses of the feature map related to green roofs, resulting in an enhanced multi-scale feature map. A region proposal network extracts candidate regions that may contain green roofs from the enhanced multi-scale feature map. The candidate regions are then input into a region of interest alignment module along with the feature map generated by the ResNet-101 residual network to achieve feature alignment and generate standardized feature representations. Finally, through multi-task collaborative processing, target classification, bounding box regression, and instance segmentation mask generation are completed. Step 3: Design a loss function to train and evaluate the improved Mask RCNN green roof detection model; In step 3, the designed loss function is a multi-task weighted loss, including object classification loss, bounding box regression loss, and instance segmentation mask loss, where the instance segmentation mask loss function... Binary cross-entropy loss With gradient constraint loss The combined loss is constructed, and the specific steps are as follows: (31) The Sobel operator is used to calculate the gradient in the horizontal direction. and vertical gradient It is used to detect abrupt changes in intensity in the horizontal direction and spectral transitions in the vertical direction of a mask, and is specifically defined as follows: (32) For the prediction mask respectively and real mask Applying gradient operators and Convolution is performed to extract the gradient responses in the horizontal and vertical directions. Then, the responses in the two directions are fused to calculate the edge gradient magnitude, resulting in edge gradient magnitude maps of the predicted mask and the real mask, respectively. To enhance the edge sharpness of the target area for green roofs, the formula is: (33) Calculate the traditional BCE loss function The formula is: (34) Define gradient constraint loss The L1 norm is used to measure the difference between the gradient magnitudes of the predicted mask and the true mask, forcing the model to learn detailed information about the edge structure. The formula is: (35) Combine the gradient loss with the original BCE loss to construct a joint loss function. The formula is: In the above formulas, N Total number of pixels; Indicates the first Pixel position; and These are the weighting coefficients for the classification loss and the marginal loss, respectively. A progressive loss weighting strategy is introduced: the weight of the gradient loss term is increased in the early stage of training to enhance the learning of edge details; as training gradually converges, its weight is gradually adjusted to a fixed value to achieve a balance between stable optimization and convergence effect. Step 4: Use the trained optimal model to detect green roofs.
2. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 1, characterized in that: The specific implementation process of step 1 includes: Step 11: Acquire high-resolution remote sensing images and enhance the spectral and textural features of green roofs in the images through multispectral band fusion, vegetation index enhancement, spatial domain enhancement, and noise suppression image processing techniques. Step 12: The processed high-resolution remote sensing image is divided into blocks using the sliding window method. The RGB three channels of each block are normalized. While sliding, the upper left pixel coordinates and corresponding geographic coordinates of each block are recorded to generate metadata files. Step 13: Select valid samples containing clear green roofs from the block images generated in Step 12, and use the image annotation tool LabelMe to annotate the selected samples. The annotation results are saved in JSON file format, which includes image path, resolution, polygon vertex coordinates and category label. Step 14: Convert the JSON file generated by the annotation into a JSON file in the MS COCO2017 dataset format. The conversion process automatically generates an annotation index file, which contains image ID, category ID, segmentation mask coordinates and bounding box information, for the improved MaskRCNN green roof detection model to read. Step 15: Randomly divide all samples into training set, validation set and test set according to a certain ratio. The training set is used for model training, the validation set is used for parameter optimization and performance tuning, and the test set is used to evaluate the generalization performance of the model.
3. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 1, characterized in that: The specific process of the dual-channel attention enhancement module is as follows: (A1) The multi-scale feature map output by the feature pyramid network is denoted as... For each channel, global spatial average pooling and max pooling are performed separately to generate two channel description vectors respectively. and The former characterizes the global response intensity of the channel, while the latter captures the local salient features within the channel; (A2) Input the two channel description vectors mentioned above into a multilayer perceptron (MLP) with shared parameters, perform channel compression and expansion operations respectively, establish the dependency relationship between channels through nonlinear transformation, add the two results, and then normalize them with Sigmoid to generate channel attention weights that identify the importance of vegetation-related channels. The formula is: (A3) This weight With input feature map Channel-by-channel multiplication is performed to suppress channel responses irrelevant to the green roof and enhance semantic information relevant to the target, resulting in a channel-enhanced feature map. The formula is: (A4) Feature map For each spatial location in the image, average pooling and max pooling are performed along the channel dimension to generate two single-channel feature maps. and , representing the average response and local maximum response at each location, respectively; (A5) The two single-channel feature maps are concatenated along the channel direction, and then a 7×7 convolutional kernel is used to capture local spatial context information. Finally, the spatial attention weights are generated by normalizing the data using the Sigmoid function. This is used to quantify the response intensity of each location in the feature map to the target area of the green roof. The formula is: (A6) Spatial attention weights and Element-wise multiplication along the spatial dimension yields the final dual-channel enhanced feature map. The formula is: Among the various types, For the Sigmoid function, This represents element-wise multiplication. This indicates that a 7×7 convolution kernel is used for feature extraction.
4. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 1, characterized in that: The region proposal network receives four feature maps of different scales, P2, P3, P4 and P5, from the output of the feature pyramid network and enhanced by the dual-channel attention enhancement module as input. Through the sliding window mechanism, it generates predefined anchor boxes of various sizes and aspect ratios on the feature maps to cover the various morphological features that green roofs may present. For each anchor box, the region proposal network performs two key tasks: foreground / background binary classification and bounding box coordinate regression. For foreground / background classification, spatial features are first extracted through a 3×3 convolutional layer, followed by a 1×1 convolutional layer that outputs the probability value of each anchor box being foreground or background. The bounding box regression task regresses the position and size increments of the anchor box to make it fit the green roof boundary better, including the following steps: (B1) The region proposal network uses 3×3 convolutional layers to extract features and generates multiple pre-defined anchor boxes at each location. ,in The coordinates of the anchor frame center are For the width and height of the anchor frame; (B2) For each anchor frame, calculate its coordinates relative to the matched ground truth frame. The geometric difference between them, i.e., the true offset The formula is: (B3) The region proposal network predicts the four-dimensional offset of the anchor frame through a 1×1 convolutional layer. The offset predicted by the model Compared with the actual offset In comparison, through the loss function The formula for quantifying prediction error is: (B4) The backpropagation algorithm is used to calculate the response of the loss function to the model parameters, and the parameter update strategy of the optimizer drives the prediction offset. Approximate the true offset step by step using gradient descent. ; (B5) Utilizing the predicted offset Adjust anchor frame parameters The refined prediction box coordinates are obtained. The formula is: In the above formulas, The number of anchor frames participating in the regression; For the first An anchor frame sample; This is a smoothing L1 function used to segment the error. These represent the x-coordinates of the center point, respectively. , center point ordinate Anchor frame width Anchor frame height Compared to the offset of the actual anchor frame; For the first Anchor boxes in dimension The actual offset on, For the first Anchor boxes in dimension The predicted offset on; After completing classification and regression, the region proposal network sorts the anchor boxes according to the foreground probability values, selects high-scoring anchor boxes as initial candidate regions, and uses a non-maximum suppression algorithm for post-processing to sort the candidate regions from high to low probability, retaining high-probability regions and removing regions that highly overlap with them, thereby effectively removing redundant candidate boxes.
5. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 1, characterized in that: The Region of Interest (ROI) alignment module receives ROI candidate boxes generated by the Region Proposal Network (RPN) and feature maps extracted by the ResNet-101 backbone network as input. Based on the backbone network's downsampling rate N, it then adjusts the ROI bounding box coordinates in the original image space. Mapped to the feature map space, scaled N times, and then converted to feature map space coordinates. The Region of Interest (ROI) alignment module standardizes each mapped ROI region to generate a fixed-scale feature map. The Region of Interest (ROI) alignment module performs differentiated processing for different task requirements: For object detection tasks, each candidate box region is divided into 7×7 equal-sized grid cells; for mask prediction tasks, a fine-grained 14×14 grid is used to preserve detailed features. Four evenly distributed sampling points are set in each grid cell. Based on the relative distance between the sampling point and its adjacent integer coordinates, a weighted average is calculated using a bilinear interpolation algorithm as the feature value of the sampling point. Finally, the feature values of all sampling points in the grid are averaged and aggregated to output standardized feature maps of 7×7×256 and 14×14×256, respectively.
6. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 5, characterized in that: The 7×7×256 feature map output by the region of interest alignment module is compressed into a 1024-dimensional feature vector through a fully connected layer. This feature vector encodes the global semantic information of the target region. The feature vector is then split into two parallel processing branches: a classification branch and a bounding box regression branch; The classification branch outputs the confidence score of the target category through the fully connected layer, and after normalization by the Softmax function, it filters out high-probability targets to determine whether the current area belongs to the green roof. The bounding box regression branch outputs the four-dimensional geometric correction of the anchor box. The candidate bounding boxes generated by the region proposal network are then further refined to improve the target localization accuracy. Meanwhile, the higher-resolution feature map of 14×14×256 output by the region of interest alignment module is used for the mask generation branch. This branch first performs local feature enhancement on the 14×14×256 feature map through four consecutive 3×3 convolution operations. Each convolution layer uses 256 3×3×256 convolution kernels without changing the spatial size and number of channels of the input. Thus, while maintaining the original spatial dimension, the texture details of the vegetation cover area and the spectral abrupt change features of the building boundary are gradually enhanced. Subsequently, a single-layer 2×2 transposed convolution is used to spatially upsample the feature map, expanding the feature map size from 14×14 to 28×28 to restore the spatial details of the target contour. Finally, a 1×1×256 convolution kernel is used to compress the number of channels of the feature map from 256 to 1, generating a single-channel 28×28 probability mask for pixel-level instance segmentation prediction.
7. The intelligent green roof recognition method based on improved Mask RCNN in remote sensing images as described in claim 1, characterized in that: The process also includes further stitching the output segmented prediction masks into a complete remote sensing image mask: First, based on the metadata file, which records the geographic coordinates of the top left corner of each segmented image and its pixel position coordinates in the original image, each sub-mask is accurately mapped to the coordinate system of the original image; then, for the overlapping areas between adjacent segments, a weighted fusion and edge smoothing strategy is adopted to generate a complete mask image with smooth edge features and good spatial continuity; finally, a binary mask map with the same spatial range and resolution as the original remote sensing image is generated, where 0 represents the background area and 1 represents the green roof area, and it is saved in GeoTIFF format with the corresponding geographic coordinate information embedded. After obtaining the final prediction mask, morphological closing operation is first performed on it to fill small holes and remove isolated noise, thereby optimizing the integrity and continuity of the mask boundary. The processed mask is then subjected to contour extraction to vectorize the green roof area; All vector objects are stored uniformly as vector files in GeoJSON or Shapefile format, and each object is appended with area, centroid coordinates, and model prediction confidence information.
8. A smart green roof recognition system based on improved Mask RCNN remote sensing images, characterized in that: The method includes a memory and a processor communicatively connected to the memory. The memory stores computer program instructions, and the processor executes the computer program instructions to implement the intelligent recognition method for green roofs based on the improved Mask RCNN of remote sensing images as described in any one of claims 1-7.
Citation Information
Patent Citations
Method for detecting open-pit mine field in remote sensing image based on deep learning
CN112270280A
Mask RCNN-based image segmentation model training method and particle size detection method
CN113408478A