Mangrove carbon stock prediction method, electronic device and storage medium
By constructing a mangrove species dataset and training it using the MFPA-YOLO semi-supervised model, the problems of high cost and low efficiency in mangrove carbon storage prediction were solved, achieving more efficient and accurate carbon storage calculation.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CCCC SECOND HARBOR CONSULTANTS CO LTD
- Filing Date
- 2025-10-28
- Publication Date
- 2026-07-23
AI Technical Summary
Existing deep learning models require a large amount of manually labeled remote sensing data when calculating mangrove carbon storage, which increases costs and results in low efficiency and accuracy.
By acquiring remote sensing and field data of mangroves, a mangrove species dataset was constructed and trained using the MFPA-YOLO semi-supervised model, which includes a teacher network and a student network. Combined with a multi-scale feature adaptive fusion module, data augmentation and annotation were performed to improve the accuracy and efficiency of the model.
This reduces the cost of predicting mangrove carbon storage, improves the efficiency and accuracy of the model, and enables more precise calculation of mangrove carbon storage.
Smart Images

Figure CN2025130435_23072026_PF_FP_ABST
Abstract
Description
A method for predicting carbon storage in mangroves, electronic equipment and storage medium Technical Field
[0001] This invention relates to the fields of computer vision and remote sensing technology, and in particular to a method for predicting carbon storage in mangroves, an electronic device, and a storage medium. Background Technology
[0002] Blue carbon has advantages such as significant ecological and environmental benefits, high carbon sequestration rate, and long-term sustainable carbon sequestration capacity. In particular, mangroves have a particularly strong carbon storage and sequestration capacity, with a carbon sink capacity 50 times that of tropical rainforests. Therefore, developing the blue carbon economy plays an important role in mitigating the greenhouse effect and helping my country achieve its carbon peak and carbon neutrality goals.
[0003] Using deep learning models to calculate mangrove carbon storage is an effective method to improve the accuracy and efficiency of vegetation biomass and carbon sink estimation. It can provide technical support for ecological carbon benefit assessment and accounting, and also provide a scientific basis for data-driven decision-making in climate change policy formulation and implementation management.
[0004] However, common deep learning models require extensive manual annotation of remote sensing data when calculating mangrove carbon storage, which not only consumes a lot of manpower and resources for field measurement work, leading to increased costs, but also results in low efficiency and accuracy of the models. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, electronic device and storage medium for predicting mangrove carbon storage, in order to solve the technical problems of low efficiency and accuracy of models when calculating mangrove carbon storage.
[0006] To address the above problems, this invention provides a method for predicting mangrove carbon storage, comprising:
[0007] Acquiring remote sensing and measured data of mangroves, and labeling the remote sensing data based on the measured data to construct a mangrove species dataset, wherein the acquisition of remote sensing and measured data of mangroves, and the labeling of the remote sensing data based on the measured data to construct the mangrove species dataset, includes:
[0008] The total aboveground biomass of the mangrove forest is calculated based on the measured data, and the initial total carbon storage of the mangrove forest is determined based on the total aboveground biomass of the mangrove forest. The measured data includes mangrove species names, diameter at breast height (DBH), tree height, and geographical coordinates of the quadrat.
[0009] The remote sensing data are labeled based on the mangrove species names, quadrat geographic coordinates, and initial total carbon storage of the mangroves to construct a mangrove species dataset, which includes labeled remote sensing datasets and unlabeled remote sensing datasets.
[0010] The constructed MFPA-YOLO semi-supervised model is trained based on the mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, an object detection layer, and an output layer. The object detection layer includes a teacher network, a pseudo-label generation network, and a student network. The training of the constructed MFPA-YOLO semi-supervised model based on the mangrove species dataset includes:
[0011] The mangrove species dataset is input into the MFPA-YOLO semi-supervised model, the teacher network is trained based on the labeled remote sensing dataset, and the parameters of the teacher network are updated to obtain a fully trained teacher network.
[0012] Based on the fully trained teacher network, predictions are made on the unlabeled remote sensing dataset to obtain a pseudo-labeled dataset;
[0013] After classifying the pseudo-label dataset based on the pseudo-label generation network, the student network is iteratively trained based on the classified pseudo-label dataset and the unlabeled remote sensing dataset, and the parameters of the student network are updated based on the parameters of the teacher network to obtain a fully trained MFPA-YOLO semi-supervised model.
[0014] The MFPA-YOLO semi-supervised model is used to predict the mangrove remote sensing image to be predicted, obtain the initial predicted value of mangrove carbon storage, determine the ecological environment indicators, and determine the predicted value of mangrove carbon storage based on the ecological environment indicators and the initial predicted value of mangrove carbon storage.
[0015] In one possible implementation, the formula for calculating the total aboveground biomass of the mangrove forest is:
[0016] Among them, AGB ID This represents the total aboveground biomass of mangroves, with ID indicating the name of a mangrove species. Let be the diameter at breast height (DBH) of the i-th tree of a species in the mangrove quadrat. Let be the height of the i-th tree of a species in the mangrove quadrat, and a, b, and c be the coefficients of the species.
[0017] The formula for calculating the initial total carbon storage of the mangroves is: Carbon ID =0.47×AGB ID ,
[0018] Among them, Carbon ID This represents the initial total carbon storage of mangroves.
[0019] In one possible implementation, the teacher network has the same structure as the student network. The teacher network includes a backbone network layer, a neck fusion layer, and a head detection layer. The backbone network layer includes at least a spatial pyramid pooling feature fusion module, a centralized comprehensive convolution module, and a first multi-scale feature adaptive fusion module. The neck fusion layer includes at least a path aggregation module and a second multi-scale feature adaptive fusion module. Training the teacher network based on the labeled remote sensing dataset includes:
[0020] The labeled remote sensing dataset is input into the teacher network, and features are extracted from the labeled remote sensing dataset through the backbone network layer. Specifically, the images of the labeled remote sensing dataset are pooled by the spatial pyramid pooling feature fusion module, and then the pooled images are convolved by the centralized comprehensive convolution module. Finally, the convolved images are adaptively fused by the first multi-scale feature adaptive fusion module to obtain feature maps of multiple scales.
[0021] The feature maps at multiple scales are input into the neck fusion layer, and the feature maps at multiple scales are fused through the neck fusion layer. Specifically, after the feature maps at multiple scales are fused through the path aggregation module, the fused feature maps at multiple scales are adaptively fused through the second multi-scale feature adaptive fusion module to obtain the feature-fused image.
[0022] The image after feature fusion is input into the head detection layer, and the head detection layer makes predictions on the image after feature fusion.
[0023] In one possible implementation, classifying the pseudo-label dataset based on the pseudo-label generation network includes:
[0024] The confidence scores of candidate boxes are obtained. Based on the confidence scores of candidate boxes, a first threshold and a second threshold are set using the pseudo-label generation network. The pseudo-label dataset is classified based on the first threshold and the second threshold to obtain credible pseudo-labels, erroneous pseudo-labels, and uncertain pseudo-labels.
[0025] In one possible implementation, training the MFPA-YOLO semi-supervised model based on the mangrove species dataset to obtain a fully trained MFPA-YOLO semi-supervised model further includes:
[0026] The total loss function of the student network is optimized to improve the classification accuracy of images. The total loss function includes a supervised loss function and a semi-supervised loss function.
[0027] In one possible implementation, the ecological environment indicators include soil salinity adjustment factors, tidal flat water level adjustment factors, and soil moisture adjustment factors; the calculation formula for the predicted mangrove carbon storage value is: C2=C1×f(SS)×f(WL)×f(SW), f(SW) = μ + v × SMI,
[0028] Wherein, C2 is the predicted value of mangrove carbon storage, C1 is the preliminary predicted value of mangrove carbon storage, f(SS) is the soil salinity adjustment factor, f(WL) is the tidal flat water level adjustment factor, f(SW) is the soil moisture adjustment factor, T is the soil salinity of the current measured plot, E is the tidal flat water level of the current measured plot, SMI is the soil moisture index of the current measured plot, T0 and E0 are the optimal salinity and optimal water level for mangrove species ID, respectively, and σ is the salinity variation range parameter. denoted as , where μ and v are the regression coefficients of the moisture adjustment factor, representing the range of tidal flat water level variations.
[0029] On the other hand, the present invention also provides an electronic device, including: a processor and a memory;
[0030] The memory stores a computer-readable program that can be executed by the processor;
[0031] When the processor executes the computer-readable program, it implements the steps in the mangrove carbon storage prediction method as described above.
[0032] On the other hand, the present invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the mangrove carbon storage prediction method as described above.
[0033] The beneficial effects of this invention are as follows: Remote sensing data is labeled based on measured data, and a mangrove species dataset is constructed through this labeling, reducing costs. The constructed MFPA-YOLO semi-supervised model is trained based on this mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, a target detection layer, and an output layer. The target detection layer includes a teacher network, a pseudo-label generation network, and a student network. Data augmentation processing is performed on some labeled remote sensing datasets and a large number of unlabeled remote sensing datasets through the teacher and student networks in the target detection layer of the MFPA-YOLO semi-supervised model, strengthening the characteristics of mangrove species. Furthermore, a multi-scale feature adaptive fusion module is introduced into the teacher and student networks, enhancing the spatiotemporal sensitivity of the convolutional feature maps and improving the feature expression ability after feature fusion at different scales, thereby improving the efficiency and accuracy of the MFPA-YOLO semi-supervised model. Finally, the predicted value of mangrove carbon storage is determined based on ecological environment indicators and the initial predicted value of mangrove carbon storage, improving the accuracy of calculating mangrove carbon storage. Attached Figure Description
[0034] Figure 1 is a flowchart of an embodiment of the mangrove carbon storage prediction method provided by the present invention;
[0035] Figure 2 is a schematic diagram of the MFPA-YOLO semi-supervised model structure of the mangrove carbon storage prediction method provided by the present invention.
[0036] Figure 3 is a flowchart of an embodiment of the MFPA-YOLO semi-supervised model training of the mangrove carbon storage prediction method provided by the present invention;
[0037] Figure 4 is a flowchart of an embodiment of teacher network training in the MFPA-YOLO semi-supervised model of the mangrove carbon storage prediction method provided by the present invention.
[0038] Figure 5 is a schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0039] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0040] This invention discloses a method, electronic device, and storage medium for predicting mangrove carbon storage, which can be used in a computer. The method, device, or computer-readable storage medium involved in this invention can be integrated with the aforementioned device or be relatively independent.
[0041] A specific embodiment of the present invention discloses a method for predicting mangrove carbon storage, which can be executed by a computer, specifically by one or more processors of the computer. As shown in Figure 1, the mangrove carbon storage prediction method includes:
[0042] S101. Obtain remote sensing data and measured data of mangroves, and annotate the remote sensing data based on the measured data to construct a mangrove species dataset;
[0043] S102. The constructed MFPA-YOLO semi-supervised model is trained based on the mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, an object detection layer, and an output layer. The object detection layer includes a teacher network, a pseudo-label generation network, and a student network.
[0044] S103. Based on the fully trained MFPA-YOLO semi-supervised model, predict the mangrove remote sensing image to be predicted, obtain the initial predicted value of mangrove carbon storage, determine the ecological environment indicators, and determine the predicted value of mangrove carbon storage based on the ecological environment indicators and the initial predicted value of mangrove carbon storage.
[0045] The MFPA-YOLO semi-supervised model is constructed based on the YOLOv10 network. A schematic diagram of the MFPA-YOLO semi-supervised model structure is shown in Figure 2. As shown in Figure 2, the MFPA-YOLO semi-supervised model includes an input layer, an object detection layer, and an output layer. The input layer is the data preprocessing part, the object detection layer is the object detection part, and the output layer is the result output part. The object detection layer includes a teacher network MY-1, a pseudo-label generation network PLG, and a student network MY-2. The teacher network and the student network have the same structure, including a backbone network layer, a Neck layer, and a Head layer. An MFA module (multi-scale feature adaptive fusion module) is added after the SPPF module (spatial pyramid pooling feature fusion module) and the C3 module (centralized comprehensive convolution module) in the backbone network layer to enhance the spatiotemporal sensitivity of the feature maps after convolution. An MFA module (multi-scale feature adaptive fusion module) is inserted after the PANet module (path aggregation module) in the Neck layer (neck fusion layer) to improve the feature representation ability after feature fusion at different scales.
[0046] Compared with existing technologies, the mangrove carbon storage prediction method provided in this embodiment acquires remote sensing data and measured data of mangroves, and annotates the remote sensing data based on the measured data to construct a mangrove species dataset. This reduces costs. The constructed MFPA-YOLO semi-supervised model is trained based on the mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, a target detection layer, and an output layer. The target detection layer includes a teacher network, a pseudo-label generation network, and a student network. Based on the fully trained MFPA-YOLO semi-supervised model, predictions are made on the remote sensing images of mangroves to be predicted, obtaining initial predicted values for mangrove carbon storage. This improves the efficiency and accuracy of the MFPA-YOLO semi-supervised model. Furthermore, ecological environment indicators are determined, and based on these indicators and the initial predicted values, the predicted values for mangrove carbon storage are determined, improving the accuracy of mangrove carbon storage calculations.
[0047] In some embodiments, in step S101, remote sensing data and measured data of mangroves are acquired. High-resolution remote sensing data of mangroves at multiple scales are acquired using a drone remote sensing device within a region. Based on the regional scale, measured data of ground-labeled quadrats in different mangrove distribution areas within the target region are acquired. The measured data includes mangrove species names, diameter at breast height (DBH), tree height, and quadrat geographic coordinates. The remote sensing data is labeled based on the measured data to construct a mangrove species dataset. Specifically, the following steps are taken: First, the total aboveground biomass of the mangroves is calculated based on the measured data. Then, the initial total carbon storage of the mangroves is determined based on the total aboveground biomass, i.e., the total aboveground biomass of the mangroves in each quadrat is calculated based on the mangrove species name, DBH, and tree height. The formula for calculating the total aboveground biomass of the mangroves is:
[0048] Among them, AGB ID This represents the total aboveground biomass of mangroves, with ID indicating the name of a mangrove species. Let be the diameter at breast height (DBH) of the i-th tree of a species in the mangrove quadrat. Let be the height of the i-th tree of a species in the mangrove quadrat, and a, b, and c be species-specific coefficients.
[0049] The formula for calculating the initial total carbon storage of mangroves is: Carbon ID =0.47×AGB ID ,
[0050] Among them, Carbon ID This represents the initial total carbon storage of mangroves;
[0051] Secondly, remote sensing data are labeled based on mangrove species names, quadrat geographic coordinates, and initial total carbon storage of mangroves to construct a mangrove species dataset. That is, based on the collected mangrove species names, quadrat geographic locations, and initial total carbon storage of mangroves, the corresponding species names, mangrove areas, and carbon storage are labeled on the remote sensing images to construct a mangrove species dataset, which includes labeled remote sensing datasets and unlabeled remote sensing datasets.
[0052] In some embodiments, in step S102, the constructed MFPA-YOLO semi-supervised model is trained based on the mangrove species dataset. The MFPA-YOLO semi-supervised model is constructed based on the YOLOv10 network. The MFPA-YOLO semi-supervised model includes three parts: an input layer, an object detection layer, and an output layer. The object detection layer includes a teacher network, a pseudo-label generation network, and a student network. The teacher network and the student network have the same structure. The teacher network includes a backbone network layer, a Neck layer, and a Head layer. The backbone network layer includes at least an SPPF module, a C3 module, and a first MFA module. That is, a multi-scale feature adaptive fusion module (MFA) is added after the SPPF module and C3 module of the YOLOv10 backbone network to enhance the spatiotemporal sensitivity of the feature map after convolution. The Neck layer includes at least a PANet module and a second MFA module. That is, based on the Neck layer of YOLOv10, an MFA module is inserted after downsampling each layer of PANet in the Neck layer to improve the feature representation ability after feature fusion at different scales.
[0053] In some embodiments, referring to Figure 3, the steps for training the MFPA-YOLO semi-supervised model include:
[0054] S301. Input the mangrove species dataset into the MFPA-YOLO semi-supervised model, train the teacher network based on the labeled remote sensing dataset, and update the parameters of the teacher network to obtain a fully trained teacher network.
[0055] S302. Based on a fully trained teacher network, predict the unlabeled remote sensing dataset to obtain a pseudo-labeled dataset;
[0056] S303. After classifying the pseudo-label dataset based on the pseudo-label generation network, the student network is iteratively trained based on the classified pseudo-label dataset and the unlabeled remote sensing dataset, and the parameters of the student network are updated based on the parameters of the teacher network to obtain a fully trained MFPA-YOLO semi-supervised model.
[0057] In some embodiments, in step S301, the mangrove species dataset is input into the MFPA-YOLO semi-supervised model, that is, the mangrove species dataset is input into the input layer. The input layer performs various data augmentation processes on some labeled data and a large amount of unlabeled data in the mangrove species dataset to enhance the characteristics of mangrove species. Then, a teacher network is trained based on the labeled remote sensing dataset, and the parameters of the teacher network are updated to obtain a fully trained teacher network. The teacher network includes a backbone network layer, a neck fusion layer, and a head detection layer. The backbone network layer includes at least a Spatial Pyramid Pooling Feature Fusion Module (SPPF module), a Convolutional Convolution Module (C3 module), and a first Multi-Scale Feature Adaptive Fusion Module (first MFA module). The neck fusion layer includes at least a path aggregation module (PANet module) and a second multi-scale feature adaptive fusion module (second MFA module). The training of the teacher network, as shown in Figure 4, includes the following steps:
[0058] S401. Input the labeled remote sensing dataset into the teacher network, and extract features from the labeled remote sensing dataset through the backbone network layer. Specifically, after pooling the images of the labeled remote sensing dataset through the spatial pyramid pooling feature fusion module, the pooled images are convolved through the centralized comprehensive convolution module, and the convolved images are adaptively fused through the first multi-scale feature adaptive fusion module to obtain feature maps of multiple scales.
[0059] S402. Input feature maps of multiple scales into the neck fusion layer. Perform feature fusion on the feature maps of multiple scales through the neck fusion layer. Specifically, after multi-scale feature fusion on the feature maps of multiple scales through the path aggregation module, adaptive fusion on the fused feature maps of multiple scales through the second multi-scale feature adaptive fusion module to obtain the feature fused image.
[0060] In S403, the image after feature fusion is input into the head detection layer, and the head detection layer makes predictions on the image after feature fusion.
[0061] In some embodiments, in step S401, the labeled remote sensing dataset is input into the teacher network, and features of the labeled remote sensing dataset are extracted through the backbone network layer. Specifically, after pooling the images of the labeled remote sensing dataset through the SPPF module, the pooled images are convolved through the C3 module, and the convolved images are adaptively fused through the first MFA module to obtain feature maps at multiple scales. In the SPPF module, the input feature map undergoes one convolution operation, followed by three sequential pooling operations to fuse features at different scales of the same feature map together, enriching the semantic features of the feature map. In the C3 module, the pooled images are convolved multiple times. In the MFA module, features are extracted through two branches: convolutional features and attention features, and then adaptive fusion is performed.
[0062] In some embodiments, in step S402, feature maps of multiple scales are input to the Neck layer, and feature fusion is performed on the feature maps of multiple scales through the Neck layer. Specifically, after multi-scale feature fusion is performed on the feature maps of multiple scales through the PANet module, adaptive fusion is performed on the fused feature maps of multiple scales through the second MFA module to obtain the feature-fused image. In the PANet module, information is passed up layer by layer through upsampling operations. At each level, low-resolution feature maps and high-resolution feature maps are horizontally connected and point-by-point added to integrate information of different scales. Information is passed down layer by layer through downsampling operations. At each level, high-resolution feature maps and low-resolution feature maps are horizontally connected and point-by-point added to better capture and integrate multi-scale information.
[0063] The first and second MFA modules consist of two branches: convolutional features and attention features. In the convolutional feature branch, convolution and channel transform are used for local feature extraction to obtain the output of the convolutional feature branch, calculated as: F con =conv(F),
[0064] Where F represents the image input features, F con The output of the convolutional feature branch is `conv`, where `conv` is the convolution function. In the attention feature branch, a dual-dimensional attention module (channel and spatial) is used to enhance the dependence of distant features. Its calculation formula is:
[0065] in, These represent the average pooling output and max pooling output along the channel dimension, respectively. AvgPool is the average pooling function, and MaxPool is the max pooling function. M c (F) represents the channel attention output, σ is the sigmoid activation function, and MLP is a multilayer perceptron composed of multiple fully connected layers. These represent the average pooling output and the max pooling output in the spatial dimension, respectively, M. s (F) represents the spatial attention output; the channel attention output and the spatial attention output are weighted and fused to obtain the attention feature branch output, which is calculated as follows: F att =M s (M c (F)×F)×(M c (F)×F),
[0066] Among them, F att The output of the attention feature branch is used for calculation; finally, the output of the convolution feature branch and the output of the attention feature branch are fused to obtain the final feature output result, which is calculated as: F out =F acc +F att ,
[0067] Among them, F out The final feature output is the result of multi-scale adaptive fusion of the MFA module.
[0068] In some embodiments, in step S403, the feature-fused image is input to the Head layer, and the Head layer makes predictions on the feature-fused image. The Head layer generates multiple predictions for each object, providing rich supervision signals, thereby improving learning accuracy.
[0069] In some embodiments, in step S302, the unlabeled remote sensing dataset is input into a fully trained teacher network, and the unlabeled remote sensing dataset is predicted by the fully trained teacher network to obtain a pseudo-labeled dataset.
[0070] In some embodiments, in step S303, after classifying the pseudo-label dataset based on the pseudo-label generation network, the student network is iteratively trained based on the classified pseudo-label dataset and the unlabeled remote sensing dataset, and the parameters of the student network are updated based on the parameters of the teacher network to obtain a fully trained MFPA-YOLO semi-supervised model. The specific steps for classifying the pseudo-label dataset based on the pseudo-label generation network are as follows: obtaining candidate box confidence; setting a first threshold and a second threshold based on the candidate box confidence using the pseudo-label generation network; classifying the pseudo-label dataset based on the first threshold and the second threshold to obtain credible pseudo-labels, incorrect pseudo-labels, and... Uncertain pseudo-labels are categorized into reliable pseudo-labels, incorrect pseudo-labels, and uncertain pseudo-labels using a high threshold (first threshold) and a low threshold (second threshold). During training, the teacher network continuously adjusts its parameters to calculate candidate box confidence. If the candidate box confidence is greater than the high threshold, the pseudo-label dataset is labeled as reliable pseudo-labels; if the confidence is less than the low threshold, it is labeled as incorrect pseudo-labels; and if the confidence is greater than or equal to the low threshold but less than or equal to the high threshold, it is labeled as uncertain pseudo-labels. The high and low thresholds are dynamically adjusted based on the distribution of labeled and unlabeled data and the number of iterations. The calculation formula is as follows:
[0071] in, The high threshold for the number of iterations in the k-th round. The low threshold for the number of iterations in the k-th round. The pseudo-label score for the c-th class in the k-th iteration. Let N be the number of labels in class c, counted in the k-th iteration, where α is a parameter used to measure the boundary between unreliable pseudo-labels and reliable labels. u N represents the number of unlabeled data points. l The number of data points marked.
[0072] In the training process of the MFPA-YOLO semi-supervised model, to enhance image classification accuracy, the total loss function of the student network is optimized. This total loss function includes both supervised and semi-supervised loss functions. It consists of the losses from a series of labeled images and the loss from a single unlabeled image, and its calculation formula is: L = L s +ηL u ,
[0073] Where L is the total loss function, L s L is the loss function computed on labeled images, i.e., the supervised loss function. u Let η be the loss function computed on unlabeled images, i.e., the semi-supervised loss function, and let η be the parameter balancing the supervised and semi-supervised loss functions.
[0074] Both semi-supervised and supervised loss functions consist of classification loss (cls), regression loss (reg), and confidence loss (conf). The formula for the supervised loss function is:
[0075] Among them, L s Here, cls is the supervised loss function, reg is the classification loss, conf is the confidence loss, and (h,w) represents the position in the feature map. For the output of the student network, For the generated pseudo-label results, CE is the cross-entropy loss function, and CIoU is the full cross-ratio loss function; the formula for its semi-supervised loss function is:
[0076] Among them, L u For semi-supervised loss functions, For classification loss function, For regression loss function, For confidence loss function, These represent the classification score, regression score, and confidence score of the pseudo-label result at position (h,w) in the feature map, respectively. This is an indicator function that outputs 1 if the condition is met, and 0 otherwise. (h,w) Let (h,w) be the confidence score of the candidate box. (h,w) Let λ1 be the confidence score of the pseudo-label at (h,w), where λ1 is the high threshold and λ2 is the low threshold.
[0077] The MFPA-YOLO semi-supervised model is trained by continuously updating the parameters of the teacher network during training. After performing EMA smoothing on the teacher network parameters, the student network parameters are then updated. The calculation formula is as follows:
[0078] in, Let θ be the parameter value of the student network at step t. t Let be the parameter values of the teacher network at step t. Let be the parameter values of the student network at step t-1, and β be the smoothing factor, which takes values between 0 and 1.
[0079] In some embodiments, in step S103, the remote sensing image of the mangrove forest to be predicted is predicted based on a fully trained MFPA-YOLO semi-supervised model to obtain an initial predicted value of mangrove carbon storage. The remote sensing image of the mangrove forest to be predicted is input into the fully trained MFPA-YOLO semi-supervised model, and the carbon storage of the mangrove forest is predicted by the fully trained MFPA-YOLO semi-supervised model to obtain a preliminary predicted value of mangrove carbon storage. Ecological and environmental indicators are determined, and the predicted value of mangrove carbon storage is determined based on the ecological and environmental indicators and the initial predicted value of mangrove carbon storage. Considering the influence of ecological and environmental indicators on the true value of carbon storage, the predicted value of mangrove carbon storage for each sample plot is calculated in combination with the preliminary predicted value of mangrove carbon storage. The formula for calculating the predicted value of mangrove carbon storage is: C2=C1×f(SS)×f(WL)×f(SW), f(SW) = μ + v × SMI,
[0080] Wherein, C2 is the predicted value of mangrove carbon storage, C1 is the preliminary predicted value of mangrove carbon storage, f(SS) is the soil salinity adjustment factor, f(WL) is the tidal flat water level adjustment factor, f(SW) is the soil moisture adjustment factor, T is the soil salinity of the current measured plot, E is the tidal flat water level of the current measured plot, SMI is the soil moisture index of the current measured plot, T0 and E0 are the optimal salinity and optimal water level for mangrove species ID, respectively, and σ is the salinity variation range parameter. denoted as , where μ and v are the regression coefficients of the moisture adjustment factor, representing the range of tidal flat water level variations.
[0081] As shown in Figure 5, the present invention also provides an electronic device 500, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 500 includes a processor 501, a memory 502, and a display 503. Figure 5 only shows some components of the electronic device 500; however, it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented alternatively.
[0082] In some embodiments, memory 502 may be an internal storage unit of the electronic device 500, such as a hard disk or memory of the electronic device 500. In other embodiments, memory 502 may be an external storage device of the electronic device 500, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 500. Furthermore, memory 502 may include both internal and external storage units of the electronic device 500. Memory 502 is used to store application software and various types of data installed on the electronic device 500, such as program code installed on the electronic device 500. Memory 502 may also be used to temporarily store data that has been output or will be output. In one embodiment, memory 502 stores a mangrove carbon storage prediction program, which can be executed by processor 501 to implement the mangrove carbon storage prediction method of various embodiments of the present invention.
[0083] In some embodiments, processor 501 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 502 or process data, such as a mangrove carbon storage prediction method.
[0084] In some embodiments, display 503 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 503 is used to display identification information from the mangrove carbon storage prediction program and to display a visual user interface. Components 501-503 of electronic device 500 communicate with each other via a system bus.
[0085] In some embodiments, when the processor 501 executes the mangrove carbon storage prediction program in the memory 502, it implements each step of the mangrove carbon storage prediction method as described in the above embodiments. Since the mangrove carbon storage prediction method has been described in detail above, it will not be repeated here.
[0086] Accordingly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps or functions of the mangrove carbon storage prediction method provided in the above-described method embodiments.
[0087] In summary, the mangrove carbon storage prediction method, electronic device, and storage medium provided by this invention acquire remote sensing data and measured data of mangroves, annotate the remote sensing data based on the measured data to construct a mangrove species dataset, and train a constructed MFPA-YOLO semi-supervised model based on the mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, a target detection layer, and an output layer. The target detection layer includes a teacher network, a pseudo-label generation network, and a student network. Based on the fully trained MFPA-YOLO semi-supervised model, predictions are made on the remote sensing images of mangroves to be predicted, obtaining initial predicted values of mangrove carbon storage, determining ecological and environmental indicators, and finally determining the predicted value of mangrove carbon storage based on the ecological and environmental indicators and the initial predicted value of mangrove carbon storage. This improves the efficiency and accuracy of the model.
[0088] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0089] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting carbon storage in mangroves, characterized in that, include: Acquiring remote sensing and measured data of mangroves, and labeling the remote sensing data based on the measured data to construct a mangrove species dataset, wherein the acquisition of remote sensing and measured data of mangroves, and the labeling of the remote sensing data based on the measured data to construct the mangrove species dataset, includes: The total aboveground biomass of the mangrove forest is calculated based on the measured data, and the initial total carbon storage of the mangrove forest is determined based on the total aboveground biomass of the mangrove forest. The measured data includes mangrove species names, diameter at breast height (DBH), tree height, and geographical coordinates of the quadrat. The remote sensing data are labeled based on the mangrove species names, quadrat geographic coordinates, and initial total carbon storage of the mangroves to construct a mangrove species dataset, which includes labeled remote sensing datasets and unlabeled remote sensing datasets. The constructed MFPA-YOLO semi-supervised model is trained based on the mangrove species dataset. The MFPA-YOLO semi-supervised model includes an input layer, an object detection layer, and an output layer. The object detection layer includes a teacher network, a pseudo-label generation network, and a student network. The training of the constructed MFPA-YOLO semi-supervised model based on the mangrove species dataset includes: The mangrove species dataset is input into the MFPA-YOLO semi-supervised model, the teacher network is trained based on the labeled remote sensing dataset, and the parameters of the teacher network are updated to obtain a fully trained teacher network. Based on the fully trained teacher network, predictions are made on the unlabeled remote sensing dataset to obtain a pseudo-labeled dataset; After classifying the pseudo-label dataset based on the pseudo-label generation network, the student network is iteratively trained based on the classified pseudo-label dataset and the unlabeled remote sensing dataset, and the parameters of the student network are updated based on the parameters of the teacher network to obtain a fully trained MFPA-YOLO semi-supervised model. The MFPA-YOLO semi-supervised model is used to predict the mangrove remote sensing image to be predicted, obtain the initial predicted value of mangrove carbon storage, determine the ecological environment indicators, and determine the predicted value of mangrove carbon storage based on the ecological environment indicators and the initial predicted value of mangrove carbon storage.
2. The method for predicting mangrove carbon storage according to claim 1, characterized in that, The formula for calculating the total aboveground biomass of mangroves is: Among them, AGB ID The aboveground biomass of mangroves, ID represents the mangrove species name, DBH i ID H represents the diameter at breast height (DBH) of the i-th tree of a species in a mangrove quadrat. i ID Let be the height of the i-th tree of a species in the mangrove quadrat, and a, b, and c be the coefficients of the species. The formula for calculating the initial total carbon storage of the mangroves is: Carbon ID =0.47×AGB ID , Among them, Carbon ID This represents the initial total carbon storage of mangroves.
3. The method for predicting mangrove carbon storage according to claim 1, characterized in that, The teacher network has the same structure as the student network. The teacher network includes a backbone network layer, a neck fusion layer and a head detection layer. The backbone network layer includes at least a spatial pyramid pooling feature fusion module, a centralized comprehensive convolution module and a first multi-scale feature adaptive fusion module. The neck fusion layer includes at least a path aggregation module and a second multi-scale feature adaptive fusion module. Training the teacher network based on the labeled remote sensing dataset includes: The labeled remote sensing dataset is input into the teacher network, and features are extracted from the labeled remote sensing dataset through the backbone network layer. Specifically, the images of the labeled remote sensing dataset are pooled by the spatial pyramid pooling feature fusion module, and then the pooled images are convolved by the centralized comprehensive convolution module. Finally, the convolved images are adaptively fused by the first multi-scale feature adaptive fusion module to obtain feature maps of multiple scales. The feature maps at multiple scales are input into the neck fusion layer, and the feature maps at multiple scales are fused through the neck fusion layer. Specifically, after the feature maps at multiple scales are fused through the path aggregation module, the fused feature maps at multiple scales are adaptively fused through the second multi-scale feature adaptive fusion module to obtain the feature-fused image. The image after feature fusion is input into the head detection layer, and the head detection layer makes predictions on the image after feature fusion.
4. The method for predicting mangrove carbon storage according to claim 3, characterized in that, The classification of the pseudo-label dataset based on the pseudo-label generation network includes: The confidence scores of candidate boxes are obtained. Based on the confidence scores of candidate boxes, a first threshold and a second threshold are set using the pseudo-label generation network. The pseudo-label dataset is classified based on the first threshold and the second threshold to obtain credible pseudo-labels, erroneous pseudo-labels, and uncertain pseudo-labels.
5. The method for predicting mangrove carbon storage according to claim 3, characterized in that, The step of training the MFPA-YOLO semi-supervised model based on the mangrove species dataset to obtain a fully trained MFPA-YOLO semi-supervised model also includes: The total loss function of the student network is optimized to improve the classification accuracy of images. The total loss function includes a supervised loss function and a semi-supervised loss function.
6. The method for predicting mangrove carbon storage according to claim 1, characterized in that, The ecological environment index comprises a soil salinity adjustment factor, a tidal flat water level adjustment factor, and a soil moisture adjustment factor; and the calculation formula of the mangrove carbon storage prediction value is C2=C1xf(SS)xf(WL)xf(SW), f(SW)=μ+v×SMI, wherein C2 is the predicted value of mangrove carbon storage, C1 is the preliminary predicted value of mangrove carbon storage, f(SS) is the soil salinity adjustment factor, f(WL) is the tidal water level adjustment factor, f(SW) is the soil water adjustment factor, T is the soil salinity of the current measured plot, E is the tidal water level of the current measured plot, SMI is the soil moisture index of the current measured plot, T0, E0 are the optimal salinity and optimal water level of the mangrove species ID, respectively, and σ is the salinity variation range parameter, denoted as , where μ and v are the regression coefficients of the moisture adjustment factor, representing the range of tidal flat water level variations.
7. An electronic device, characterized in that, Including memory and processor; The memory stores a computer-readable program that can be executed by the processor; When the processor executes the computer-readable program, it implements the steps in the mangrove carbon storage prediction method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the mangrove carbon storage prediction method as described in any one of claims 1-6.