A forest canopy density estimation method based on a lightweight gradient shape perception network
By using a lightweight gradient morphology perception network, the problems of canopy boundary adhesion and texture confusion in forest canopy closure estimation are solved, achieving efficient forest canopy closure estimation on low-computational-resource devices and improving segmentation accuracy and computational efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for estimating forest canopy density suffer from problems such as canopy boundary adhesion, texture confusion, and large number of model parameters, making them difficult to deploy on computing-limited devices.
A lightweight gradient morphology-aware network is used, including the MobileNetV3-Large network, the Semantic Guided Channel Compression and Focusing Module (SCCF), the Gradient Guided Morphological Canopy Attention Module (G-MTCAM), and the Upsampling Reconstruction Module, which is trained in conjunction with a boundary-enhanced composite loss function.
It achieves precise cutting of tree canopy boundaries with low computational cost, suppresses background noise, and improves segmentation accuracy and computational efficiency, making it suitable for consumer drones and portable devices.
Smart Images

Figure CN121545087B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of forestry remote sensing monitoring and image processing technology, specifically a method for estimating forest canopy closure based on a lightweight gradient morphology perception network. Background Technology
[0002] Current methods for obtaining forest canopy closure mainly include: visual measurement of sample plots, hemispherical photography, ground-based projection measurement, and remote sensing inversion methods (based on traditional threshold / index or deep learning-based segmentation). In terms of deep learning, U-Net and its variants are commonly used for land cover / canopy segmentation; some studies employ lightweight backbones or introduce attention mechanisms to improve edge performance.
[0003] 1. Canopy boundary adhesion and edge blurring: In forest environments, tree canopies are dense, and due to the influence of light angle and shadow, there is often severe shading and adhesion between canopies. Existing convolutional networks (such as the standard U-Net) tend to learn smooth low-frequency features, making it difficult to accurately cut the boundaries of adjacent canopies, resulting in biased canopy closure estimation.
[0004] 2. Texture obfuscation and background noise: Forest backgrounds are complex (including gaps in the forest and bare ground), and the textures of different tree species vary greatly. The simple skip connections of traditional decoders can directly introduce shallow background noise into deeper layers, leading to holes or misclassifications in the segmentation results.
[0005] 3. Large number of model parameters, making it difficult to deploy on edge devices: Standard U-Net and its variants typically have a huge number of parameters and high computational complexity (high GFLOPs), making them difficult to deploy on drones or portable forestry survey equipment with limited computing power.
[0006] To address the aforementioned issues, this invention proposes a forest canopy closure estimation method based on a lightweight gradient morphology perception network. Summary of the Invention
[0007] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0008] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:
[0009] A method for estimating forest canopy closure based on a lightweight gradient morphology-aware network includes the following steps:
[0010] Step 1: Obtain the forest canopy remote sensing image dataset, including forest orthophotos and their corresponding fine-grained pixel-level labeled masks;
[0011] Step 2: Construct a canopy segmentation model based on a lightweight gradient morphology-aware network, including: a lightweight feature encoding module, a semantically guided channel compression and focusing module, a gradient-guided morphological canopy attention module, and an upsampling reconstruction module;
[0012] Step 2.1: Construct a lightweight encoder: The MobileNetV3-Large network is used as the backbone to extract multi-scale features. This module contains depthwise separable convolutional layers and inverted residual structures, which downsample the input image step by step and output multi-level feature maps for subsequent skip connections.
[0013] Step 2.2: Construct the decoder and embed the SCCF module. The decoder uses progressive upsampling. In the feature fusion stage of each decoding layer, the SCCF module is embedded. The SCCF module receives two inputs: skip-connected features from the encoder. and features from the previous decoder after upsampling ;
[0014] Step 2.3: Construct the embedding and upsampling reconstruction of the G-MTCAM module. After the dynamic compression and purification of features are completed by the SCCF module and the decoder features are reconstructed, the resulting feature map is input to the gradient-guided morphological canopy attention module. This module is embedded in each decoder level. The features processed by G-MTCAM finally enter the upsampling reconstruction module and are mapped to the final binary segmentation mask.
[0015] Step 3: Train using the boundary-enhanced composite loss function;
[0016] Step 4: Use the trained model to perform inference and forest canopy closure estimation.
[0017] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, step 1 specifically includes: Step 1.1: Data acquisition and preprocessing: A drone equipped with a high-resolution RGB camera is used to acquire aerial photographs of the forest area, the acquired aerial photographs are processed using the structure-of-motion-recovery-motion algorithm to generate high-resolution orthophotos of the study area, and GSD is recorded.
[0018] On-site measurement and data verification: When processing fisheye photographs using professional image analysis software, the calculated field of view is limited to the zenith angle. central circular area Within this region, the image is binarized and classified, and the near-zenith canopy occlusion rate is calculated according to the following formula. :
[0019] ;
[0020] In the formula, This represents the number of foreground pixels of vegetation within the field of view. The total number of pixels within the field of view is calculated as follows: The coordinates of the shooting points will be recorded using high-precision GPS as a verification reference value on the ground to achieve spatial matching, and the data will be cross-compared with the historical survey data of the forestry department.
[0021] Step 1.2: Sample Construction and Labeling;
[0022] Step 1.3: Dataset Partitioning and Augmentation: Perform data augmentation on the basic sample set to expand it and simulate imaging conditions under varying environments. The expanded dataset is then divided into training, validation, and test sets in a 7:2:1 ratio. During network training, the input images are normalized, mapping pixel values to... Intervals and convert them to tensor form ,in For batch size, For the number of channels, Defines the image's height and width.
[0023] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, the specific method of step 2.2 is as follows: Step 2.2.1: Feature concatenation and semantic weight generation:
[0024] First, a feature physical concatenation operation is performed to connect the input skip connection features. Upsampled features in the current decoding stage Stacking is performed along the channel dimension to construct a joint feature map containing rich multi-scale information. ,in For batch size, and These are the spatial dimensions of the feature map. The module calculates the total number of channels after concatenation. Performing a global average pooling operation compresses the two-dimensional spatial information of each channel into a one-dimensional scalar with a global receptive field, thereby obtaining the channel statistical vectors. and The specific calculation is based on the formula. Proceed, in the formula Representative feature source identifier, Indicates the first The sample at the th Channels, coordinates Pixel response value at that location, This is the global energy mean of that channel; subsequently, the extracted statistical vector... and The data is concatenated, and the result is input into a fusion multilayer perceptron consisting of two convolutional layers for feature fusion transformation to generate a global semantic weight vector that adaptively reflects the importance of each channel. The mathematical expression of this process is: , In the formula This represents a vector concatenation operation. and The first floor and the second floor are respectively. The weight matrix of convolution, The ReLU activation function is used to introduce nonlinear features. The Sigmoid activation function is used to normalize the output weight mapping to... The interval, and finally, the generated weight vector. Original fusion features Perform a channel-by-channel weighted operation based on an incentive mechanism, i.e., calculate... ,in This represents channel-wise multiplication under a broadcast mechanism, thus outputting weighted features after semantic relabeling. ;
[0025] Step 2.2.2: Instance-level dynamic compression and pruning:
[0026] (1) Evaluation of the overall complexity of the sample:
[0027] The system performs joint modeling from two dimensions: spatial texture variation and channel information richness. For the first dimension, texture complexity is calculated based on the input features. The spatial variance is calculated to characterize the richness of the texture for each sample. Its texture complexity Defined as the mean of the variances of all channels:
[0028] ;
[0029] in, Indicates the total number of channels. and These are the height and width of the feature map, respectively; Indicates sample In the Each channel, spatial coordinates Pixel value at; This represents the spatial pixel mean of the sample within the corresponding channel. The larger the value, the more complex the image spatial structure. For the second dimension, information entropy is calculated. First, a softmax operation is performed on the feature channel dimension to map the feature values to a probability distribution. Then, the entropy of this distribution is calculated:
[0030] ;
[0031] The larger the value, the richer the semantic information contained in the feature, requiring more channels to be retained for parsing. and Normalization is performed within the current batch, and a weighted sum is calculated to obtain the overall complexity score for that sample. ;
[0032] (2) Dynamic calculation of adaptive compression ratio:
[0033] Based on the overall score The system dynamically determines the compression ratio for each sample, and its core logic lies in: for the score For simpler samples, apply a higher compression ratio; for scores For more complex samples, retain more channels and achieve dynamic compression ratio. The calculation formula is as follows:
[0034] ;
[0035] in, This indicates a normalization operation, ensuring The preset scaling factor hyperparameter is used; at this point, the simpler the sample ( Compression ratio Towards the maximum value ;
[0036] (3) Physical pruning and structural reconstruction:
[0037] Based on the calculated compression ratio, determine the final number of effective channels that each sample needs to retain. :
[0038] ;
[0039] in, To prevent feature collapse due to excessive compression, a minimum channel number threshold is set. The CFR unit performs the following physical operations:
[0040] Physical slice:
[0041] Based on weighted features Calculate the importance score for each channel. ,in according to Descending order selection Channels are sliced to obtain compressed features. At the same time, the system simultaneously extracts information related to this... The BatchNormalization parameters corresponding to each channel are sliced and adapted to suppress the activation of non-critical channels without changing the input dimension of subsequent layers, reducing redundant feature interference, and bringing potential caching and bandwidth benefits under some hardware / inference frameworks.
[0042] Sparse Fill and Dimension Restoration:
[0043] Construct a dimension as The all-zero initialization tensor will have the calculated effective features The tensor is filled with its original index position, and the final output is the cleaned features. Preserving the original tensor shape Without changing the condition, non-zero activation values are only present at key channel locations.
[0044] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, in step 2.3, at each level of the decoder, the purification features output in step 2.2.2 are... Features are obtained after feature reconstruction by the decoder. The data is then input into the G-MTCAM module. Steps 2.3.1 and 2.3.2 are repeated at each decoder level to progressively enhance the canopy boundary gradient during the upsampling reconstruction process and suppress background texture noise.
[0045] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, the specific steps of step 2.3 are as follows:
[0046] Step 2.3.1: Gradient-induced central difference convolution:
[0047] First, morphological flow feature extraction is performed, using preset standards. convolution kernel For input features Perform convolution operations to aggregate spatial context information within the local pixel neighborhood and generate a basic feature map containing the basic topological structure. Its calculation formula satisfies Secondly, extract the central basis features, and based on the idea of "weight sharing and compression", combine the above... Convolutional kernels perform summation and aggregation across spatial dimensions, yielding equivalent results. convolution kernel And use this kernel to extract local central intensity features. The formula is expressed as This feature map reflects the low-frequency background components after removing spatial texture fluctuations. Finally, a gradient-weighted fusion operation is performed to explicitly model the rate of intensity change between pixels, i.e., the high-frequency texture gradient, by calculating the difference between the base features and the central basal features. This gradient term is then passed through hyperparameters. After adjustment, the features are superimposed back onto the basic features, thus outputting a hybrid feature that integrates semantic structure and sharpened edges. Its closed-loop formula is ;
[0048] Step 2.3.2: Variance-based statistical attention:
[0049] After enhancing the edge information of the features through gradient induction, a variance-based statistical attention mechanism is introduced. This mechanism first processes the mixed features output from the previous steps. Statistical feature extraction is performed, and the spatial standard deviation vector that reflects the pixel dispersion and texture richness within the feature map is calculated. Its calculation is based on the formula Proceed, in the formula This represents the pixel mean of the corresponding channel. This is the normalization factor for the unbiased estimate; the larger the standard deviation, the richer the texture detail information contained in the channel. Secondly, [the following text appears to be incomplete and requires further context: "will be a normalization factor for the unbiased estimate; the larger the standard deviation, the richer the texture detail information contained in the channel; secondly, will be a normalization factor for the unbiased estimate."] The input is fed into a multilayer perceptron for nonlinear mapping, and a sigmoid activation function is used to generate values ranging from... The gating weight vector between Next, the generated weights are used For mixed features A broadcast-based, channel-wise multiplication weighting method is performed to enhance the expressive power of key texture channels and suppress noisy channels. Finally, a residual learning architecture is used to generate the final output features. Specifically through the formula To achieve, in the formula This is used to perform channel fusion and linear projection on the weighted high-frequency features, so that they are consistent with the original input features. The dimensions are aligned and then added together.
[0050] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, the specific process of step 3 is as follows:
[0051] Employing a boundary-enhanced composite loss function Calculate the error between the predicted tree canopy probability map and the true label mask:
[0052] ;
[0053] ;
[0054] in, The binary cross-entropy loss is expressed by the following formula:
[0055] ;
[0056] In the formula, Total number of pixels For pixels The true label, To predict probabilities;
[0057] The loss from dice rolls is expressed by the following formula:
[0058] ;
[0059] In the formula, To prevent smoothing factors with a denominator of zero;
[0060] The marginal gradient distribution loss is expressed by the following formula:
[0061] ;
[0062] In the formula, Indicates along and Gradient extraction operation in the direction, This indicates a normalization operation.
[0063] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, the Adam optimizer is used to train the network during training. The forest canopy segmentation network model employs five evaluation metrics: parameter count, number of floating-point operations, intersection-over-union ratio (IoU), pixel accuracy, and F1 score. Parameters are used to measure computational cost, FLOPs are used to measure the model's computational complexity and inference load, and IoU, Acc, and F1 score are used to quantify segmentation accuracy. The parameters in the model are iteratively optimized using a backpropagation algorithm until the model converges or training reaches the required number of iterations. During the validation process, a validation set is used to validate the model, comparing the model's prediction results with the known outputs of the validation dataset to evaluate the model's performance.
[0064] As a preferred embodiment of the forest canopy closure estimation method based on a lightweight gradient morphology perception network described in this invention, the specific process of step 4 is as follows:
[0065] Read the test set divided in step 1.3 and input it into the trained canopy segmentation network model to obtain the final canopy segmentation probability map. After thresholding and binarization, obtain the canopy mask and count the number of foreground pixels on the mask. Total number of pixels Calculate the vertical canopy cover :
[0066] ;
[0067] If you need to calculate the physical projected area Using the GSD recorded in step 1.1, the pixel count is converted into physical area:
[0068] .
[0069] Compared with the prior art, the beneficial effects of the present invention are:
[0070] 1. Extremely high computational efficiency and lightweight advantages: This invention uses MobileNetV3-Large as the backbone and combines it with the channel compression mechanism of the SCCF module to keep the computational load at an extremely low level (only about 6.71 GFLOPs) and the number of parameters at only 5.98M. Compared with large-scale networks such as DeepLabV3+, the computational cost is reduced by nearly 7 times, enabling the algorithm to run efficiently on consumer-grade drones or portable devices, meeting the needs of rapid forestry surveys.
[0071] 2. Effectively solves the problem of canopy boundary adhesion: The proposed G-MTCAM module introduces explicit gradient constraints using central difference convolution (CDC). This enables the model to accurately capture subtle gradient changes between canopies when dealing with dense forest stands, effectively cutting through adhered canopy boundaries and significantly improving the geometric accuracy of segmentation.
[0072] 3. Strong anti-interference ability and high accuracy: The proposed SCCF module effectively filters out redundant information such as forest background and non-canopy shadows through semantically guided dynamic pruning, solving the texture confusion problem. Experiments show that this method outperforms existing mainstream models such as SegFormer and U-Net in IoU (88.59%), Acc (88.62%), and F1 score (93.77%), and the correlation coefficient (R2) between the canopy closure estimation results and the measured data is above 0.90, demonstrating extremely high practical value. Attached Figure Description
[0073] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0074] Figure 1 This is a flowchart of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0075] Figure 2 This is an image data augmentation diagram of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0076] Figure 3 This is a diagram showing the overall structure of the SCCF module in the forest canopy closure estimation method based on a lightweight gradient morphology perception network of the present invention.
[0077] Figure 4 This is a structural diagram of the SWG submodule of the forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0078] Figure 5 This is a structural diagram of the CFR submodule of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0079] Figure 6 This is a diagram showing the overall structure of the G-MTCAM module of the forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0080] Figure 7 This is a structural diagram of the GI-CDC submodule of the forest canopy closure estimation method based on a lightweight gradient morphology perception network of the present invention.
[0081] Figure 8 This is a structural diagram of the V-SE submodule of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0082] Figure 9 The experimental curves of IoU and F1 score for the forest canopy closure estimation method based on a lightweight gradient morphology perception network of the present invention are shown.
[0083] Figure 10 This is a comparison of segmentation results for a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0084] Figure 11 This is a bar chart showing comparative experiments of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0085] Figure 12 This is an ablation experiment bar chart of the forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention.
[0086] Figure 13 This is a regression analysis diagram of the measured canopy closure and the model-estimated canopy closure of a forest canopy closure estimation method based on a lightweight gradient morphology perception network according to the present invention. Detailed Implementation
[0087] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0088] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.
[0089] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0090] This invention is applicable to scenarios such as forest resource surveys, assessment of suitable environments for understory economic crops, and ecological environment monitoring. It achieves accurate extraction of canopy areas and enhancement of canopy margin details with low computational load, and outputs canopy closure results that are highly consistent with measured data, thereby improving the efficiency of forest structure parameter acquisition and spatial continuity.
[0091] Example
[0092] A method for estimating forest canopy closure based on a lightweight gradient morphology-aware network includes the following steps (e.g.) Figure 1 (as shown)
[0093] Step 1: Obtain a forest canopy remote sensing image dataset, which includes forest orthophotos and their corresponding fine-grained pixel-level labeled masks; the specific process is as follows:
[0094] Step 1.1: Data Acquisition and Preprocessing: A consumer-grade drone (DJIMini4Pro in this example) equipped with a high-resolution RGB camera was used to acquire aerial photographs of the forest area. The flight altitude was set to approximately 50m above the ground to ensure that the ground sampling distance (GSD) was sufficient to resolve the details of the tree canopy texture. The acquisition time was preferably during a period of stable lighting (around 10:00 AM) to reduce interference from strong shadows and highlights. The flight path overlap rate was set to ≥80%. The lateral overlap rate is set to ≥70%. The camera is positioned vertically downwards. The acquired aerial photographs are processed using the Structure for Motion Restoration (SfM) algorithm to generate a high-resolution orthophoto (DOM) of the study area, and the ground truth depth (GSD) (m / pixel) is recorded for subsequent conversion of pixel area to physical area.
[0095] Field Measurement and Data Validation: Field measurements were conducted using hemispherical photography. At the center of each plot and representative locations, canopy images were captured vertically upwards from a height of 1.5m above the ground using a digital camera equipped with a fisheye lens. Given that traditional hemispherical photography yields canopy closure information containing significant branch shading information from oblique perspectives, while UAV orthophotos reflect pure canopy coverage, this embodiment employs a field-of-view constraint strategy for index alignment to eliminate geometrical discrepancies. Specifically, when processing fisheye photographs using professional image analysis software (such as Hemisfer or CanEye), the calculated field of view is constrained to the zenith angle. central circular area The image is binarized and classified within this region, and the near-zenith canopy occlusion rate is calculated according to the following formula. :
[0096] ;
[0097] In the formula, This represents the number of foreground pixels of vegetation within the limited field of view. This represents the total number of pixels within the field of view. The calculated value is... This data will serve as a ground-based verification reference to assess the consistency of the UAV orthophoto estimation results. Furthermore, high-precision GPS coordinates will be used to record the shooting points for spatial matching, and the data will be cross-referenced with historical data from the forestry department to ensure data reliability.
[0098] Step 1.2: Sample Construction and Labeling: The DOM is cropped into fixed-size image patches using a sliding window (in this embodiment, ...). A basic sample set (1120 images in total) was constructed using pixel-level manual annotation. Image pixels were divided into two categories: foreground (tree canopy, marked as 1), and background (non-canopy shadows, gaps in the forest, and bare ground, marked as 0). A unified standard was followed during annotation: when the canopy edge was blurred due to shadows, the dominant area with significant vegetation texture was used as the canopy edge; internal canopy pores or minor bare areas were strictly classified as background and not filled to accurately reflect the canopy structure.
[0099] Step 1.3: Dataset Partitioning and Augmentation: Perform data augmentation operations on the basic sample set, such as... Figure 2 As shown, the specific steps include: (a) original image, (b) horizontal flipping, (c) brightness adjustment, (d) exposure adjustment, (e) contrast perturbation, and (f) adding Gaussian noise. The sample set was expanded (to a total of 6720 images) to simulate imaging conditions under varying environments. The expanded dataset was divided into training, validation, and test sets in a 7:2:1 ratio. During network training, the input images were normalized, mapping pixel values to... Intervals and convert them to tensor form ,in For batch size, For the number of channels, Defines the image's height and width.
[0100] Step 2: Construct a canopy segmentation model based on a lightweight gradient morphology-aware network: The canopy segmentation model adopts an encoder-decoder structure, including: a lightweight feature encoding module, a semantically guided channel compression and focusing module (SCCF), a gradient-guided morphological canopy attention module (G-MTCAM), and an upsampling reconstruction module.
[0101] Step 2.1: Constructing a lightweight encoder: To ensure high efficiency and low cost, this invention uses the MobileNetV3-Large network as the backbone for extracting multi-scale features. This module includes depthwise separable convolutional layers and inverse residual structures, which downsample the input image step by step (e.g., 4x, 8x, 16x), outputting multi-level feature maps for subsequent skip connections.
[0102] Step 2.2: Constructing the Decoder and Embedding the SCCF Module: The decoder uses progressive upsampling (bilinear interpolation) to restore resolution. An SCCF module is embedded during the feature fusion stage of each decoding layer. For example... Figure 3 As shown, the SCCF module receives two inputs: skip connection features from the encoder. and features from the previous decoder after upsampling .
[0103] Step 2.2.1: Feature concatenation and semantic weight generation (SWG unit) (e.g.) Figure 4 (As shown): This step aims to effectively integrate the shallow spatial detail features preserved by the encoder with the deep abstract semantic features recovered by the decoder, and to establish cross-level feature dependencies. First, a feature physical concatenation operation is performed to connect the input skip connection features. Upsampled features in the current decoding stage Stacking is performed along the channel dimension to construct a joint feature map containing rich multi-scale information. ,in For batch size, and These are the spatial dimensions of the feature map. This represents the total number of channels after concatenation. To overcome the problem of limited receptive field in local convolutions and to establish global channel dependencies, the module respectively... Performing Global Average Pooling (GAP) compresses the two-dimensional spatial information of each channel into a one-dimensional scalar with a global receptive field, thereby obtaining the channel statistical vectors. and The specific calculation is based on the formula. Proceed, in the formula Representative feature source identifier, Indicates the first The sample at the th Channels, coordinates Pixel response value at that location, This represents the global energy mean of that channel. Subsequently, to capture the nonlinear interaction relationships between feature channels from different sources, the extracted statistical vectors... and The data is concatenated, and the result is input into a FusionMLP consisting of two convolutional layers for feature fusion transformation to generate a global semantic weight vector that adaptively reflects the importance of each channel. The mathematical expression for this process is: , In the formula This represents a vector concatenation operation. and The first floor and the second floor are respectively. The weight matrix of convolution, The ReLU activation function is used to introduce nonlinear features. The Sigmoid activation function is used to normalize the output weight mapping to... Interval. Finally, using the generated weight vector... Original fusion features Perform channel-wise weighted operations based on an excitation mechanism, i.e., calculate... ,in This represents channel-wise multiplication under a broadcast mechanism, thus outputting weighted features after semantic relabeling. This achieves significant enhancement of key discriminative features and effective suppression of irrelevant background noise.
[0104] Step 2.2.2: Instance-level dynamic compression and pruning (CFR unit) (e.g.) Figure 5(As shown): This step aims to address the resource waste caused by traditional models using a fixed amount of computation for all samples. The CFR unit adaptively adjusts the activation strength of effective channels and the suppression strength of redundant channels for each independent sample instance by evaluating the texture-semantic synthesis complexity of the input feature map, achieving fidelity preservation for difficult examples and denoising for easy examples, and providing potential space for subsequent hardware / framework sparse acceleration. The specific implementation process is as follows:
[0105] (1) Sample complexity assessment: In order to quantify the complexity of each sample The system jointly models the processing difficulty from two dimensions: spatial texture variation and channel information richness. For the first dimension, texture complexity is calculated based on the input features. The spatial variance is calculated to characterize the richness of the texture (such as high-frequency details at the edge of a tree canopy). For each sample... Its texture complexity Defined as the mean of the variances of all channels:
[0106] ;
[0107] in, Indicates the total number of channels. and These are the height and width of the feature map, respectively; Indicates sample In the Each channel, spatial coordinates Pixel value at; This is the spatial pixel mean of the sample within the corresponding channel. A larger value indicates a more complex image spatial structure. Information entropy is calculated for the second dimension. Information entropy is calculated to measure the uncertainty of feature distribution and semantic richness. First, a Softmax operation is performed along the feature channel dimension to map the feature values to a probability distribution. Then, the entropy of this distribution is calculated:
[0108] ;
[0109] The larger the value, the richer the semantic information contained in the feature, and the more channels need to be retained for parsing.
[0110] To eliminate the influence of different dimensions, and Normalization is performed within the current batch, and a weighted sum is calculated to obtain the overall complexity score for that sample. .
[0111] (2) Dynamic calculation of adaptive compression ratio: based on comprehensive score The system dynamically determines the compression ratio for each sample. Its core logic lies in: for the score... For simpler samples (such as smooth ground), apply a higher compression ratio; for scores... More complex samples (such as intertwined branches and leaves) retain more channels. Dynamic compression ratio. The calculation formula is as follows:
[0112] ;
[0113] in, This indicates a normalization operation, ensuring The preset scaling factor hyperparameter is preferably set to 3 in this embodiment, meaning that a maximum compression of approximately 4 times can be achieved. At this point, the simpler the sample (… Compression ratio Towards the maximum value .
[0114] (3) Physical pruning and structural reconstruction: Based on the calculated compression ratio, determine the number of effective channels that each sample should ultimately retain. :
[0115] ;
[0116] in, This is a set minimum channel number threshold to prevent over-compression from causing feature collapse. Based on The CFR unit performs the following physical operations:
[0117] Physical Slicing: Based on weighted features Calculate the importance score for each channel. ,in according to Descending order selection Channel (index set) Then slice the data to obtain the compressed features. Meanwhile, to ensure the correctness of subsequent normalization operations, the system simultaneously extracts data related to this... The BatchNormalization parameters (RunningMean and RunningVar) corresponding to each channel are used for slicing adaptation. This suppresses the activation of non-critical channels without changing the input dimension of subsequent layers, reducing interference from redundant features, and potentially bringing caching and bandwidth benefits under certain hardware / inference frameworks.
[0118] Sparse padding and dimensionality restoration: To ensure output features It can be used by subsequent convolutional layers with a fixed input dimension (such as standard convolutional layers). The convolutional or residual module processes the data directly, and the system performs sparse padding. Specifically, it constructs a dimensional... The all-zero initialization tensor will have the calculated effective features Fill the tensor with its original index position.
[0119] Final output purification characteristics Preserving the original tensor shape Without altering the core structure, non-zero activation values are only present at key channel locations. This design allows the model to achieve dynamic computational flow control for samples of varying difficulty without modifying the network backbone.
[0120] Step 2.3: Constructing the embedding and upsampling reconstruction of the G-MTCAM module: After dynamic compression and cleansing of features via the SCCF module, and reconstruction of decoder features, the resulting feature map is input into the Gradient-Guided Morphological Canopy Attention Module (G-MTCAM). For example... Figure 6 As shown, this module is embedded in each decoder block to explicitly enhance the boundary gradients of the tree canopy, eliminating edge blurring generated during upsampling. The features processed by G-MTCAM finally enter the upsampling reconstruction module and are mapped to the final binary segmentation mask.
[0121] In each level of the decoder (DecoderBlock), the cleaned features output in step 2.2.2 are processed. After feature reconstruction by the decoder (usually) Features are obtained after convolution. The data is then input into the G-MTCAM module. Steps 2.3.1 and 2.3.2 are repeated in each decoder block to progressively enhance the canopy boundary gradient during the upsampling reconstruction process and suppress background texture noise.
[0122] Step 2.3.1: Gradient-Induced Central Difference Convolution (GI-CDC) (e.g.) Figure 7 (As shown): This step aims to address the problem of traditional convolution often confusing low-frequency structural information with high-frequency detail information during feature extraction. It achieves effective decoupling and enhancement of morphological flow and texture flow by constructing a gradient-induced mechanism. In specific implementation, morphological flow feature extraction is first performed using a preset standard. convolution kernel For input features Perform convolution operations to aggregate spatial context information within the local pixel neighborhood and generate a basic feature map containing the basic topological structure. Its calculation formula satisfies Secondly, in order to construct a local benchmark for comparison and simulate the basis response of flat regions, central basis features are extracted. This process does not introduce additional independent parameters, but is based on the idea of "weight sharing and compression," combining the aforementioned... Convolutional kernels perform summation and aggregation across spatial dimensions, yielding equivalent results. convolution kernel And use this kernel to extract local central intensity features. The formula is expressed as This feature map reflects the low-frequency background components after removing spatial texture fluctuations; finally, a gradient-weighted fusion operation is performed by calculating the difference between the base features and the central basal features. To explicitly model the rate of intensity change between pixels, i.e., the high-frequency texture gradient, and to pass this gradient term through hyperparameters (In this embodiment, it is preferably set to 0.7) After adjustment, the feature is superimposed back onto the basic feature, thereby outputting a hybrid feature that integrates semantic structure and sharpened edges. Its closed-loop formula is The physical significance of this mechanism is that when the convolution window slides through smooth areas such as the inside of the tree canopy, the difference term approaches zero, and the model retains the original semantics; while when the window passes through the edge or gap of the tree canopy, the difference term increases significantly, thereby sharpening and enhancing edge details at the feature level, effectively improving the accuracy of the segmentation boundary.
[0123] Step 2.3.2: Variance-based statistical attention (V-SE) (e.g.) Figure 8 (As shown): After enhancing the edge information of the features through gradient induction, this step introduces a variance-based statistical attention mechanism to further filter out highly discriminative canopy texture features from complex background noise. This mechanism aims to suppress irrelevant texture responses in non-canopy regions. Specifically, the mixed features output from the previous step are first processed... Statistical feature extraction is performed, and the spatial standard deviation vector that reflects the pixel dispersion and texture richness within the feature map is calculated. Its calculation is based on the formula Proceed, in the formula This represents the pixel mean of the corresponding channel. This is a normalization factor for the unbiased estimate; the larger the standard deviation, the richer the texture detail information contained in the channel. Secondly, to transform the dimensionless statistics into an assessment of the importance of the feature channels, [the following is used:] The input is fed into a multilayer perceptron (MLP) for nonlinear mapping, and a sigmoid activation function is used to generate values ranging from... The gating weight vector between Next, the generated weights are used For mixed features Perform channel-wise multiplication weighting based on broadcast mechanism ( To enhance the expressive power of key texture channels and suppress noisy channels, a residual learning architecture is employed to generate the final output features. Specifically through the formula To achieve, in the formula This is used to perform channel fusion and linear projection on the weighted high-frequency features, so that they are consistent with the original input features. The elements are aligned in dimensional space and then added together. This structural design, while preserving the original semantic and topological information of the input features, selectively injects high-frequency detail streams that have undergone statistical filtering and gradient sharpening, thereby significantly improving the model's ability to resolve subtle tree canopy edges.
[0124] Step 3: Input the training set data from Step 1.3 into the model and train it using the boundary-enhanced composite loss function; the specific process includes:
[0125] In this embodiment, a boundary-enhanced composite loss function is used. Calculate the error between the predicted tree canopy probability map and the true label mask:
[0126] ;
[0127] In this embodiment, .
[0128] in, Binary Cross-Entropy Loss, as a basic supervision term, provides stable pixel-level classification gradients. It is expressed as:
[0129] ;
[0130] In the formula, Total number of pixels For pixels The true label, To predict probabilities.
[0131] Dice Loss is used to mitigate the potential sample imbalance between the foreground (tree canopy) and background, reducing fragmented segmentation. It is expressed as:
[0132] ;
[0133] In the formula, To prevent smoothing factors with a denominator of zero.
[0134] Edge Distribution Loss, by introducing a Sobel operator with fixed parameters, forces the model to more accurately capture boundary regions with drastic grayscale changes. It is expressed as follows:
[0135] ;
[0136] In the formula, Indicates along and Gradient extraction operation in the direction, This indicates a normalization operation.
[0137] In this embodiment, the Adam optimizer is used to train the network during the training process (learning rate 1e-4, batch size=8, epoch=100 in this example). Figure 9 The graphs show the IoU and F1 score, with (a) showing the Intersection over Union (IoU) curve and (b) showing the F1 score curve. The forest canopy segmentation network model uses five evaluation metrics: parameters, floating-point operations (FLOPs), IoU, pixel accuracy (Acc), and F1 score. Parameters measure computational cost, FLOPs measure computational complexity and inference load, and IoU, Acc, and F1 score quantify segmentation accuracy. The parameters in the model are iteratively optimized using a backpropagation algorithm until the model converges or training reaches the required number of iterations. During validation, a validation set is used to verify the model. The model's predictions are compared with the known outputs of the validation dataset to evaluate its performance.
[0138] Step 4: Use the trained model for inference and forest canopy closure estimation; the specific process is as follows:
[0139] The test set partitioned in step 1.3 is read and input into the trained canopy segmentation network model to obtain the final canopy segmentation probability map. After threshold binarization (e.g., threshold 0.5), a canopy mask is obtained. The number of foreground pixels is then counted on the mask. Total number of pixels Calculate the vertical canopy cover (as defined in this embodiment). :
[0140] ;
[0141] If you need to calculate the physical projected area (square meters), using the GSD recorded in step 1.1, convert the pixel count into physical area:
[0142] ;
[0143] Figure 10 This is a comparison of the segmentation results. The white areas represent the predicted canopy, and the black areas represent non-canopy shadows, gaps in the forest, and bare ground background. From left to right, the figures are: (a) column shows the original UAV RGB remote sensing image, (b) column shows the corresponding labels with fine manual annotation, (c) column shows the prediction results of the baseline model, and (d) column shows the prediction results of the improved model proposed in this embodiment. Red circles in the figures mark challenging edge or shadow interference areas. Comparative observation shows that while the baseline model in column (c) can locate the main area of the canopy, it exhibits significant limitations when handling samples with complex canopy structures and strong light interference. Particularly in the area indicated by the red circles, the baseline model shows severe over-smoothing of the contours, resulting in blurred canopy edges, and even localized boundary adhesion or significant offset. Furthermore, within the canopy, the baseline model generates semantic ambiguity due to drastic texture changes, leading to obvious fragmentation and voiding effects. In contrast, column (d) shows the prediction results using the prediction method described in this embodiment. The results show that the model fully utilizes the gradient induction mechanism of the G-MTCAM module and the semantic focusing capability of the SCCF module, resulting in minimal differences between the predicted canopy region and the semantic segmentation map of the label pair. The model successfully suppresses boundary adhesion, achieving pixel-level fitting of fine branch and leaf edges, highly consistent with manually labeled levels; at the same time, it effectively suppresses background noise interference and repairs internal voids, thus significantly improving the problems of rough edges and internal fragmentation in variable regions, ensuring good spatial coherence of the segmentation results.
[0144] Figure 11This paper presents quantitative comparison results between our proposed method and several mainstream semantic segmentation models on a test set. It's important to note that all comparison models were trained under the same data partitioning strategy (spatial block partitioning), the same input size (512×512), and the same data augmentation principle (augmentation only on the training set). The optimal weights were selected for testing on the validation set to ensure fairness and reproducibility. Under these settings, our proposed method achieved the best IoU (88.59%), Acc (88.62%), and F1 (93.77%) on this dataset, while maintaining low computational complexity (6.71 GFLOPs), demonstrating a good accuracy-efficiency trade-off. Compared to the classic U-Net and DeepLabV3+, our proposed method achieved significant improvements in IoU of 2.77% and 2.07%, respectively. This strongly demonstrates that simply stacking network layers or using standard dilated convolutions is insufficient to fully exploit the subtle features of tree canopy edges, while our proposed G-MTCAM edge-focusing strategy can more effectively handle complex forestry scenarios. More importantly, even compared to SegFormer based on the Transformer architecture and HRNetV2 which focuses on high-resolution feature preservation, our method still maintains an advantage of 1.05% and 0.91% in IoU, respectively. This result confirms that even based on the lightweight MobileNetV3 backbone, by introducing a carefully designed gradient guidance module, the model can achieve feature representation capabilities that surpass complex multi-branch or self-attention architectures. Besides the breakthrough in accuracy, computational efficiency is a crucial indicator of a model's deployability. In terms of lightweight design, our model has a computational complexity of only 6.71 GFLOPs. Compared to heavyweight networks such as DeepLabV3+ (45.20 G) and DANet (48.65 G), the computational cost is reduced by nearly 7 times, significantly lowering the hardware deployment threshold. Although the computational cost of our method is slightly higher than that of extremely lightweight models such as BiSeNetV2 (4.50 G) and PSPNet (5.28 G) (e.g., 1.43 GFLOPs more than PSPNet), this small computational cost is traded for a significant accuracy gain—IoU improvements of 1.71% and 1.57%, respectively. This is thanks to the efficiency of the MobileNetV3 backbone and the effective suppression of redundant features by the G-MTCAM module, which enables the model to achieve the best balance between speed and accuracy while maintaining extreme lightweightness.
[0145] Figure 12This paper presents a series of ablation experiments designed under the same dataset and training settings. First, as the cornerstone of lightweight modifications, we replaced the original backbone network with the MobileNetV3 Encoder. This improvement established an excellent performance foundation for the model, achieving an IoU of 86.42% with extremely low resource consumption of only 5.65 M parameters and 6.18 G FLOPs. Building on this, we embedded the SCCF module into the decoder stage. Experimental data show that the introduction of this module improved the IoU to 87.23%, the F1 score to 92.85%, while the computational cost (FLOPs) only slightly increased to 6.32 G. This result confirms that SCCF can significantly improve the model's ability to capture tree canopy texture details at extremely low computational cost by suppressing redundant channels and focusing on key semantic features. Subsequently, by integrating the G-MTCAM module, the model's ability to discriminate complex textures and edges is significantly enhanced. This module utilizes gradient convolution and variance gating mechanisms to effectively enhance the extraction of high-frequency information, further increasing IoU to 87.87% and Acc to 87.91%. Meanwhile, FLOPs stabilized at 6.71 G, indicating that G-MTCAM improves the accuracy of identifying difficult-to-segment regions (such as canopy edges) without placing an excessive burden on network inference. Finally, a boundary-enhanced loss is introduced to construct the final model. This optimization strategy, under "zero inference cost," through strong constraints during training, enables the final model to achieve an optimal IoU of 88.59% and an F1 score as high as 93.77%. This significant improvement effectively solves the problem of insufficient edge recovery ability in the baseline model, resulting in highly consistent canopy edges in the segmentation results.
[0146] Figure 13 The regression analysis of measured canopy closure and model-derived canopy closure from representative plots within the experimental area is presented. The linear fitting results show a significant positive correlation between the two. This high correlation confirms that limiting the field of view of hemispherical photography to... This effectively eliminates the systematic errors caused by lateral foliage obstruction in traditional ground measurements, enabling precise geometric matching between the ground truth and UAV vertical observation data. The fitting equation is:
[0147] ;
[0148] Regarding error metrics, the mean absolute error (MAE) was 0.032 (≈3.2 percentage points), and the mean relative error (MRE) was only 4.53%. This confirms that the segmentation network proposed in this study can provide a high-fidelity geometric basis for canopy closure estimation.
[0149] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A forest canopy density estimation method based on a lightweight gradient morphological perception network, characterized in that, Comprising the following steps: Step 1: Obtain a forest canopy remote sensing image dataset, including a forest orthophoto and its corresponding refined pixel-level annotation mask; Step 2: Construct a tree crown segmentation model based on a lightweight gradient morphological perception network: including a lightweight feature encoding module, a semantic guided channel compression and focusing module, a gradient guided morphological tree crown attention module, and an upsampling reconstruction module; Step 2.1: Construct a lightweight encoder: use MobileNetV3-Large network as the backbone to extract multi-scale features, this module contains depth separable convolution layer and reverse residual structure, which down-samples the input image step by step, and outputs multi-level feature maps for subsequent jump connection; Step 2.2: Constructing decoder with SCCF module embedding, decoder adopts step-by-step up-sampling, embedding SCCF module at feature fusion stage of each decoding layer, SCCF module receives two inputs: skip connection features from encoder and up-sampled features from upper-level decoder , the SCCF module compresses the channel through semantic guidance, the model suppresses the feature response of non-target region in the decoding stage and retains the key texture information; Step 2.3: Embedding and upsampling reconstruction of G-MTCAM module, after completing the dynamic compression and purification of features through SCCF module and decoder feature reconstruction, the obtained feature map is input into the gradient guided morphological tree crown attention module, which is embedded in each decoder level, the features processed by G-MTCAM are finally input into the upsampling reconstruction module, and the final binary segmentation mask is mapped, the G-MTCAM module can sensitively capture the small gradient changes of the tree crown edge through central difference convolution, and combined with statistical gating to filter noise; Step 3: Train with boundary enhanced compound loss function; Step 4: Use the trained model for inference and forest canopy density estimation.
2. The forest canopy density estimation method based on the lightweight gradient shape perception network according to claim 1, characterized in that, The step 1 specifically comprises: step 1.1: data acquisition and preprocessing: use a UAV to carry a high-resolution RGB camera to collect aerial photos in the forest area, use a motion recovery structure algorithm to process the collected aerial photos, generate high-resolution orthophotos of the study area, and record the GSD; Field measurement and data validation: When processing fisheye photos with professional image analysis software, limit the calculation of the field of view to the central circular region of the zenith angle Within this region, the image is classified as binary, and the near-zenith canopy cover is calculated according to the following formula : ; wherein, is the number of vegetation foreground pixels within the field of view, is the total number of pixels within the field of view, the calculated The verification reference value as the ground end, using high-precision GPS record shooting point coordinates to achieve spatial matching, and cross-comparison data with forestry department historical inventory information; Step 1.2: sample construction and annotation; Step 1.3: Dataset division and augmentation: Perform data augmentation operation on the base sample set, expand the sample set to simulate the imaging situation under the variable environment, divide the expanded dataset into training set, validation set and test set according to the ratio of 7:2:1, and normalize the input image in the network training stage, map the pixel value to interval and convert it into tensor form wherein is the batch size, is the number of channels, is the image height and width.
3. The forest canopy density estimation method based on lightweight gradient shape-aware network according to claim 1, characterized in that, The specific method of step 2.2 is as follows: First, a feature physical concatenation operation is performed to connect the input skip connection features. Upsampled features in the current decoding stage Stacking is performed along the channel dimension to construct a joint feature map containing rich multi-scale information. ,in For batch size, and These are the spatial dimensions of the feature map. The module calculates the total number of channels after concatenation. Performing a global average pooling operation compresses the two-dimensional spatial information of each channel into a one-dimensional scalar with a global receptive field, thereby obtaining the channel statistical vectors. and The specific calculation is based on the formula. Proceed, in the formula Representative feature source identifier, Indicates the first The sample at the th Channels, coordinates Pixel response value at that location, This is the global average energy value of the channel; Subsequently, the extracted statistical vectors are spliced and input into a fusion multi-layer perception composed of two convolution layers for feature fusion transformation to generate a global semantic weight vector that can adaptively reflect the importance of each channel , The mathematical expression of the process is , wherein represents a vector splicing operation, and are the weight matrices of the first and second layers of convolution, is a ReLU activation function for introducing nonlinear features, and is a Sigmoid activation function for mapping and normalizing the output weight to the interval Finally, the generated weight vector is used to perform a channel-by-channel weighting operation based on the excitation mechanism on the original fusion features , that is, to calculate , wherein represents a channel-by-channel multiplication under the broadcast mechanism, so as to output the weighted features after semantic re-labeling ; Step 2.2.1: feature splicing and semantic weight generation: Step 2.2.2: instance-level dynamic compression and pruning: The system jointly models from two dimensions of spatial texture variation and channel information richness. For the first dimension, texture complexity is calculated, and for the input features , the spatial variance thereof is calculated to represent the richness of the texture. For a sample , the texture complexity is defined as the mean of all channel variances: ; wherein, represents the total number of channels, and are the height and width of the feature map, respectively; represents the sample pixel value at the channel, spatial coordinate ; is the spatial pixel mean of the sample in the corresponding channel, The greater the value, the more complex the image spatial structure. For the second dimension, information entropy is calculated. First, a Softmax operation is performed on the feature channel dimension to map the feature values to a probability distribution , and then the entropy value of the distribution is calculated: ; The greater the value, the richer the semantic information contained in the feature, and more channels need to be retained for analysis. With Normalization is performed within the current Batch, and the integrated complexity score of the sample is obtained by weighted summation ; (1) Sample comprehensive complexity evaluation: Based on the comprehensive score , the system dynamically decides the compression rate of each sample, the core logic of which is: for simple samples with lower scores , higher compression rate is applied; for complex samples with higher scores , more channels are preserved, and the dynamic compression rate is calculated as follows: ; wherein, denotes a normalization operation, ensuring is a preset scaling factor hyperparameter, in which case, the simpler the sample is , the higher the compression rate tends to a maximum value ; (2) Dynamic solution of adaptive compression rate: According to the calculated compression rate, determine the number of effective channels that each sample finally needs to retain : ; wherein, is a set minimum channel count threshold, preventing over-compression leading to feature collapse, based on , the CFR unit performs the following physical operations: (3) Physical pruning and structure reconstruction: Based on weighted features Calculate the importance score for each channel. ,in according to Descending order selection Channels are sliced to obtain compressed features. At the same time, the system simultaneously extracts information related to this... The BatchNormalization parameters corresponding to each channel are sliced and adapted to suppress the activation of non-critical channels without changing the input dimension of subsequent layers, reducing redundant feature interference, and bringing potential caching and bandwidth benefits under some hardware / inference frameworks. Physical slicing: A full zero-initialized tensor with dimension is constructed, and the computed effective features are filled into the tensor according to their original index positions. The final output purified features have non-zero activation values only at the key channel positions while keeping the original tensor shape unchanged.
4. The forest canopy density estimation method based on the lightweight gradient shape perception network according to claim 3, characterized in that, The purifying features outputted in step 2.2.2 are inputted into the G-MTCAM module in each level of the decoder The features are reconstructed after the decoder features and inputted into the G-MTCAM module, and steps 2.3.1 and 2.3.2 are repeated in each level of the decoder to enhance the crown boundary gradient in the up-sampling reconstruction process and suppress the background texture noise step by step.
5. The forest canopy density estimation method based on lightweight gradient shape-aware network according to claim 4, characterized in that, Sparse filling and dimension recovery: The specific steps of step 2.3 are as follows: Firstly, the morphological flow feature is extracted, and a preset standard is used Convolution kernel The input feature is subjected to a convolution operation to aggregate the spatial context information in the local pixel neighborhood, thereby generating a basic feature map containing a basic topological structure , and the calculation formula thereof satisfies Secondly, the center base feature is extracted, and based on the "weight sharing and compression" idea, the above-mentioned convolution kernel is summed and aggregated in the spatial dimension to obtain an equivalent convolution kernel , and the local center intensity feature is extracted by using the kernel, and the formula is expressed as The feature map reflects the low-frequency background component after removing the spatial texture fluctuation; finally, the gradient weighted fusion operation is performed, the difference between the basic feature and the center base feature is calculated to explicitly model the intensity change rate between pixels, i.e. the high-frequency texture gradient, and the gradient term is superimposed back to the basic feature after being regulated by the hyperparameter , thereby outputting the hybrid feature fused with semantic structure and sharpened edge , and the closed-loop formula is ; Step 2.3.1: gradient-induced central difference convolution: After the edge information of the enhanced features is induced by the gradient, a variance-based statistical attention mechanism is introduced. Firstly, the mixed features output by the previous step are input into the statistical feature extraction to calculate the spatial standard deviation vector that can reflect the dispersion degree and texture richness of the pixels in the feature map . The calculation is based on the formula , where is the mean value of the pixels in the corresponding channel, and is the normalized factor of the unbiased estimation. The larger the standard deviation value is, the richer the texture detail information contained in the channel is. Secondly, the is input into the multi-layer perception to perform nonlinear mapping, and the Sigmoid activation function is used to generate the gating weight vector with a value range of . Then, the generated weight is used to perform channel-by-channel multiplication weighting on the mixed features based on the broadcast mechanism to enhance the expression ability of the key texture channels and suppress the noise channels. Finally, the residual learning architecture is used to generate the final output feature , which is realized by the formula , where is used to perform channel fusion and linear projection on the weighted high-frequency features to make them aligned with the dimension space of the original input features and then added together.
6. The forest canopy density estimation method based on lightweight gradient shape-aware network according to claim 1, characterized in that, Step 2.3.2: statistical attention based on variance: Adopting a boundary-enhanced compound loss function computing an error between the tree crown prediction probability map and the real label mask: ; ; wherein is the binary cross-entropy loss, expressed as: ; wherein is the total number of pixels, is the pixel true label, is the predicted probability; The loss for the dice is expressed by the following equation: ; In the formula, Smooth factor to prevent denominator from being zero; The edge gradient distribution loss is expressed by the following equation: ; In the formula, represents a gradient extraction operation along the and directions, represents a normalization operation.
7. The forest canopy density estimation method based on the lightweight gradient shape perception network according to claim 6, characterized in that, The specific process of step 3 is as follows:
8. The forest canopy density estimation method based on the lightweight gradient shape perception network according to claim 2, characterized in that, During training, the Adam optimizer is used to train the network, and the forest tree crown segmentation network model uses five evaluation indicators, namely parameter quantity, floating point operation number, intersection over union, pixel accuracy and F1 score, among which Parameters is used to measure the calculation cost, FLOPs is used to measure the calculation complexity and inference load of the model, IoU, Acc and F1 score are used to quantify the segmentation accuracy, through the error back propagation algorithm, the parameters in the model are iteratively optimized until the model converges or the iteration times are reached, and the training is completed. In the verification process, the model is verified using the verification set, the predicted results of the model are compared with the known output of the verification dataset to evaluate the performance of the model. The specific process of step 4 is as follows: Read the test set divided in step 1.3, input it into the trained tree crown segmentation network model, get the final tree crown segmentation probability map, and get the tree crown mask after threshold binaryzation, count the number of foreground pixels on the mask and the total number of pixels , calculate the vertical coverage of forest canopy : ; If the physical projected area is to be calculated Convert the pixel count to physical area using the GSD recorded in step 1.1 : 。
Citation Information
Patent Citations
Method for remote sensing inversion of forest canopy density based on machine learning
CN112649372A
Unmanned aerial vehicle visible light image individual tree detection method suitable for complex forest environment
CN118918479A