A deep learning-based forest remote sensing image semantic segmentation processing method and system
By improving the encoding and decoding structure and multi-scale feature fusion model, the problems of segmentation accuracy and change detection of forest remote sensing images under complex conditions are solved, and high-precision dynamic monitoring and report generation of forest resources are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RES INST OF FOREST RESOURCE INFORMATION TECHN CHINESE ACADEMY OF FORESTRY
- Filing Date
- 2026-01-05
- Publication Date
- 2026-05-29
AI Technical Summary
Existing deep learning-based semantic segmentation methods for forest remote sensing images have shortcomings in handling noise interference, insufficient multi-scale feature extraction, and misjudgment of change detection under complex imaging conditions in mountainous areas, resulting in decreased segmentation accuracy and insufficient reliability of monitoring reports.
An improved encoding and decoding structure is used to construct a multi-scale feature fusion semantic segmentation model. Through data standardization, multi-scale feature segmentation, adaptive morphological smoothing, and change detection, a high-precision dynamic monitoring report of forest resources is generated.
It enables fully automated and high-precision analysis of forest resources, improves the spatial consistency of segmentation results and the reliability of monitoring reports, and provides accurate analysis of forest type distribution and change trends.
Smart Images

Figure CN122115843A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision application technology in remote sensing, and in particular to a method and system for semantic segmentation processing of forest remote sensing images based on deep learning. Background Technology
[0002] Forests are the core of terrestrial ecosystems, and their dynamic monitoring is crucial for biodiversity conservation and global change research. Traditional manual survey methods are inefficient and cannot meet the needs of large-scale, high-frequency monitoring. With the development of high-resolution remote sensing technology, semantic segmentation methods based on deep learning (such as U-Net and DeepLab series) have shown potential in the automated extraction of forest information. However, existing methods still have significant shortcomings in data processing, which limits their accurate application in complex natural scenarios.
[0003] In terms of data preprocessing and augmentation, existing methods may struggle to effectively handle noise introduced by complex imaging conditions in mountainous areas (such as clouds, shadows, and snow cover). Furthermore, the data augmentation methods used during the training phase (such as simple rotation and flipping) fail to optimize for the texture and spatial distribution characteristics of forest canopy, resulting in a more than 30% drop in segmentation accuracy under adverse weather conditions. Regarding feature extraction and post-processing, general models are not adaptable enough to multi-scale features in forest images (such as continuous forest areas and isolated patches), and feature extraction is insufficient. Moreover, the use of fixed-parameter morphological filtering for post-processing may not be able to simultaneously maintain boundary integrity and suppress salt-and-pepper noise, leading to the loss of small-scale forest information and distortion of area statistics. In the change detection stage, spectral temporal variations between multi-temporal images (such as phenological and illumination differences) are easily misjudged as real land cover changes. Existing methods lack a filtering mechanism based on land cover conversion logic. For example, during regular monitoring periods, direct conversion between mature forest land and water bodies is a low-probability event, which may lead to a large number of false changes in the results, seriously affecting the reliability of monitoring reports. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a method and system for semantic segmentation of forest remote sensing images based on deep learning. Through a progressive process of data standardization, multi-scale feature segmentation, adaptive result optimization, accurate change detection and automatic report generation, it can realize fully automatic and high-precision analysis of forest resources from raw images to management decision information.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a deep learning-based semantic segmentation method for forest remote sensing images, the method comprising: Acquire raw remote sensing images of the target forest area and perform data preprocessing on the raw remote sensing images to obtain standardized image tensors; The standardized image tensor is input into a pre-trained multi-scale feature fusion semantic segmentation model for pixel-level classification, generating an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; Based on the spatial and category distribution of the initial semantic segmentation probability map, representative regions are selected to construct the benchmark analysis region, and boundary optimization control parameters are obtained through gridding and consistency analysis. Adaptive morphological smoothing is performed on the initial semantic segmentation probability map according to the boundary optimization control parameters, and the maximum probability category is determined to obtain the preliminary label matrix. Noise detection and pixel redistribution based on neighborhood consistency are performed on the preliminary label matrix to obtain the refined forest semantic segmentation result matrix. Change detection is performed based on the refined forest semantic segmentation result matrix, and forest vegetation change areas are automatically extracted to obtain a binary change area mask matrix. Based on the binary change region mask matrix and the refined forest semantic segmentation result matrix, a dynamic monitoring report of forest resources is automatically generated, which includes forest type distribution, change region location, and change trend analysis.
[0006] Secondly, a deep learning-based semantic segmentation processing system for forest remote sensing images includes: The data preprocessing module is used to acquire the original remote sensing image of the target forest area and perform data preprocessing on the original remote sensing image to obtain a standardized image tensor. The model segmentation module is used to input the standardized image tensor into a pre-trained multi-scale feature fusion semantic segmentation model to perform pixel-level classification and generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; The optimization module is used to select representative regions to construct the baseline analysis region based on the spatial and category distribution of the initial semantic segmentation probability map, and obtain boundary optimization control parameters through gridding and consistency analysis. Adaptive morphological smoothing is performed on the initial semantic segmentation probability map according to the boundary optimization control parameters, and the maximum probability category is determined to obtain the preliminary label matrix. Noise detection and pixel reassignment based on neighborhood consistency are performed on the preliminary label matrix to obtain the refined forest semantic segmentation result matrix. The detection module is used to perform change detection based on the refined forest semantic segmentation result matrix, automatically extract forest vegetation change areas, and obtain a binary change area mask matrix. The report generation module is used to automatically generate a dynamic monitoring report of forest resources, which includes forest type distribution, location of change areas, and trend analysis, based on the binary change area mask matrix and the refined forest semantic segmentation result matrix.
[0007] Thirdly, a computing device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0008] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0009] The above-described solution of the present invention has at least the following beneficial effects: This system achieves standardized processing of raw remote sensing images, improving the uniformity and stability of data quality. Standardized image tensors can directly adapt to subsequent model input requirements, reducing additional data format adaptation operations and providing a high-quality data foundation for subsequent semantic segmentation. A multi-scale feature fusion model with an improved encoding / decoding structure fully mines the feature information of forest images at different scales. The pixel-level classification capability of the pre-trained model efficiently generates an initial semantic segmentation probability map, providing comprehensive and reliable quantitative data support for subsequent segmentation result optimization. A benchmark region is constructed based on the spatial and category distribution of the data itself, making the boundary optimization control parameters more closely match the actual data characteristics. Adaptive morphological smoothing can accurately adapt to different ground features. By leveraging boundary characteristics and combining noise detection and redistribution with neighborhood consistency, noise interference is effectively suppressed, improving the spatial consistency and integrity of the segmentation results and yielding a high-quality, refined forest semantic segmentation matrix. Based on these refined segmentation results, change detection is conducted, enhancing the targeting and accuracy of change region extraction. A binary change region mask matrix clearly defines the spatial extent of forest vegetation changes, providing change region data for subsequent monitoring and analysis. The integration of multiple data resources enables a structured presentation of forest type distribution change regions and trends. The monitoring report provides comprehensive and logically clear information, improving the interpretability and ease of application of monitoring results, and providing complete support for forest resource management. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a deep learning-based semantic segmentation method for forest remote sensing images, provided by an embodiment of the present invention. Figure 2 This is a schematic diagram of a forest remote sensing image semantic segmentation processing system based on deep learning, provided by an embodiment of the present invention. Detailed Implementation
[0011] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0012] like Figure 1 As shown, embodiments of the present invention propose a semantic segmentation method for forest remote sensing images based on deep learning, the method comprising the following steps: Step 100: Obtain the original remote sensing image of the target forest area and perform data preprocessing on the original remote sensing image to obtain a standardized image tensor; Step 200: Input the standardized image tensor into the pre-trained multi-scale feature fusion semantic segmentation model to perform pixel-level classification and generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; Step 300: Based on the spatial and category distribution of the initial semantic segmentation probability map, a representative region is selected to construct the benchmark analysis region, and boundary optimization control parameters are obtained through gridding and consistency analysis; adaptive morphological smoothing is performed on the initial semantic segmentation probability map according to the boundary optimization control parameters, and the maximum probability category is determined to obtain the preliminary label matrix; noise detection and pixel reassignment based on neighborhood consistency are performed on the preliminary label matrix to obtain the refined forest semantic segmentation result matrix; Step 400: Based on the refined forest semantic segmentation result matrix, change detection is performed to automatically extract forest vegetation change areas to obtain a binary change area mask matrix. Step 500: Based on the binary change region mask matrix and the refined forest semantic segmentation result matrix, automatically generate a dynamic monitoring report of forest resources that includes forest type distribution, change region location and change trend analysis.
[0013] In this embodiment of the invention, the data specifications of the original remote sensing images are unified, improving the consistency of subsequent model input data and reducing the impact of interference factors such as noise and illumination differences in the original images on subsequent processing. Multi-scale feature fusion can fully capture image features at different scales, and the improved encoding and decoding structure enhances the integrity of feature extraction and transmission, providing comprehensive feature support for pixel-level classification. The selection of the reference region and gridded analysis make boundary optimization more targeted, adaptive morphological smoothing can adapt to the boundary features of different regions, and neighborhood consistency noise detection can accurately identify and correct noisy pixels, improving the spatial continuity and category consistency of the segmentation results. Based on the refined segmentation results, change detection can lock the pixel range of vegetation changes, and the generated binary change region mask matrix clearly defines the change region, providing accurate change region data support for subsequent analysis. By integrating the two types of matrix data for analysis, the system sorts out the forest type distribution information, accurately associates the change region with the corresponding forest type, expands the information dimension of the monitoring report, and strengthens the data support of the report.
[0014] In a preferred embodiment of the present invention, step 100 above, which involves acquiring the original remote sensing image of the target forest area and performing data preprocessing on the original remote sensing image to obtain a standardized image tensor, includes: Step 101 involves acquiring raw remote sensing images of the target forest area. Specifically, this includes: determining the geographical boundary of the target forest area based on the scope requirements of dynamic forest monitoring; acquiring raw remote sensing image data of the area using a remote sensing platform equipped with a high-resolution imaging sensor; the remote sensing platform can be flexibly selected according to the monitoring range and accuracy requirements, including but not limited to satellite remote sensing platforms and UAV remote sensing platforms; satellite remote sensing platforms are used to acquire remote sensing images of a large target area, while UAV remote sensing platforms can supplement imaging of complex local areas not covered by satellite remote sensing; the acquired raw remote sensing images must include: complete forest vegetation cover areas and other land cover types within the target area, while also recording the corresponding imaging parameters and spatiotemporal information; the imaging parameters include sensor model, imaging resolution, and exposure time, and the spatiotemporal information includes imaging time and geographical location information at the time of imaging; this provides basic data support for subsequent preprocessing steps, ensuring that subsequent processing can accurately match the actual geographical and environmental conditions of the target forest area.
[0015] Step 102 involves performing geometric correction on the original remote sensing image to eliminate geometric distortions caused by sensor attitude, terrain undulation, and Earth curvature, resulting in an orthorectified image with accurate geographic coordinates. Specifically, this includes: First, performing distortion source analysis on the original remote sensing image to determine the type and degree of geometric distortion caused by sensor attitude deviation, terrain undulation, and Earth curvature; then, introducing an ellipsoidal projection correction algorithm to perform distortion correction calculations related to Earth curvature. The specific calculation process involves first selecting suitable reference ellipsoid parameters, including the semi-major axis, semi-minor axis, and flattening, based on the geographical location of the target forest area; then, performing ellipsoidal projection transformation calculations on the pixel coordinates of the original remote sensing image based on the selected reference ellipsoid parameters, converting the planar coordinates of the image pixels into geodetic coordinates on the corresponding ellipsoid surface; finally, converting the geodetic coordinates on the ellipsoid surface into Cartesian coordinates through inverse projection operations, completing the initial ellipsoidal projection correction; subsequently, calculating the deviation values between the initial corrected pixel coordinates and the theoretical coordinates, and further adjusting the deviation values using terrain undulation data. The process involves iterative correction until the deviation value is less than a preset threshold, completing the ellipsoidal projection correction stage. Based on this, evenly distributed ground control points with geographic coordinates are selected within the target forest area. These ground control points can be landmark features within the area, such as road intersections, bridge corners, and boundary markers, and their precise geodetic coordinates are obtained through field measurements. The selected ground control points are then matched with corresponding pixels in the original remote sensing image after ellipsoidal projection correction. A geometric correction model incorporating ellipsoidal projection parameters is established based on the matching results. Using this geometric correction model, the coordinates of each pixel in the original remote sensing image are corrected point-by-point, simultaneously eliminating pixel offset issues caused by sensor attitude deviation, terrain undulation, and Earth curvature. After correction, an orthorectified image with accurate geographic coordinates is output, ensuring that each pixel in the image accurately corresponds to its actual ground geographic location. This provides a reliable spatial reference for subsequent geographic information-based forest information extraction and change detection, effectively avoiding land use misidentification problems caused by spatial location deviations.
[0016] Step 103 involves performing radiometric calibration and atmospheric correction on the orthorectified image, converting the original digital quantization values of the image into the physical quantity of surface reflectance to obtain a reflectance image with accurate radiometric physical meaning. Specifically, this includes: first, performing radiometric calibration on the orthorectified image, converting the original digital quantization values of each pixel in the image into apparent radiance based on the radiometric calibration coefficients of the remote sensing sensor; then, based on atmospheric environmental parameters during imaging, such as atmospheric aerosol optical thickness and water vapor content, selecting a suitable atmospheric correction model to perform atmospheric correction on the converted apparent radiance image. The process involves: First, atmospheric calibration and atmospheric correction are used to eliminate interference from atmospheric transmission processes such as scattering, absorption, and reflection on the radiation signal. This process further converts the apparent radiance into the physical quantity of surface reflectance. Through this continuous process of radiometric calibration and atmospheric correction, a reflectance image with accurate radiometric physical meaning is finally obtained. This ensures that the pixel values of the image accurately reflect the actual radiometric characteristics of surface vegetation and other land features within the target forest area, solving the problem of decreased segmentation accuracy under adverse weather conditions caused by distorted radiometric information, and improving the radiometric consistency and comparability between remote sensing images acquired in different times and spaces.
[0017] Step 104 involves resizing and channel normalizing the reflectance image to convert it into a multi-channel image tensor with a fixed spatial dimension and standardized numerical range. This standardized image tensor includes: first, determining fixed image spatial dimension parameters based on the input specifications of the subsequent semantic segmentation model; second, resizing the reflectance image using an interpolation algorithm to ensure the adjusted image spatial dimension matches the preset fixed spatial dimension. The interpolation algorithm can be bilinear interpolation or similar algorithms that effectively preserve image texture information, avoiding the loss of key features such as forest canopy texture during resizing; third, after resizing, a multi-channel geometric registration algorithm is introduced to correct the inter-channel spatial consistency of the multi-channel reflectance image. Specifically, the most information-rich channel from the multi-channel reflectance image is selected as the reference channel, typically the near-infrared channel sensitive to forest vegetation; then, feature points are extracted from the reference channel and other channels to be registered, and corner detection methods are used to identify stable feature points in each channel image, calculating the descriptors for each feature point. Cross-channel similarity matching is performed. Based on the successfully matched feature points, the geometric transformation parameters between channels are calculated, including translation, rotation angle, and scaling ratio. A random sampling consensus algorithm is used to eliminate mismatched points generated during the matching process to improve the accuracy of parameter calculation. Based on the obtained geometric transformation parameters, pixel-by-pixel coordinate transformation and grayscale resampling are performed on each channel image to be registered to complete the geometric registration between channels. After registration, the pixel deviation of the overlapping area between each channel and the reference channel is calculated, and the geometric transformation parameters are iteratively optimized until the deviation value is less than a preset threshold to ensure pixel-level spatial alignment of the multi-channel images. Subsequently, channel normalization processing is performed on the geometrically registered multi-channel reflectance images, and the statistical characteristics of the pixel values of each channel image, such as mean and standard deviation, are calculated. Based on these statistical characteristics, the pixel values of each channel are mapped to a preset standardized value range. Through the collaborative processing of size adjustment, multi-channel geometric registration, and channel normalization, the reflectance image is finally converted into a multi-channel image tensor with fixed spatial dimensions, spatial alignment between channels, and standardized value range. This image tensor is the standardized image tensor.
[0018] In this embodiment of the invention, original remote sensing images of the target forest area are acquired to provide a basic data source for subsequent data preprocessing and semantic segmentation, ensuring the original data support for the entire processing flow; geometric correction is performed on the original remote sensing images to eliminate geometric distortions caused by multiple factors, assign precise geographic coordinates to the images, improve the accuracy of the image's spatial location, and provide a reliable spatial basis for subsequent geographic information-based analysis; the original digital quantization values are converted into physically meaningful surface reflectance to eliminate interference in the radiation transmission process and improve the authenticity and comparability of the image's radiation information; the spatial dimension and numerical range of the images are unified to generate standardized multi-channel image tensors, optimizing the consistency of subsequent model input data and reducing the interference of data specification differences on model processing.
[0019] In a preferred embodiment of the present invention, step 200 involves inputting the standardized image tensor into a pre-trained multi-scale feature fusion semantic segmentation model for pixel-level classification to generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is constructed based on an improved encoding / decoding structure and includes: Step 201: The encoder of the multi-scale feature fusion semantic segmentation model processes the standardized image tensor to obtain a set of multi-level feature maps containing different levels of abstraction and spatial resolution. Specifically, the construction of the multi-scale feature fusion semantic segmentation model is based on an improved encoding and decoding structure, consisting of an encoder, a multi-scale feature fusion structure, a feature amplification and extraction structure, and a decoder connected sequentially. The encoder uses a ResNet-50 with fully connected layers removed as its core backbone network, the decoder is constructed using stacked transposed convolutional layers and convolutional layers, the multi-scale feature fusion structure incorporates parallel multi-rate dilated convolutional kernels and global pooling units, and the feature amplification and extraction structure consists of an upsampling module and a convolutional module. Each structure achieves smooth data transmission through a feature channel interface. Model training... In the training phase, a remote sensing image annotation dataset containing various forest vegetation types and land cover types was selected as the training data. After preprocessing such as resizing and channel normalization, the data was divided into training and validation sets. The cross-entropy loss function was used as the training loss criterion, and a stochastic gradient descent optimizer was used to iteratively update the model parameters. During training, the model performance was monitored in real time using the validation set, and hyperparameters such as the learning rate and batch size were dynamically adjusted until the model's performance on the validation set stabilized, thus completing the model training. After training, the encoder was initialized by loading pre-trained weights from the ImageNet dataset and further fine-tuning them in conjunction with the trained model parameters. Initializing with pre-trained weights can effectively improve the initial performance of the encoder's feature extraction and reduce the training difficulty of the model on forest remote sensing image data.
[0020] After model construction and training are completed, the encoder first receives a normalized image tensor as input data. Specifically, the encoder first performs convolution operations on the normalized image tensor through the first convolutional layer to extract shallow texture features from the image. These shallow texture features reflect the basic texture information of the forest canopy. Then, a pooling layer downsamples the convolutional feature map, reducing its spatial resolution while increasing its abstractness. The encoder, relying on the residual block structure of the ResNet-50 backbone network, processes the features layer by layer according to the above combination of convolution and pooling. Each set of convolutional and pooling layers outputs a feature map. As the processing layers deepen, the spatial resolution of the output feature map gradually decreases, but the semantic abstraction level continuously increases, ultimately resulting in a set of multi-level feature maps containing different levels of abstraction and spatial resolution. This set of multi-level feature maps provides a comprehensive feature foundation for subsequent multi-scale feature fusion and detailed feature extraction, and also lays a reliable feature input foundation for the collaborative work of the various structures in the model.
[0021] Step 202: Extract the deepest semantic feature map from the multi-level feature maps and input it into the multi-scale feature fusion structure. The multi-scale feature fusion structure aggregates contextual information from different receptive fields by performing multi-rate dilated convolution and global pooling operations in parallel to obtain a feature map that fuses multi-scale global semantic information. Specifically, this includes: firstly, selecting the deepest semantic feature map from the multi-level feature maps. This deep feature map can reflect a large range of global semantic information in the forest image and is the core foundation for realizing multi-scale feature fusion; then, inputting this deep feature map into the multi-scale feature fusion structure. In this embodiment, the multi-scale feature fusion structure specifically adopts the dilated spatial pyramid pooling (ASPP) module, which consists of four sets of dilated convolution kernels with different rates set in parallel, a set of global pooling units, and a feature fusion convolution. The image consists of four dilated convolutional kernels with dilation rates of 6, 12, 18, and 24, respectively. Each kernel is configured with a corresponding batch normalization layer and activation layer. A global pooling unit is followed by a 1×1 convolutional layer, a batch normalization layer, an activation layer, and an upsampling layer. Specifically, the four dilated convolutional kernels with different rates perform convolution operations on the deep feature map in parallel. Different receptive fields of varying sizes are constructed using different dilation rates to capture local contextual information of large-scale targets such as continuous forest areas, medium-scale targets such as isolated patches, and small-scale targets such as vegetation texture details in the forest image. Simultaneously, the global pooling unit performs global average pooling on the deep feature map to extract global semantic information across the entire image. The feature channel dimensions are then compressed by a 1×1 convolutional layer. After batch normalization and activation processing, the feature map size is adjusted to match the output feature of the dilated convolution by an upsampling layer. Figure 1After completing the multi-rate dilated convolution and global pooling operations, the ASPP module inputs five sets of output feature maps (four sets of dilated convolution feature maps and one set of global pooling feature maps) into the feature fusion convolutional layer. By combining feature stacking and convolution integration, the contextual information under different receptive fields is fused pixel by pixel, and finally a feature map that fuses multi-scale global semantic information is obtained. This feature map can simultaneously cover the semantic information of large-scale targets such as continuous forest areas and small-scale targets such as isolated patches, effectively improving the adaptability to multi-scale features of forest images.
[0022] Step 203: Extract feature maps from the multi-level feature maps, excluding the deep feature maps, and input them into the feature amplification and extraction structure. The feature amplification and extraction structure performs upsampling and convolution operations on the feature maps input from each layer to improve their spatial resolution and enhance detail information, obtaining enhanced feature maps that are adapted to the spatial resolution of each stage of the decoder. Specifically, after selecting the deep feature map with the highest semantic level, extract the remaining shallow and mid-level feature maps from the multi-level feature maps obtained in step 201 as the core processing objects. The specific feature maps are C1 and C2, and the intermediate feature maps are C3 and C4. These four types of feature maps all come from the output of different residual blocks of the ResNet-50 backbone network encoder. Although their semantic abstraction level is lower than that of deep feature maps, they contain rich forest image details such as forest boundary textures and small vegetation patches, which are key to supplementing detailed features. The four types of feature maps C1 to C4 are input separately into the feature amplification and extraction structure. The feature amplification and extraction structure is configured with a dedicated upsampling module and convolution module for each level of input feature map to achieve hierarchical fine processing.
[0023] The specific operation configuration is as follows: The upsampling module uniformly adopts the transposed convolution method, with the transposed convolution kernel size set to 3×3. The stride is adaptively set to 2 or 4 according to the resolution level of the input feature map, and the padding method is same padding to ensure that the edge details of the feature map are not lost during the upsampling process. Each transposed convolutional layer is followed by a batch normalization layer and a ReLU activation layer. The batch normalization layer is used to stabilize the feature distribution, and the ReLU activation layer is used to introduce non-linear transformation to enhance the feature expression ability. The convolution module adopts a combination configuration of 1×1 convolution + 3×3 convolution. The 1×1 convolutional layer is used to adjust the feature channel dimension and reduce feature redundancy, and the number of channels is uniformly adjusted to 64. The 3×3 convolutional layer is used to enhance the extraction of detailed features and capture the texture information of forest boundaries and small vegetation patches. It is also followed by a batch normalization layer and a ReLU activation layer to further suppress the noise interference generated during feature transfer.
[0024] Matching the output feature map with the corresponding stage resolution of the decoder is achieved through hierarchical adaptive upsampling scaling. The specific matching logic is as follows: First, the input resolution requirements for each stage of the decoder are determined. From the initial stage to the final stage, the input resolution needs to be gradually increased from 1 / 8 of the input image to match the input image. For the original resolutions of the four feature maps C1 to C4, corresponding upsampling scaling factors are set. C4 is 1 / 16 of the input image and needs to be upsampled to 1 / 8 through a 2x transposed convolution to match the initial stage input resolution of the decoder; C3 is 1 / 8 of the input image and needs to be upsampled to 1 / 4 through a 2x transposed convolution. The first stage matches the second-stage input resolution of the decoder; C2 is 1 / 4 of the input image, which needs to be upsampled to 1 / 2 through a 4x transposed convolution to match the third-stage input resolution of the decoder; C1 is 1 / 2 of the input image, which needs to be upsampled to match the input image through a 2x transposed convolution to match the fourth-stage input resolution of the decoder. Through the coordinated processing of upsampling and convolution operations, the spatial resolution of the feature maps at each level is accurately adapted to the input requirements of the corresponding stage of the decoder, and finally, enhanced feature maps that are adapted to the spatial resolution of each stage of the decoder are obtained, providing high-quality detailed feature support for subsequent fusion with global semantic features.
[0025] Step 204: The decoder of the multi-scale feature fusion semantic segmentation model receives the feature map fused with multi-scale global semantic information as initial input; it performs an upsampling operation on the initial input feature map to double the spatial resolution of the feature map, obtaining the current upsampled feature map. Specifically, the decoder of the multi-scale feature fusion semantic segmentation model uses the feature map fused with multi-scale global semantic information output in step 202 as initial input data. This initial input data carries rich global semantic information and is the basis for the decoder to perform feature restoration and refinement. The decoder first calls the built-in upsampling module to perform an upsampling operation on the initial input feature map. The input feature map undergoes upsampling processing. The upsampling module uses transposed convolution as the core upsampling method, with specific parameters configured as follows: transposed convolution kernel size 3×3, stride 2, and padding method is same padding. This parameter configuration can accurately double the spatial resolution of the initial input feature map. During the resolution improvement process, pixel information is supplemented through interpolation calculation of transposed convolution to ensure the spatial integrity and semantic consistency of the feature map. After the above upsampling processing, the current upsampled feature map is obtained. The spatial resolution of this feature map is significantly improved compared to the initial input feature map, gradually approaching the resolution level of the original input image.
[0026] Step 205 involves concatenating the current upsampled feature map with the enhanced feature map along the channel dimension to obtain a fused feature map. Specifically, after obtaining the current upsampled feature map, based on the feature matching requirements of each stage of the decoder, the current upsampled feature map and the corresponding level enhanced feature map are concatenated along a specified dimension. The core dimension of the concatenation operation is the channel dimension, meaning the two feature maps are superimposed and fused along the channel direction of the feature map. During the concatenation process, relying on the upsampling scaling factor preset in step 203, it is ensured that the current upsampled feature map and the corresponding enhanced feature map are completely consistent in spatial resolution, avoiding feature misalignment due to resolution differences. Through channel-dimensional superposition, the global semantic information in the current upsampled feature map can be directly and deeply fused with the local detail information in the enhanced feature map, enabling the two types of feature information to be collaboratively represented in the same feature map. After concatenation, a fused feature map is obtained. This fused feature map possesses both global semantic representation capabilities and local detail characterization capabilities, effectively compensating for the incomplete information of a single feature map, further enriching the information dimension of the feature map, and providing comprehensive feature input for subsequent feature optimization and integration.
[0027] Step 206: The concatenated fused feature map is transformed and integrated through a convolutional component to obtain the output feature map to be passed to the next decoding stage. Specifically, this includes: inputting the concatenated fused feature map into a preset convolutional component, which adopts a cascaded structure of three convolutional layers and two activation layers, specifically configured as a 1×1 convolutional layer, a ReLU activation layer, a 3×3 convolutional layer, a ReLU activation layer, and a 1×1 convolutional layer. Each convolutional layer is followed by a batch normalization layer to stabilize the feature distribution. The first 1×1 convolutional layer has 64 kernels to quickly adjust the channel dimension of the fused feature map and reduce feature redundancy. The middle 3×3 convolutional layer is used to deepen the fusion of detailed features and global features, enhancing the fusion of features. The first layer represents the effective feature information; the number of convolutional kernels in the second 1×1 convolutional layer is adapted to the requirements of the next decoding stage to achieve accurate matching of feature dimensions; the ReLU activation layer is used to introduce nonlinear transformation to improve the feature map's adaptability to complex forest scenes; the core function of this convolutional component is to perform ordered transformation and deep integration of the fused feature information, and to remove redundant feature information by processing layer by layer, thereby improving the compactness and effectiveness of the feature map; after the above series of processing, the output feature map is obtained and passed to the next decoding stage. This feature map retains key global semantic information and local detail information, while having better feature expression efficiency, and can provide high-quality feature support for the next stage of decoding processing.
[0028] Step 207: The decoder repeats the upsampling, stitching, and convolution operations until the spatial resolution of the feature map is restored to match the input image, ultimately obtaining a high-resolution feature map. Specifically, the decoder uses the output feature map as input data for the next decoding stage, initiating a cyclical iterative process of upsampling, stitching, and convolution. This iterative process proceeds sequentially through four preset stages until the feature map resolution is restored to the target level. The specific iteration logic is as follows: First stage iteration: Using the fused feature map output in step 202 as initial input, it undergoes step 204 transposed convolution upsampling (resolution increased to 1 / 8 of the input image), step 205 stitching with the C4 enhanced feature map (resolution 1 / 8) channel dimension, and step 206 convolution component processing to obtain the first stage output feature map; Second stage iteration: Using the first stage output feature map as input, it undergoes transposed convolution upsampling with the same parameters (resolution increased to 1 / 4), and stitching with the C3 enhanced feature map (… The second-stage output feature map is obtained by concatenating the channels of the C2 enhanced feature map (1 / 4 resolution) and processing it with a convolutional component. In the third iteration, the second-stage output feature map is used as input, upsampled via transposed convolution (resolution increased to 1 / 2), concatenated with the C2 enhanced feature map (1 / 2 resolution) and processed with a convolutional component to obtain the third-stage output feature map. In the fourth iteration, the third-stage output feature map is used as input, upsampled via transposed convolution (resolution increased to 1 / 1, consistent with the original input), concatenated with the C1 enhanced feature map (1 / 1 resolution) and processed with a convolutional component to obtain the fourth-stage output feature map. This process terminates, and the final fourth-stage output feature map is the high-resolution feature map. This high-resolution feature map possesses complete global semantic information while accurately preserving local details of the forest image, achieving precise matching of semantic and spatial details, and providing a reliable feature foundation for subsequent pixel-level classification.
[0029] Step 208: Based on the high-resolution feature map, after convolution and normalization exponential function processing, the probability distribution of each pixel belonging to each vegetation and land cover category is obtained as the initial semantic segmentation probability map. Specifically, this includes: using the high-resolution feature map as input data, firstly, adjusting the channel dimension of the high-resolution feature map through the final convolutional layer. The number of channels in the final convolutional layer is set to be equal to the preset number of vegetation and land cover categories to ensure that the adjusted feature map can directly correspond to the feature representation of each category; then, performing normalization exponential function processing on the feature map after channel adjustment. The normalization exponential function here is specifically the Softmax function, which is applied by processing the feature map after channel adjustment. The adjusted feature map is subjected to Softmax calculation pixel by pixel along the category dimension. The Softmax function maps the feature values of each channel corresponding to each pixel to a numerical range of 0 to 1, and makes the sum of the values of all categories corresponding to the same pixel equal to 1, realizing the conversion of feature values to probability values. The values generated by this process are used to clearly quantify the tendency of each pixel to belong to each vegetation and land cover category, thereby obtaining the probability distribution of each pixel belonging to each vegetation and land cover category. This probability distribution is used as the initial semantic segmentation probability map, which can provide quantitative basic data support for the subsequent optimization of semantic segmentation results and effectively ensure the reliability of subsequent processing.
[0030] In this embodiment of the invention, the standardized image tensor is processed to generate multi-level feature maps containing different levels of abstraction and spatial resolution, providing a comprehensive feature foundation for subsequent multi-scale feature fusion and detail extraction; achieving effective transformation from the original image tensor to feature information, covering full-dimensional feature expression from shallow texture to deep semantics; parallel operation of multi-rate dilated convolution and global pooling efficiently aggregates contextual information from different receptive fields; enriching the multi-scale global semantic expression of the feature maps, adapting to the feature capture needs of different scale targets such as continuous forest areas and isolated patches in forest images; upsampling operation improves the spatial resolution of the feature maps, and convolution operation enhances detail information; enabling non-deep feature maps to accurately adapt to the spatial resolution requirements of each stage of the decoder, fully preserving local detail features such as forest canopy texture, providing high-quality detail feature support for subsequent fusion; the upsampling operation doubles the spatial resolution of the feature map for fusing global semantics, gradually approaching the resolution of the input image; providing a foundation for subsequent enhancement. Feature map stitching and matching lays the foundation for spatial dimensions, ensuring spatial consistency of feature fusion at different levels; channel-dimensional stitching achieves deep fusion of global semantic features and local detail features; integrating complementary information from two types of features enhances the information richness of the feature map and strengthens the feature representation capability for complex forest scenes; convolutional components complete feature transformation and integration, optimizing the effectiveness and compactness of fused features; redundant feature information is eliminated, improving feature transfer efficiency and ensuring feature quality in subsequent decoding stages; upsampling, stitching, and convolution operations are repeatedly performed to gradually restore the spatial resolution of the feature map to match that of the input image; ensuring that the final high-resolution feature map fully covers the spatial information of the input image, providing an accurate spatial matching foundation for pixel-level classification; convolution and normalized exponential function processing generate the category probability distribution of each pixel; clearly presenting the category belonging tendency of each pixel, providing a quantitative probabilistic basis for the optimization of subsequent semantic segmentation results, and ensuring the reliability of the initial semantic segmentation probability map.
[0031] In a preferred embodiment of the present invention, step 300 involves selecting representative regions to construct a baseline analysis region based on the spatial and category distribution of the initial semantic segmentation probability map, and obtaining boundary optimization control parameters through gridding and consistency analysis; performing adaptive morphological smoothing on the initial semantic segmentation probability map based on the boundary optimization control parameters, and determining the maximum probability category to obtain a preliminary label matrix; and performing noise detection and pixel reassignment based on neighborhood consistency on the preliminary label matrix to obtain a refined forest semantic segmentation result matrix, including: Step 301: Based on the distribution characteristics of the three main land cover categories—dominant arbor forest, sparse shrub and grass vegetation, and non-vegetation land cover—in the initial semantic segmentation probability map, spatially identify the core areas where each category is concentrated as candidate areas. Specifically, this includes: First, determining the classification criteria for the three core land cover categories—dominant arbor forest, sparse shrub and grass vegetation, and non-vegetation land cover—based on the initial semantic segmentation probability map; this classification criteria are consistent with the category definitions used in the model training phase to ensure the uniformity of category recognition; then, for each pixel in the initial semantic segmentation probability map, extracting the corresponding data for each of the three land cover categories. The system calculates the probability values of each category of land cover; it then filters core areas by statistically analyzing the spatial clustering of pixels in each category; specifically, for each type of land cover, a probability threshold is first set, and discrete pixels with probabilities below the threshold are removed; then, spatial connectivity analysis is used to identify continuous pixel clusters; continuous pixel clusters with an area greater than the preset minimum clustering area are identified as the core distribution area of that category, thus obtaining the candidate areas corresponding to each of the three types of land cover; by focusing on the core distribution area, the interference of scattered pixels on the subsequent construction of the baseline area can be effectively avoided, providing a high-quality candidate range for the subsequent selection of representative sample areas.
[0032] Step 302: From the candidate areas, select three spatially balanced areas, each dominated by a single major land cover category, to determine representative sample areas; perform a spatial union operation on the three representative sample areas, using the merged continuous geographical area as the baseline analysis area. Specifically, this includes: initiating the representative sample area selection process based on the above three types of land cover candidate areas; for each type of land cover candidate area, combining the overall spatial range of the target forest area, selecting sample areas according to the principle of balanced spatial distribution, ensuring that the selected sample areas can cover the main distribution direction of that type of land cover within the target area, and requiring each sample area to be dominated by a single major land cover category. The dominant feature is defined as the percentage of pixels of this type of land cover within the sample area not being lower than a preset percentage threshold, and without large-scale mixing of other land cover types. Using the above selection rules, three representative sample areas meeting the requirements are selected from the candidate areas of each of the three land cover types, and the spatial extent of the three sample areas does not overlap. Then, a spatial union operation is performed on the nine selected representative sample areas to integrate the scattered sample areas into a continuous geographical area, which is the benchmark analysis area. By constructing a benchmark analysis area that combines category representativeness and spatial balance, it can be ensured that subsequent analysis parameters can objectively reflect the land cover distribution characteristics of the entire target area, laying the foundation for the calculation of subsequent boundary optimization control parameters.
[0033] Step 303: The benchmark analysis area is spatially divided using a fixed-size regular grid to obtain a set of grid cells. For each grid cell in the set, the category label selected by the maximum probability in the initial semantic segmentation probability map for all pixels within it is extracted, and the frequency of each label is counted. Specifically, this includes: First, determining the grid parameters, which requires referring to the pixel resolution of the initial semantic segmentation probability map and combining it with the average number of pixels in the smallest dominant land cover patch within the target forest area to initially preset three sets of regular grid candidate parameters of different sizes. Further, the final grid size is determined through sample verification. Two typical core areas of each of the three types of land cover within the benchmark analysis area are selected as verification samples. The average number of pixels in the grid cells within the sample area under each candidate grid size is counted to ensure that the average number of pixels is not less than 30 to support effective statistical analysis, and not more than 200 to avoid loss of detailed information. Finally, the candidate size that meets the above conditions and has the least computational cost is selected as the fixed grid parameter.
[0034] Subsequently, the baseline analysis region is gridded, specifically using the top-left vertex of the baseline analysis region as the origin, and establishing a grid with the initial semantic segmentation probability. Figure 1 Establish a local planar coordinate system; divide the grid lines sequentially along the horizontal and vertical directions of the coordinate system according to the determined grid size. The spacing between the horizontal and vertical grid lines is equal to the selected grid size, ensuring that the grid lines completely cover the boundary range of the reference analysis area, and that there are no overlapping areas or gaps between adjacent grid cells. Through the above grid line division, the reference analysis area is completely divided into several rectangular grid cells of the same size. Gathering all grid cells yields the grid cell set.
[0035] Based on this, category label extraction is carried out. For each grid cell in the set of grid cells, its coordinate range in the local planar coordinate system is first determined, that is, the coordinate values of the upper left and lower right corners of the grid cell are obtained. According to the coordinate range, all pixels within the corresponding coordinate range are matched in the initial semantic segmentation probability map to form the pixel subset corresponding to the grid cell. For each pixel in the pixel subset, the logic of determining the category label is followed, and the maximum value of the probability value of each category corresponding to the pixel is selected. The corresponding category is used as the category label of the pixel. The category label extraction of all pixels in the pixel subset is completed one by one.
[0036] Finally, the frequency of category labels is counted. All category labels extracted in each grid cell are traversed one by one, and the occurrence frequency of each category label is counted by classification counting. Specifically, a temporary counting table is first established. The table initially records all possible land cover categories with a count of 0. During the traversal, each time a category label is encountered, the corresponding category is found in the temporary counting table and its count is incremented by 1. After the traversal is completed, the value of each category in the temporary counting table is the frequency of the corresponding category label in that grid cell. This frequency data is recorded and associated with the corresponding grid cell identifier to form a correspondence table of grid cell, category, and frequency, which provides direct basic statistical data for the subsequent calculation of category purity values.
[0037] Step 304: Select the category with the highest frequency within the grid cell as the primary category, calculate the ratio of the pixel frequency of the primary category to the total number of pixels in the grid cell, and use this ratio as the category purity value of the grid cell. Specifically, this includes: based on the category label frequency data within each grid cell, firstly, determine the dominant category for each grid cell, identifying the category with the highest frequency as the primary category of the grid cell. If multiple categories have the same frequency, combine the candidate region category to which the grid cell belongs to determine the primary category to ensure the uniqueness of the determination; then, calculate the purity quantification index, i.e., by calculating the ratio of the pixel frequency of the primary category within the grid cell to the total number of pixels in the grid cell, the obtained ratio is the category purity value of the grid cell; the category purity value ranges from 0 to 1, the closer the value is to 1, the more concentrated the category distribution within the grid cell, and the closer the value is to 0, the more mixed the category distribution; by calculating the category purity value, the category distribution state within the grid cell can be transformed into a quantification index, providing core data support for the subsequent calculation of boundary optimization control parameters.
[0038] Step 305: Calculate the mean and standard deviation of the purity values of all grid cell categories. Use the ratio of the mean to the standard deviation as the boundary optimization control parameter. Specifically, this includes: First, summarizing the purity values of all grid cells to form a purity value dataset; based on this dataset, calculating the mean and standard deviation of all purity values sequentially. The mean reflects the overall level of purity of grid cell categories within the benchmark analysis area, while the standard deviation reflects the dispersion of each grid cell's purity value relative to the mean; then, performing a ratio calculation between the calculated mean and standard deviation, defining this ratio as the boundary optimization control parameter. The core function of this parameter is to quantify the overall uniformity of land cover category distribution within the benchmark analysis area. A larger parameter value indicates a relatively uniform and clear boundary of land cover category distribution within the area, while a smaller parameter value indicates a mixed and relatively blurred boundary of land cover category distribution within the area. Through the calculation of this parameter, a quantitative characterization of the regional land cover distribution characteristics can be achieved, providing a parameter basis for subsequent adaptive morphological smoothing processing.
[0039] Step 306: Determine the size of the structural element used in the morphological opening and closing operation based on the value of the boundary optimization control parameter; perform adaptive morphological smoothing filtering on the initial semantic segmentation probability map based on the structural element of the specified size to obtain a smoothed probability map. Specifically, this includes: First, establishing a mapping relationship between the boundary optimization control parameter and the size of the structural element in the morphological opening and closing operation. This mapping relationship is constructed based on experimental data from a large number of forest remote sensing image samples to ensure that the selection of the structural element size can accurately adapt to different boundary features. Specifically, when the boundary optimization control parameter value is large, it indicates that the ground feature boundary is relatively clear. In this case, a smaller structural element size is selected to avoid excessive smoothing leading to the loss of boundary information. When the parameter value is small, it indicates that the ground feature boundary is relatively blurry and has more noise interference. At this point, a larger structuring element is selected to enhance noise suppression. Based on the above mapping relationship and boundary optimization control parameters, the size of the structuring element required for this morphological opening and closing operation is determined. The structuring element adopts a rectangular or circular structure to adapt to the boundaries of different shapes of ground features. Subsequently, based on the structuring element of the determined size, morphological opening and closing operations are sequentially performed on the initial semantic segmentation probability map. The opening operation is used to remove small noise regions in the probability map, and the closing operation is used to fill small void regions in the probability map. Through the synergistic effect of the opening and closing operations, adaptive morphological smoothing filtering of the initial probability map is achieved, and finally a smoothed semantic segmentation probability map is obtained. By adaptively adjusting the size of the structuring element, noise interference is effectively suppressed while ensuring the integrity of ground feature boundaries, making up for the shortcomings of fixed-parameter morphological filtering.
[0040] Step 307: For the smoothed probability map, the category with the highest predicted probability at each pixel location is used as the label for that pixel to obtain a preliminary label matrix. Specifically, this includes: First, preparing input data and establishing a judgment benchmark, using the smoothed probability map as the core input data. The number of channels in the probability map is consistent with the preset number of land cover categories, and each channel corresponds to the probability distribution of a land cover category. At the same time, continuing the judgment benchmark for category labels, the channel index corresponding to each category is determined, and a one-to-one correspondence table between the channel index and the category label is established to ensure the consistency and accuracy of category determination.
[0041] The subsequent pixel-by-pixel traversal process is planned, using a row-by-row traversal method from left to right and top to bottom to cover all pixels in the smoothed probability map. During the traversal, the row and column coordinates of the current pixel are recorded simultaneously to ensure that each pixel is uniquely located and without omissions. For each traversed pixel, probability value extraction and highest probability determination are performed. The specific calculation process is as follows: First, the probability value of the pixel in all channels of the probability map is extracted one by one using the pixel's row and column coordinates, and all extracted probability values are stored in a temporary cache unit. The temporary maximum value parameter and candidate category label are initialized. The probability value of the first channel in the cache unit is used as the initial temporary maximum value, and the category label associated with the corresponding channel index is used as the initial candidate category label. Then, the remaining probability values in the cache unit are traversed one by one. Each probability value is compared with the current temporary maximum value. If the probability value of the current traversal is greater than the temporary maximum value, the temporary maximum value is updated to this probability value, and the candidate category label is updated to the category label associated with the channel index corresponding to the current probability value. If the probability value of the traversal is less than or equal to the temporary maximum value, the temporary maximum value and candidate category label remain unchanged. After the traversal is completed, the candidate category label is the final category label corresponding to the pixel.
[0042] According to the above judgment rules, the assignment of category labels is completed pixel by pixel. Specifically, the final category label of each pixel is associated with its column coordinates to construct a set of correspondences between pixel coordinates and category labels. Based on this set of correspondences, a blank matrix with the same size as the smoothed probability map is initialized, and a storage position for the category label is reserved at each pixel position of the matrix. Then, the row and column coordinates of all pixels are traversed again, and the category label associated with the coordinate in the set of correspondences is written into the corresponding storage position of the blank matrix to complete the assignment and filling of all pixel labels.
[0043] After the assignment is completed, a matrix integrity check is performed. The label matrix after the blank matrix is transformed is traversed to check whether each pixel position has been written with a category label and whether there are no null values or abnormal markers. If there are null values or abnormal markers, the probability extraction and comparison of the corresponding pixel is backtracked and reprocessed until all pixel positions are covered by valid category labels. The final category label matrix with full pixel coverage is the preliminary label matrix. Since the input probability map has undergone adaptive morphological smoothing, the stability of the probability distribution is significantly improved. Therefore, the continuity of the category boundaries in the generated preliminary label matrix is stronger and the proportion of noise pixels is significantly reduced. This provides high-quality basic data for subsequent noise detection and correction, and also reduces the risk of losing small-scale forest information.
[0044] Step 308: For each pixel in the preliminary label matrix, obtain the category label of the pixels within its eight neighborhoods; based on the category labels of the pixels within the eight neighborhoods, calculate the category with the highest frequency as the mode of the neighborhood categories for that pixel. Specifically, this includes: for the preliminary label matrix, using a neighborhood analysis method to mine the spatial correlation information of the pixels; for each pixel in the label matrix, delineate an eight-neighbor area centered on that pixel, where the eight neighborhoods refer to the rectangular area formed by the eight adjacent pixels around that pixel; then extract the category labels of all pixels within the eight neighborhoods, count the frequency of each category label within the eight neighborhoods, and determine the category label with the highest frequency as the mode of the neighborhood categories for that central pixel; if there are multiple category labels with the same frequency within the eight neighborhoods, and all of them are the highest, then combine the overall land cover area category where the central pixel is located to determine the final mode of the neighborhood categories to ensure the uniqueness of the mode; by obtaining the mode of the neighborhood categories, a judgment benchmark for the rationality of pixel categories can be established, making full use of the spatial continuity characteristics of land cover categories, and providing a reliable neighborhood reference for the subsequent accurate identification of isolated noise pixels.
[0045] Step 309: Determine whether the category label of the current pixel is consistent with the mode of the neighboring categories, and count the number of pixels in its eight neighboring regions that have the same category label as the current pixel; if the category label of the current pixel is inconsistent with the mode of the neighboring categories, and the number of pixels of the same category is less than a preset isolation threshold, then the current pixel is determined to be an isolated noise pixel. Specifically, this includes: performing isolated noise determination on each pixel in the preliminary label matrix based on the mode of the neighboring categories; first, determining whether the category label of the current pixel is consistent with the mode of the next eight neighboring categories; if they are consistent, it indicates that the category of the pixel is continuous with the surrounding pixels, and it is initially determined to be a normal pixel; if they are inconsistent, proceed to the next step of quantity counting determination; then count the number of pixels in the eight neighboring regions of the current pixel. The number of pixels with the same category label as the current pixel is compared with a preset isolation threshold. This isolation threshold is determined based on the number of pixels in the smallest normal ground feature patch in the forest image, ensuring effective differentiation between isolated noise pixels and normal small ground feature patches. If the category label of the current pixel is inconsistent with the mode of its neighboring categories, and the number of pixels of the same category in its eight neighbors is less than the isolation threshold, then the pixel is determined to be an isolated noise pixel. If the number of pixels of the same category is greater than or equal to the isolation threshold, then it is determined to be a normal small ground feature pixel. Through this dual determination condition, accurate screening of isolated noise pixels is achieved, effectively avoiding the misclassification of normal edge pixels or small ground feature pixels as noise, and improving the accuracy of noise detection.
[0046] Step 310: Correct the category labels of all isolated noise pixels to the mode of the category labels of the pixels in their eight neighborhoods. After pixel redistribution, a refined forest semantic segmentation result matrix is obtained. This step includes: summarizing the location information of all isolated noise pixels to form an isolated noise pixel set; for each isolated noise pixel in this set, performing label correction according to the pixel redistribution rules, that is, replacing the original category label of the noise pixel with the mode of the category labels of the pixels in its eight neighborhoods, ensuring that the corrected pixel category maintains spatial continuity with the surrounding pixels; after completing the label correction of all isolated noise pixels, performing an overall verification of the corrected label matrix to check for any isolated pixels that are not completely corrected. If so, repeating the label correction process until no isolated noise pixels remain; the final label matrix is the refined forest semantic segmentation result matrix. Through the accurate correction and redistribution of isolated noise pixels, the interference of noise on the segmentation results is effectively eliminated, the spatial consistency and category integrity of the semantic segmentation result matrix are improved, and small-scale forest information is not lost, providing a high-quality segmentation data foundation for subsequent change detection.
[0047] In this embodiment of the invention, the core distribution areas of three main land features are identified, providing a targeted candidate range for the construction of subsequent benchmark analysis areas. This avoids analytical redundancy caused by indiscriminate area selection and improves the targeting and efficiency of subsequent processing. It ensures the spatial balance and single-category dominance of representative sample areas, enabling the merged benchmark analysis area to possess comprehensive category representativeness. This provides a reliable sample basis for subsequent gridded analysis and parameter calculation, enhancing the universality of the analysis results. A systematic spatial division of the benchmark analysis area is achieved through regular grids, making category label statistics more organized. Pixel category labels and frequencies within grid units are extracted, providing quantitative data support for subsequent category purity calculations. The dominant category of each grid unit is determined and category purity is quantified, clearly reflecting the concentration of category distribution within the grid. This provides core quantitative indicators for the calculation of subsequent boundary optimization control parameters, solidifying the rationality of parameter calculations. The purity information of all grid units is integrated to calculate boundary optimization control parameters, comprehensively reflecting the overall uniformity of category distribution within the benchmark area and providing parameter basis that fits the data characteristics for adaptive morphological processing.
[0048] Adaptive matching of structuring element sizes based on control parameters enables morphological smoothing filtering to adapt to the boundary features of different regions, effectively weakening local probability fluctuations in the initial probability map and enhancing its spatial continuity and stability. Pixel labels are determined based on the stable probability distribution after smoothing, improving the reliability and consistency of the initial label matrix and providing high-quality basic label data for subsequent noise detection and correction, reducing the difficulty of subsequent processing. Spatial neighborhood association information of pixels is fully explored, and a judgment benchmark for the rationality of pixel categories is constructed through the mode of neighborhood categories, providing a comprehensive neighborhood reference for identifying isolated noise pixels. A dual judgment condition is used to filter isolated noise pixels, avoiding abnormal pixels inconsistent with the mode of neighborhood categories and excluding non-isolated normal edge pixels, improving the accuracy and targeting of noise detection and reducing misjudgments. Label correction and reassignment are performed on isolated noise pixels, effectively eliminating the interference of isolated noise on the segmentation results, improving the spatial consistency and integrity of the refined semantic segmentation result matrix, and strengthening the data reliability of the segmentation results.
[0049] In a preferred embodiment of the present invention, step 400 above, which involves change detection based on the refined forest semantic segmentation result matrix and automatically extracting forest vegetation change regions to obtain a binary change region mask matrix, includes: Step 401 involves spatially registering the current refined forest semantic segmentation result matrix with the corresponding refined forest semantic segmentation result matrix from historical times to obtain a spatially registered multi-temporal semantic segmentation matrix pair. Specifically, this includes: first, determining the data source information for the current and historical refined forest semantic segmentation result matrices to ensure that the target forest area ranges corresponding to the two types of matrices are completely consistent; then, initiating the spatial registration process, using the historical refined semantic segmentation result matrix as a reference, selecting several geographically significant feature points from the current matrix as registration control points. These feature points can be stable land feature markers within the region, such as road intersections, bridge corners, etc., and must ensure control... Points can be accurately located in the matrices at both time points. By calculating the coordinate deviation of control points in the two matrices, a coordinate transformation model is constructed using a polynomial registration algorithm. The refined forest semantic segmentation result matrix at the current time point is substituted into this model for coordinate correction. After correction, consistency verification is performed on the spatially overlapping areas of the two matrices to ensure that the pixel coordinates corresponding to the same geographical location are completely matched, ultimately obtaining a spatially registered multi-temporal semantic segmentation matrix pair. This spatial registration operation can effectively eliminate spatial misalignment problems caused by sensor position offset, terrain differences, etc. during the acquisition of multi-temporal images, providing a spatial benchmark for subsequent pixel-by-pixel category comparison and avoiding false change markers caused by spatial misalignment from the source.
[0050] Step 402 involves performing a pixel-by-pixel category comparison on the spatially registered multi-temporal semantic segmentation matrix pair. If the category labels at the same pixel position are different between the current time matrix and the historical time matrix, the pixel is marked as a changed pixel to obtain the initial change detection matrix. Specifically, this includes: using the spatially registered multi-temporal semantic segmentation matrix pair as the processing object, firstly, determining the matrix traversal rules, and adopting a row-by-row traversal method from left to right and from top to bottom to sequentially locate the spatial coordinates of each pixel; for each pixel position, simultaneously extracting the category labels corresponding to that position in the current time matrix and the historical time matrix, and directly comparing the two category labels; if the two labels are completely different... If all labels match, the pixel position is determined to be unchanged; if the two labels differ, the pixel is determined to be a changed pixel and assigned a preset change marker value. After traversing and comparing all pixels, a matrix with the same size as the input matrix is constructed. The value of each pixel position in the matrix is determined by the comparison result of the corresponding position, that is, the changed pixel corresponds to the change marker value, and the unchanged pixel corresponds to the no-change marker value. This matrix is the initial change detection matrix. Through comprehensive comparison of each pixel, the pixel positions of all categories that have changed in multi-temporal data can be completely captured, providing comprehensive basic data coverage for subsequent false change removal and real change extraction.
[0051] Step 403: Based on the preset category transfer rules, the initial change detection matrix is filtered to remove pseudo-change pixels, resulting in a filtered change matrix. Specifically, the preset category transfer rules are established through a progressive process of ecological analysis, verification with measured data, and periodic adaptation adjustment. The specific process is as follows: First, the natural evolution patterns of land cover in the forest ecosystem are analyzed. Referring to long-term forest resource survey literature, regional ecological evolution research reports, and vegetation growth cycle data, the evolution logic of different land cover types under natural conditions is determined. The core analysis direction includes the positive succession, negative degradation, and stable characteristics of non-vegetation land cover types. Among them, the positive succession of vegetation land cover types is such as bare land to shrubs and grasses and then to arbor forests, and the negative degradation is such as arbor forests to sparse shrubs and grasses. The natural feasibility basis for land cover conversion is summarized.
[0052] Secondly, based on the established regular monitoring cycle time span, historical forest remote sensing monitoring data, field sample plot survey data, and land use change records within this cycle are collected to construct a land use conversion sample dataset. The sample dataset is then classified and statistically analyzed, and the actual occurrence frequency, conversion scale, and driving factors of different land use conversion combinations within the monitoring cycle are analyzed one by one. Conversion combinations with an occurrence frequency higher than a preset threshold and whose driving factors are natural evolution or reasonable human intervention are selected as preliminary candidate sets of reasonable conversion types. At the same time, conversion combinations with an occurrence frequency of zero or that only occur occasionally in extreme disaster scenarios are marked as candidate sets of unreasonable conversion types.
[0053] Furthermore, targeted verification was conducted for the two types of candidate sets. For the candidate sets of reasonable conversion types, typical forest areas from multiple different climate zones and topographic regions were selected as verification sample areas. The authenticity and universality of the candidate conversion types were confirmed through field verification. For example, the gradual conversion from arbor forests to sparse shrubs and grasses needs to be verified to see if it conforms to the gradual characteristics of vegetation degradation. For the candidate sets of unreasonable conversion types, the focus was on analyzing the basis for their infeasibility. For example, the direct conversion between mature forest land and water bodies is determined to be an unreasonable conversion type because the ecological niche differences between the two are significant and there is no gradual transition process. There are no conditions for natural formation within the regular monitoring period.
[0054] Finally, based on the verification results, the rule boundaries are determined, and the verified reasonable and unreasonable conversion types are systematically sorted out to form a clear category conversion comparison table. The comparison table lists the allowed and prohibited conversion combinations, and supplements the explanatory clauses for special scenarios. That is, when there are disaster records or man-made engineering approval documents, some unreasonable conversion types can be exceptionally judged. The comparison table is solidified into the preset category transfer rules, providing an executable screening basis for the subsequent false change elimination of the initial change detection matrix.
[0055] Step 404 involves performing connected component analysis on the filtered change matrix to identify all spatially adjacent changed pixels forming connected regions, and calculating the pixel area of each connected region. Specifically, this includes: using the filtered change matrix as input, employing a connected component labeling algorithm to perform spatial aggregation analysis on the changed pixels in the matrix; specifically, firstly, locating the first changed pixel in the matrix, and using this pixel as the starting point, traversing its surrounding pixels using an eight-neighbor search method, grouping all adjacent changed pixels into the same connected region, and assigning a unique identifier to this region; then continuing to traverse the unlabeled changed pixels in the matrix, repeating the above neighborhood search and region labeling process until all changed pixels in the matrix are grouped into their corresponding connected regions, ultimately identifying the set of connected regions formed by all spatially adjacent changed pixels; for each connected region in this set, calculating the pixel area of each connected region by counting the number of pixels with the same identifier within the region; through connected component analysis, scattered changed pixels can be integrated into changed regions with spatial extent, and the quantitative representation of pixel area provides a quantitative basis for subsequent noise screening based on area thresholds.
[0056] Step 405: Based on the pixel area of each connected region, a minimum change patch area threshold is set. Connected regions with pixel areas smaller than the minimum change patch area threshold are removed as noise, resulting in a binary matrix representing the initial change region. Specifically, this includes: First, combining the actual ecological characteristics of the target forest area and the monitoring accuracy requirements, a minimum change patch area threshold is set. This threshold is set based on the smallest forest change unit with actual ecological significance, ensuring that change regions with an area greater than or equal to the threshold have ecological monitoring value, while regions smaller than the threshold are mostly noise interference or meaningless minor fluctuations. Then, each connected region... The pixel area is compared with the minimum change patch area threshold. If the pixel area of a connected region is greater than or equal to the threshold, the change label of that region is retained; if the pixel area of a connected region is less than the threshold, the region is determined to be a meaningless noise region, and the labels of all pixels in the region are updated to no change label values. After filtering all connected regions, a binary matrix is obtained that retains only the regions with practical change. This matrix represents the initial change region. Through this filtering operation, minor noise interference can be further eliminated, focusing on the core change regions with ecological significance, thereby improving the relevance and practicality of the change region extraction results.
[0057] Step 406: Perform morphological dilation and morphological erosion operations sequentially on the binary matrix representing the initial change region to obtain a binary matrix after closing operation. Use the binary matrix after closing operation as a binary change region mask matrix. Specifically, this includes: First, perform input data preprocessing and operation benchmark work, taking the binary matrix representing the initial change region as the processing object, determining the matrix labeling rules, that is, changing pixels are labeled as 1 and non-changing pixels are labeled as 0. At the same time, retrieve the remote sensing image spatial resolution parameters from step 101 to provide a basis for subsequent scale correlation.
[0058] Subsequently, the structural element parameters required for morphological operations were determined. The specific calculation process is as follows: First, the connected regions of the initial change region are extracted. The eight-neighbor connectivity analysis method is used to traverse the binary matrix and obtain all independent changed connected regions, recording the number of pixels in each connected region. Second, the average scale of the change region is calculated by multiplying the actual geographic area corresponding to a single pixel by the number of pixels in each connected region to obtain the actual geographic area of each connected region. The arithmetic mean of the actual geographic areas of all connected regions is taken as the average scale of the change region. Third, the size of the structural element is matched. The radius of the circular structural element is set based on the average scale of the change region. When the average scale is between 0 and 100 square meters, the radius is set to 1 pixel; when it is between 100 and 500 square meters, the radius is set to 2 pixels; and when it is above 500 square meters, the radius is set to 3 pixels to ensure size adaptation. Fourth, the circular structural element is generated by traversing the surrounding pixels with the center pixel of the structural element as the origin. Pixels whose distance from the center pixel is less than or equal to the set radius are marked as valid elements, forming a pixel set of the circular structural element.
[0059] The morphological dilation operation is performed based on the defined structuring element. The specific operation process is as follows: a row-by-row traversal method from left to right and from top to bottom is used to cover all pixels of the binary matrix; for each changed pixel marked as 1, the center of the circular structuring element is aligned with the pixel, all valid elements within the structuring element are traversed, and it is determined whether the matrix pixel position corresponding to the valid element is 0; if there is a pixel marked as 0, the mark of the pixel is updated to 1; after the traversal is completed, the dilated binary matrix is obtained. This operation expands the boundary of the changed region and fills the small holes inside.
[0060] Next, a morphological erosion operation is performed on the dilated binary matrix. The specific calculation process is as follows: the dilated matrix is traversed using the same row-by-row traversal rule; for each pixel marked as 1, the center of the circular structuring element is aligned with that pixel, and it is checked whether all matrix pixels corresponding to valid elements within the structuring element are 1; if any pixel corresponding to a valid element is marked as 0, the mark of the current center pixel is updated to 1; if all pixels corresponding to valid elements are 1, the current pixel mark remains unchanged; after traversal, the eroded binary matrix is obtained. This operation shrinks the boundary of the dilated matrix, restores the true contour of the changed area, and smooths irregular protrusions at the edges; the above dilation and erosion operations are performed sequentially to constitute a complete morphological closing operation.
[0061] After completing the closing operation, a boundary integrity check is performed. The specific check process is as follows: extract the edge points of pixels marked as 1 in the processed binary matrix, and the criterion is that there are pixels marked as 0 in the eight neighborhoods of that pixel; traverse all edge points and connect them in a clockwise direction to form a boundary line, and check whether the boundary line is continuous without any breaks; at the same time, count the number of connected regions formed by pixels marked as 1 in the processed matrix, and compare it with the number of connected regions before the closing operation to ensure that there are no newly added isolated connected regions; if there are boundary breaks or newly added isolated regions, readjust the size of the structuring element and repeat the closing operation process until the boundary is continuous and there are no residual holes.
[0062] Finally, the binary matrix processed by the integrity verification closing operation is used as a binary change region mask matrix. This matrix can clearly and accurately delineate the spatial range of the forest vegetation change region. Through the optimization processing of morphological closing operation, the spatial integrity and morphological regularity of the change region are further improved, providing high-quality basic data support for subsequent dynamic analysis of forest resources based on the change region.
[0063] In this embodiment of the invention, spatial alignment of multi-temporal semantic segmentation matrices is achieved to ensure the consistency of data in spatial location at different times, providing a spatial benchmark for subsequent pixel-by-pixel comparison; pixel-by-pixel category comparison is used to lock the pixel locations of category differences, comprehensively capturing potential change information and generating an initial change detection matrix covering all candidate change points, providing complete basic data for subsequent change screening; unreasonable category transformations are filtered based on category transfer rules, effectively eliminating pseudo-change pixels caused by spectral temporal variations, improving the reliability of change detection results, and strengthening the authenticity and effectiveness of change data; scattered change pixels are aggregated into spatial... Continuous connected regions clearly define the spatial extent of the changed regions, while pixel area quantification represents the scale of the changed regions, providing a quantitative basis for subsequent noise screening. Minor noise regions are eliminated based on the minimum change patch area threshold, focusing on change patches with actual ecological significance, reducing the interference of meaningless minor changes on the results, and improving the targeting and practicality of the changed region extraction. Morphological closing operations are used to fill small holes in the changed regions, smoothing the region boundaries, enhancing the spatial integrity and continuity of the changed regions, optimizing the spatial morphology of the binary changed region mask matrix, and providing high-quality changed region data for subsequent change analysis.
[0064] In a preferred embodiment of the present invention, step 500 above automatically generates a dynamic monitoring report of forest resources, including forest type distribution, location of change areas, and trend analysis, based on the binary change area mask matrix and the refined forest semantic segmentation result matrix. Step 501: Traverse and count the refined forest semantic segmentation result matrix by category to obtain the number of pixels for each type of vegetation and land cover; based on the number of pixels for each type of vegetation and land cover and the spatial resolution of the remote sensing image, calculate the actual geographical area of each category; calculate the area ratio of each type based on the actual geographical area; integrate the actual geographical area and the area ratio of each type to obtain a forest type area statistics table, specifically including: First, using the refined forest semantic segmentation result matrix as the core processing object, determine all category labels included in the matrix, such as dominant arbor forests, sparse shrubs and grasses, and non-vegetation land cover, to ensure that the statistical scope covers all land cover types; then, perform a full traversal of the refined forest semantic segmentation result matrix according to the row-by-row traversal rule from left to right and from top to bottom; during the traversal process, for each pixel... The system classifies and counts data by category labels, recording the number of pixels corresponding to each type of vegetation and land cover to form an initial category pixel count table. Based on this, the spatial resolution parameters of the remote sensing image recorded in step 101 are retrieved, and the actual geographic area is converted by combining these parameters with the number of pixels for each category. The specific conversion logic is as follows: the actual geographic area corresponding to a single pixel is multiplied by the number of pixels for each category to obtain the actual geographic area value of each category. Then, based on the actual geographic area of each category, the proportion of each category's area to the total area of all categories is calculated, thus obtaining the area proportion of each type. Finally, the data such as the name, number of pixels, actual geographic area, and area proportion of each category are structured and integrated, and organized into a forest type area statistics table according to a preset table format. This statistics table can clearly present the category composition and distribution scale of forest resources in the target area.
[0065] Step 502: Extract all pixels marked as changing states from the binary change region mask matrix and obtain a set of geographic coordinates; calculate the minimum bounding rectangle spatial range of the change region based on the set of geographic coordinates; perform boundary vectorization and polygon generation based on the minimum bounding rectangle spatial range and the set of pixel geographic coordinates to obtain a vector boundary file of the change region. Specifically, this includes: First, using the binary change region mask matrix as the processing object, traversing all pixels in the matrix, filtering out pixels marked as changing states, extracting and summarizing the geographic coordinates corresponding to these changing pixels to form a set of changing pixel geographic coordinates; it should be noted that the geographic coordinates here are based on the coordinate system after geographic correction in step 104 to ensure the accuracy and uniqueness of the coordinate information.
[0066] Subsequently, based on this set of geographic coordinates, a spatial range fitting algorithm is used to calculate the minimum bounding rectangle spatial range of the changed area. Specifically, the calculation process involves traversing the geographic coordinates of all changed pixels, extracting the maximum and minimum values of the horizontal and vertical coordinates, using the minimum horizontal and vertical coordinates as the coordinates of the top-left vertex, and the maximum horizontal and vertical coordinates as the coordinates of the bottom-right vertex, thus constructing the minimum bounding rectangle. This minimum bounding rectangle can quickly pinpoint the core distribution location of the changed area, providing a range reference for subsequent boundary refinement. Based on this, combining the minimum bounding rectangle spatial range and the complete set of pixel geographic coordinates, edge pixel extraction is first performed. Specifically, this involves traversing all changed pixels within the minimum bounding rectangle range, determining whether there are any non-changed pixels within the eight neighboring regions of each changed pixel. If so, the changed pixel is identified as an edge pixel, and the results are summarized. The geographic coordinates of edge pixels form an edge point coordinate set. Then, a polygon vertex geometric sort is performed. The specific calculation process is as follows: First, a sorting reference is determined by taking the center coordinates of the smallest bounding rectangle as the sorting origin. This center coordinate is calculated by taking the average of the x-coordinates of the top-left and bottom-right vertices of the smallest bounding rectangle as the center x-coordinate, and the average of their y-coordinates as the center y-coordinate. Next, each pixel in the edge point coordinate set is traversed, and the angle between the line connecting that point to the sorting origin and the positive direction of the horizontal coordinate axis is calculated. During the calculation, the positive direction of the horizontal coordinate axis is used as the reference, and the angle is measured clockwise or counterclockwise. The angle value is then associated with and stored with the corresponding pixel coordinates. Finally, the edge pixel coordinates are sorted in ascending order of angle value to form an ordered edge point sequence. This sorting ensures that the edge points are arranged sequentially in a clockwise or counterclockwise direction, avoiding boundary line intersections or closure anomalies.
[0067] Boundary vectorization is performed based on the sorted ordered edge point sequence. Specifically, adjacent pixels in the ordered edge point sequence are connected sequentially to form continuous boundary lines. The boundary lines are then smoothed to eliminate jagged irregularities at the pixel level. Finally, a closed polygon is generated based on the smoothed boundary lines. Specifically, the first and last pixels of the ordered edge point sequence are connected to form a complete closed polygon outline. This polygon and its corresponding geographic coordinate information are stored in a standard vector file format to obtain a vector boundary file of the changed area. This file can be directly adapted for loading and analysis by mainstream geographic information system software.
[0068] Step 503: Based on the data in the forest type area statistics table, compare the area of each category at the current time with the corresponding category area at historical times, calculate the net change and rate of change of each category area, and obtain the forest type area change trend table. Specifically, this includes: First, retrieving the forest type area statistics table at the current time, and simultaneously retrieving the corresponding forest type area statistics table at historical times; ensuring that the category classification standards and statistical scope of the two statistics tables are completely consistent to ensure the effectiveness of the data comparison; then, by category, comparing the actual geographical area of each category at the current time and historical times, and calculating the net area of each category. The change is the difference between the current area and the area at a historical time. Simultaneously, the rate of change for each category is calculated, obtained by comparing the net change to the area at a historical time, thus quantifying the magnitude of change in each category's area. After calculating the net change and rate of change for all categories, the data, including category name, current area, historical area, net change, and rate of change, are structured and integrated, organized according to time series logic into a forest type area change trend table. This trend table visually presents the area evolution of different forest types and land cover categories within the monitoring period, providing quantitative data support for trend analysis.
[0069] Step 504: Integrate the forest type area statistics table, change area vector boundary file, and forest type area change trend table, and add time and geographical location information to automatically generate a dynamic monitoring report of forest resources. Specifically, this includes: First, performing data consistency verification on the forest type area statistics table generated in Step 501, the change area vector boundary file generated in Step 502, and the forest type area change trend table generated in Step 503; ensuring that the target areas and time ranges corresponding to the three types of data are completely matched to avoid data misalignment leading to distorted report information; then supplementing key basic information, including the monitoring time range, i.e., the specific time period between the current moment and historical moments; and the geographical location information of the target forest area, i.e., the area name, administrative division code, latitude and longitude range, etc.; these information... Information can be retrieved and integrated from the original data records in step 101. Based on this, the above data is structured and integrated according to the preset report framework. The report framework includes core modules such as regional overview, current status of forest type distribution, spatial distribution of changed areas, and trend analysis. Among them, the regional overview module presents basic time and geographical location information, the current status of forest type distribution module embeds a statistical table of forest type area, the spatial distribution of changed areas module is associated with the vector boundary file of the changed areas and includes spatial location descriptions, and the trend analysis module summarizes the patterns based on the trend table of forest type area changes. Finally, through the report generation program, the integrated content is output in a standardized document format, automatically generating a dynamic monitoring report of forest resources, realizing the systematic presentation and efficient application of monitoring data.
[0070] In this embodiment of the invention, pixel-level data is transformed into actual geographic-scale data. The actual geographic area of each category is obtained through precise counting and area conversion, and the distribution scale of each category is quantified by combining area proportions. The integrated forest type area statistics table clearly presents the category composition and spatial distribution quantitative characteristics of forest resources, providing systematic basic quantitative data for subsequent monitoring and analysis. The geographic coordinates of changed pixels are extracted to determine the spatial location of the changed area. The core range is defined by the minimum bounding rectangle, and a vector boundary file is generated by boundary vectorization, realizing the transformation of the changed area from pixel-level representation to vector space. The vector file facilitates subsequent spatial querying and map visualization, improving... The system enhances the readability and ease of application of spatial information on changing areas; it quantifies the net change and rate of change of area for each category by comparing current and historical area data; the generated forest type area change trend table clearly presents the evolutionary patterns of different types of forest resources, providing quantitative basis for trend analysis and strengthening the control over the dynamic evolution of forest resources; it integrates various statistical and spatial data, supplementing key temporal and geographical location information; it achieves structured sorting and standardized presentation of monitoring data, making the generated dynamic monitoring report of forest resources comprehensive, logically clear, and improving the systematicness and interpretability of monitoring results, providing complete results support for forest resource management decisions.
[0071] like Figure 2 As shown, embodiments of the present invention also provide a deep learning-based semantic segmentation processing system for forest remote sensing images, comprising: The data preprocessing module is used to acquire the original remote sensing image of the target forest area and perform data preprocessing on the original remote sensing image to obtain a standardized image tensor. The model segmentation module is used to input the standardized image tensor into a pre-trained multi-scale feature fusion semantic segmentation model to perform pixel-level classification and generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; The optimization module is used to select representative regions to construct the baseline analysis region based on the spatial and category distribution of the initial semantic segmentation probability map, and obtain boundary optimization control parameters through gridding and consistency analysis. Adaptive morphological smoothing is performed on the initial semantic segmentation probability map according to the boundary optimization control parameters, and the maximum probability category is determined to obtain the preliminary label matrix. Noise detection and pixel reassignment based on neighborhood consistency are performed on the preliminary label matrix to obtain the refined forest semantic segmentation result matrix. The detection module is used to perform change detection based on the refined forest semantic segmentation result matrix, automatically extract forest vegetation change areas, and obtain a binary change area mask matrix. The report generation module is used to automatically generate a dynamic monitoring report of forest resources, which includes forest type distribution, location of change areas, and trend analysis, based on the binary change area mask matrix and the refined forest semantic segmentation result matrix.
[0072] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0073] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0074] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A semantic segmentation method for forest remote sensing images based on deep learning, characterized in that, The method includes: Step 100: Obtain the original remote sensing image of the target forest area and perform data preprocessing on the original remote sensing image to obtain a standardized image tensor; Step 200: Input the standardized image tensor into the pre-trained multi-scale feature fusion semantic segmentation model to perform pixel-level classification and generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; Step 300: Based on the spatial and category distribution of the initial semantic segmentation probability map, a representative region is selected to construct the benchmark analysis region, and boundary optimization control parameters are obtained through gridding and consistency analysis; adaptive morphological smoothing is performed on the initial semantic segmentation probability map according to the boundary optimization control parameters, and the maximum probability category is determined to obtain the preliminary label matrix; noise detection and pixel reassignment based on neighborhood consistency are performed on the preliminary label matrix to obtain the refined forest semantic segmentation result matrix; Step 400: Based on the refined forest semantic segmentation result matrix, change detection is performed to automatically extract forest vegetation change areas to obtain a binary change area mask matrix. Step 500: Based on the binary change region mask matrix and the refined forest semantic segmentation result matrix, automatically generate a dynamic monitoring report of forest resources that includes forest type distribution, change region location and change trend analysis.
2. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 1, characterized in that, Step 100 includes: Acquire raw remote sensing images of the target forest area; Geometric correction is performed on the original remote sensing image to eliminate geometric distortions caused by sensor attitude, terrain undulation and Earth curvature, resulting in an orthorectified image with accurate geographic coordinates. Radiometric calibration and atmospheric correction are performed on the orthorectified image to convert the original digital quantization values of the image into the physical quantity of surface reflectance, thereby obtaining a reflectance image with accurate radiometric physical meaning; The reflectance image is resized and channel-normalized to convert it into a multi-channel image tensor with a fixed spatial dimension and a standardized numerical range, which is then used as a standardized image tensor.
3. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 2, characterized in that, Step 200 includes: The encoder of the multi-scale feature fusion semantic segmentation model processes the standardized image tensor to obtain a set of multi-level feature maps containing different levels of abstraction and spatial resolution. The deepest feature map with the highest semantic level is extracted from the multi-level feature map, and the deepest feature map with the highest semantic level is input into the multi-scale feature fusion structure. The multi-scale feature fusion structure aggregates contextual information under different receptive fields by performing multi-rate dilated convolution and global pooling operations in parallel to obtain a feature map that fuses multi-scale global semantic information. The feature maps of other layers besides the deep feature maps are extracted from the multi-layer feature maps and input into the feature amplification extraction structure. The feature amplification extraction structure performs upsampling and convolution operations on the feature maps input from each layer to improve their spatial resolution and enhance detail information, thereby obtaining enhanced feature maps that are adapted to the spatial resolution of each stage of the decoder.
4. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 3, characterized in that, Step 200 further includes: The decoder of the multi-scale feature fusion semantic segmentation model receives the feature map fused with multi-scale global semantic information as initial input; it performs an upsampling operation on the initial input feature map to double the spatial resolution of the feature map, thus obtaining the current upsampled feature map. The current upsampled feature map and the enhanced feature map are concatenated along the channel dimension to obtain the concatenated fused feature map; The spliced fused feature map is transformed and integrated by a convolutional component to obtain the output feature map that is passed to the next decoding stage. The decoder repeatedly performs the upsampling, concatenation, and convolution operations until the spatial resolution of the feature map is restored to be consistent with the input image, and finally a high-resolution feature map is obtained. Based on the high-resolution feature map, after convolution and normalized exponential function processing, the probability distribution of each pixel belonging to each vegetation and land cover category is obtained, which serves as the initial semantic segmentation probability map.
5. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 4, characterized in that, Step 300 includes: Based on the distribution characteristics of the three main land cover categories—dominant arbor forests, sparse shrub and grass vegetation, and non-vegetation land cover—in the initial semantic segmentation probability map, the core areas where each category is concentrated are identified in space as candidate areas. From the candidate regions, three regions with balanced spatial locations and each dominated by a single major land cover category were selected as representative sample areas. A spatial union operation was performed on the three representative sample areas, and the merged continuous geographical area was used as the baseline analysis area. The baseline analysis region is spatially divided using a fixed-size regular grid to obtain a set of grid cells. For each grid cell in the set of grid cells, the category label selected by the maximum probability in the initial semantic segmentation probability map for all pixels inside it is extracted, and the frequency of occurrence of each label is counted. The category with the highest frequency of occurrence within the grid cell is selected as the primary category. The ratio of the pixel frequency of the primary category to the total number of pixels within the grid cell is calculated, and the ratio is used as the category purity value of the grid cell. Calculate the average and standard deviation of the purity values for all grid cell categories, and use the ratio of the average to the standard deviation as the boundary optimization control parameter.
6. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 5, characterized in that, Step 300 further includes: Based on the numerical value of the boundary optimization control parameters, the size of the structuring element used for morphological opening and closing operations is determined; based on the structuring element of the specified size, an adaptive morphological smoothing filter is applied to the initial semantic segmentation probability map to obtain a smoothed probability map. For the smoothed probability map, the category with the highest predicted probability at each pixel location is taken as the label of that pixel to obtain a preliminary label matrix; For each pixel in the preliminary label matrix, obtain the category label of the pixels in the eight neighborhoods; based on the category labels of the pixels in the eight neighborhoods, calculate the category with the highest frequency and use it as the mode of the neighborhood categories of that pixel; Determine whether the category label of the current pixel is consistent with the mode of the neighboring categories, and count the number of pixels in its eight neighborhoods that have the same category label as the current pixel; if the category label of the current pixel is inconsistent with the mode of the neighboring categories, and the number of pixels of the same category is less than a preset isolation threshold, then the current pixel is determined to be an isolated noise pixel. The class labels of all pixels identified as isolated noise are corrected to the mode of the class labels of the pixels in their eight neighborhoods. After pixel redistribution, a refined forest semantic segmentation result matrix is obtained.
7. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 6, characterized in that, Step 400 includes: Spatial registration is performed between the refined forest semantic segmentation result matrix at the current moment and the refined forest semantic segmentation result matrix at the corresponding historical moment to obtain a spatially registered multi-temporal semantic segmentation matrix pair. After spatial registration, the multi-temporal semantic segmentation matrix pairs are compared pixel by pixel. If the class labels of the current time matrix and the historical time matrix are different at the same pixel position, the pixel is marked as a changed pixel to obtain the initial change detection matrix. Based on the preset category transfer rules, the initial change detection matrix is filtered to remove pseudo-change pixels, resulting in a filtered change matrix. Connectivity analysis is performed on the filtered change matrix to identify all spatially adjacent changed pixels forming connected regions, and the pixel area of each connected region is calculated. Based on the cell area of each connected region, a minimum change patch area threshold is set, and connected regions with cell areas smaller than the minimum change patch area threshold are removed as noise to obtain a binary matrix representing the initial change region. The binary matrix representing the initial change region is subjected to morphological dilation and morphological erosion operations in sequence to obtain a binary matrix after closing operation. The binary matrix after closing operation is used as the binary change region mask matrix.
8. The deep learning-based semantic segmentation method for forest remote sensing images according to claim 7, characterized in that, Step 500 includes: The refined forest semantic segmentation result matrix is traversed and counted by category to obtain the number of pixels for each type of vegetation and land cover; based on the number of pixels for each type of vegetation and land cover and the spatial resolution of the remote sensing image, the actual geographic area of each category is calculated; the area ratio of each type is calculated based on the actual geographic area; the actual geographic area and the area ratio of each type are integrated to obtain a forest type area statistics table. Extract all pixels marked as changing states from the binary change region mask matrix and obtain a set of geographic coordinates; calculate the minimum bounding rectangle spatial range of the change region based on the set of geographic coordinates; perform boundary vectorization and polygon generation based on the minimum bounding rectangle spatial range and the set of pixel geographic coordinates to obtain the vector boundary file of the change region; Based on the data in the forest type area statistics table, the area of each category at the current time is compared with the corresponding category area at the historical time, and the net change and change rate of each category area are calculated to obtain the forest type area change trend table. By integrating the aforementioned forest type area statistics table, change area vector boundary file, and forest type area change trend table, and adding time and geographical location information, a dynamic monitoring report of forest resources is automatically generated.
9. A deep learning-based semantic segmentation processing system for forest remote sensing images, the system implementing the method as described in any one of claims 1 to 8, characterized in that, include: The data preprocessing module is used to acquire the original remote sensing image of the target forest area and perform data preprocessing on the original remote sensing image to obtain a standardized image tensor. The model segmentation module is used to input the standardized image tensor into a pre-trained multi-scale feature fusion semantic segmentation model to perform pixel-level classification and generate an initial semantic segmentation probability map; the multi-scale feature fusion semantic segmentation model is built based on an improved encoding and decoding structure; The optimization module is used to select representative regions to construct the baseline analysis region based on the spatial and category distribution of the initial semantic segmentation probability map, and obtain the boundary optimization control parameters through gridding and consistency analysis; based on the boundary optimization control parameters, adaptive morphological smoothing is performed on the initial semantic segmentation probability map, and the maximum probability category is determined to obtain the preliminary label matrix. The initial label matrix is subjected to noise detection and pixel reassignment based on neighborhood consistency to obtain a refined forest semantic segmentation result matrix; The detection module is used to perform change detection based on the refined forest semantic segmentation result matrix, automatically extract forest vegetation change areas, and obtain a binary change area mask matrix. The report generation module is used to automatically generate a dynamic monitoring report of forest resources, which includes forest type distribution, location of change areas, and trend analysis, based on the binary change area mask matrix and the refined forest semantic segmentation result matrix.
10. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 8.