Mangrove forest seedling survival rate evaluation method and system based on deep learning
Through the combination of the improved YOLOv8 network model and specific modules, the problems of low efficiency and insufficient accuracy in identifying mangrove seedlings are solved, efficient and accurate identification in complex environments are achieved, and the accuracy of survival rate evaluation is improved.
Patent Information
- Application Number
- CN202510398983.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-01
AI Technical Summary
Traditional mangrove seedling identification and counting methods are inefficient, and it is difficult to accurately identify living mangrove seedlings in complex environments.
Using a deep learning-based method, by acquiring drone data, using the improved YOLOv8 network model, combined with the C2f_SE module, DS_ACmix attention module and C2f_GP module, the digital orthophoto images of the mangrove repair target area were identified and detected, and the bounding box and confidence detection data of the living mangrove seedlings were obtained, and the redundancy and counting were performed through the non-maximum suppression algorithm.
It improves the accuracy and efficiency of identifying live mangrove seedlings, and can accurately extract the characteristics of live mangrove seedlings in complex coastal environments, enhancing the robustness of the model in complex environments.
Smart Images

Figure CN119919838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of forestry surveying and remote sensing technology, and in particular to a mangrove seedling survival rate assessment method and system based on deep learning. Background Art
[0002] Mangroves are important blue carbon ecosystems located in tropical and subtropical areas. They play an important ecological, economic and social value in terms of wind and wave protection, coastline stability, biodiversity maintenance, carbon sequestration and storage, and fishery resources. However, with the intensification of human activities such as urbanization, overdevelopment, and pollution emissions, and the widespread impact of global climate change, mangroves are facing serious threats. With the continuous advancement of the national mangrove protection and restoration project, it is urgent to monitor the restoration status of mangroves, and the survival rate is an important indicator for evaluating the restoration status of mangroves. The survival rate is the percentage of the number of surviving seedlings in the restoration area to the number of designed plantings. The number of surviving mangrove seedlings is an important parameter for calculating the survival rate. Traditional mangrove seedling identification and counting methods rely on manual field surveys, which are inefficient, and some tidal flats that are difficult to reach by vehicles or humans cannot be evaluated. In recent years, drones and artificial intelligence technologies have developed rapidly and have received widespread attention. The object detection algorithm based on deep learning (YOLO series) has made significant progress in the field of image recognition and has been applied in the agricultural field, such as crop disease and pest identification, fruit identification, yield estimation, and crop counting. However, the environment of mangrove restoration areas is complex and the morphological structures of mangrove seedlings vary greatly. Traditional deep learning algorithms for automatic identification of surviving mangrove seedlings have problems such as insufficient small target detection accuracy and high model complexity. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a mangrove seedling survival rate assessment method and system based on deep learning, which can extract the characteristics of surviving mangrove seedlings in a complex coastal environment from UAV data, thereby improving the accuracy and efficiency of identifying surviving mangrove seedlings.
[0004] The first technical solution adopted by the present invention is: a method for assessing the survival rate of mangrove seedlings based on deep learning, comprising the following steps: Obtain visible light images of the target area for mangrove restoration and perform image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration; Based on the YOLOv8 network model, the C2f_SE module, DS_ACmix attention module and C2f_GP module are introduced to build an improved YOLOv8 network model; Based on the improved YOLOv8 network model, the digital orthophoto dataset of the mangrove restoration target area was identified and detected, and the bounding box and confidence detection data of the surviving mangrove seedlings were obtained; The bounding box and confidence detection data of the surviving mangrove seedlings were spliced, and redundancy removal and counting processing were performed using the non-maximum suppression algorithm to obtain the mangrove seedling survival rate assessment results.
[0005] Furthermore, the step of obtaining visible light images of the target area for mangrove restoration and performing image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration specifically includes: Obtain visible light images of mangrove restoration target areas at low tide using drones; Adaptively perform light and color uniformity processing on the visible light image to obtain a visible light image after light and color uniformity; The uniformly lighted and color-homogenized visible light images were subjected to aerial triangulation and orthorectification to obtain a preliminary digital orthophoto of the target area for mangrove restoration. The digital orthophotos of the preliminary mangrove restoration target area were processed by data cropping, data labeling and data amplification in sequence to obtain a digital orthophoto dataset of the mangrove restoration target area.
[0006] Furthermore, the step of performing adaptive light and color homogenization processing on the visible light image to obtain the visible light image after light and color homogenization specifically includes: Based on the visible light image, data screening and processing are performed to divide the visible light image into a template image and an image to be corrected; Convert the template image and the image to be corrected from the RGB color space to the HSV color space to obtain a converted template image and a converted image to be corrected; Based on the converted template image and the converted image to be corrected, the brightness histogram alignment processing and the mean and standard deviation of the hue, and the mean and standard deviation of the saturation are aligned to obtain a preliminary visible light image after uniform light and color; The preliminary uniformly lighted and uniformly colored visible light image is converted back into the RGB color space to obtain a uniformly lighted and uniformly colored visible light image.
[0007] Furthermore, the step of identifying and detecting the digital orthophoto dataset of the mangrove restoration target area based on the improved YOLOv8 network model to obtain the bounding box and confidence detection data of the surviving mangrove seedlings specifically includes: The digital orthophoto dataset of the mangrove restoration target area was input into the improved YOLOv8 network model; Based on the backbone network of the improved YOLOv8 network model, feature extraction and processing were performed on the digital orthophoto dataset of the target area for mangrove restoration, and the digital orthophoto features of the target area for mangrove restoration were obtained. Based on the neck module of the improved YOLOv8 network model, the digital orthophoto features of the target area of mangrove restoration were fused to obtain the multi-scale features of the fused digital orthophotos of the target area of mangrove restoration. Based on the detection head module of the improved YOLOv8 network model, the multi-scale features of the fused digital orthophotos of the target area of mangrove restoration are decoded and predicted to obtain the bounding box and confidence detection data of the surviving mangrove seedlings.
[0008] Furthermore, the backbone network based on the improved YOLOv8 network model performs feature extraction processing on the digital orthophoto dataset of the mangrove restoration target area to obtain the digital orthophoto features of the mangrove restoration target area, which specifically includes: The digital orthophoto dataset of the target area for mangrove restoration is input into the backbone network of the improved YOLOv8 network model, wherein the backbone network includes a Conv module, a C2f_SE module, a DS_ACmix attention module and a SPPF module. The Conv module includes a first Conv module, a second Conv module, a third Conv module, a fourth Conv module and a fifth Conv module. The C2f_SE module includes a first C2f_SE module, a second C2f_SE module, a third C2f_SE module and a fourth C2f_SE module. The DS_ACmix attention module includes a first DS_ACmix attention module. the intention module, the second DS_ACmix attention module, the third DS_ACmix attention module and the fourth DS_ACmix attention module, wherein the first Conv module, the second Conv module, the first C2f_SE module, the first DS_ACmix attention module, the third Conv module, the second C2f_SE module, the second DS_ACmix attention module, the fourth Conv module, the third C2f_SE module, the third DS_ACmix attention module, the fifth Conv module, the fourth C2f_SE module, the fourth DS_ACmix attention module and the SPPF module are connected in sequence; Based on the Conv module of the backbone network, the local features of the digital orthophoto dataset of the mangrove restoration target area are extracted and processed to obtain the local features of the digital orthophoto of the mangrove restoration target area; Based on the C2f_SE module of the backbone network, the local features of the digital orthophotos of the target area of mangrove restoration are enhanced and adaptively recalibrated to obtain the enhanced digital orthophoto features of the target area of mangrove restoration. Based on the DS_ACmix attention module of the backbone network, feature selection is performed on the digital orthophoto features of the enhanced mangrove restoration target area to obtain the digital orthophoto features of the selected mangrove restoration target area; Based on the SPPF module of the backbone network, the digital orthophoto features of the selected mangrove restoration target area are pooled to obtain the digital orthophoto features of the mangrove restoration target area.
[0009] Furthermore, the C2f_SE module based on the backbone network performs feature enhancement and adaptive recalibration processing on the local features of the digital orthophoto of the mangrove restoration target area to obtain the enhanced digital orthophoto features of the mangrove restoration target area. This step specifically includes: Input the local features of the digital orthophoto of the target area of mangrove restoration into the C2f_SE module of the backbone network, wherein the C2f_SE module includes a first convolutional layer, a segmentation layer, a plurality of SEBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first SEBlock module among the plurality of SEBlock modules, the output end of the first SEBlock module is connected to the input end of other SEBlock modules among the plurality of SEBlock modules, the plurality of SEBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the plurality of SEBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer; Based on the first convolution layer of the C2f_SE module, the local features of the digital orthophoto of the mangrove restoration target area are convolved to obtain the local features of the digital orthophoto of the mangrove restoration target area after convolution; Based on the segmentation layer of the C2f_SE module, the local features of the digital orthophoto of the mangrove restoration target area after convolution are segmented to obtain several local sub-features of the digital orthophoto of the mangrove restoration target area; Based on several SEBlock modules of the C2f_SE module, feature adaptive recalibration is performed on the local sub-features of the digital orthophotos of several mangrove restoration target areas to obtain the sub-features of the digital orthophotos of several mangrove restoration target areas; Based on the connection layer of the C2f_SE module, feature splicing was performed on the digital orthophoto sub-features of several mangrove restoration target areas to obtain preliminary digital orthophoto features of the mangrove restoration target areas. Based on the second convolutional layer of the C2f_SE module, the digital orthophoto features of the preliminary mangrove restoration target area are convolved to obtain the enhanced digital orthophoto features of the mangrove restoration target area.
[0010] Furthermore, the DS_ACmix attention module based on the backbone network performs feature selection on the enhanced digital orthophoto features of the mangrove restoration target area to obtain the selected digital orthophoto features of the mangrove restoration target area. This step specifically includes: Input the enhanced digital orthophoto features of the mangrove restoration target area into the DS_ACmix attention module of the backbone network, wherein the DS_ACmix attention module includes an input layer, a first deep convolution layer, a second deep convolution layer, a third deep convolution layer, a first point convolution, a second point convolution, a third point convolution and an ACmix module, wherein the output end of the input layer is connected to the input ends of the first deep convolution layer, the second deep convolution layer and the third deep convolution layer respectively, the output end of the first deep convolution layer is connected to the input end of the first point convolution, the output end of the second deep convolution layer is connected to the input end of the second point convolution, the output end of the third deep convolution layer is connected to the input end of the third point convolution, and the output ends of the first point convolution, the second point convolution and the third point convolution are all connected to the input end of the ACmix module; Based on the input layer of the DS_ACmix attention module, the enhanced digital orthophoto features of the mangrove restoration target area are input; Based on the first deep convolution layer, the second deep convolution layer and the third deep convolution layer of the DS_ACmix attention module, the digital orthophoto features of the enhanced mangrove restoration target area are subjected to deep convolution processing to obtain the first deep features of the digital orthophoto, the second deep features of the digital orthophoto and the third deep features of the digital orthophoto; Based on the first point convolution, the second point convolution and the third point convolution of the DS_ACmix attention module, the deep features of the first digital orthophoto, the deep features of the second digital orthophoto and the deep features of the third digital orthophoto are processed by point convolution respectively to obtain the deep features of the multi-scale digital orthophoto to be fused; The ACmix module based on the DS_ACmix attention module performs multi-scale fusion processing on the deep features of the fused multi-scale digital orthophotos to obtain the digital orthophoto features of the selected mangrove restoration target area.
[0011] Furthermore, the neck module based on the improved YOLOv8 network model performs feature fusion processing on the digital orthophoto features of the mangrove restoration target area to obtain the fused multi-scale features of the digital orthophoto of the mangrove restoration target area. This step specifically includes: Input the digital orthophoto features of the mangrove restoration target area into the neck module of the improved YOLOv8 network model, wherein the neck module includes an Upsample module, a Concat module, a C2f_GP module and a Conv module, the Upsample module includes a first Upsample module and a second Upsample module, the Concat module includes a first Concat module, a second Concat module, a third Concat module and a fourth Concat module, the C2f_GP module includes a first C2f_GP module, a second C2f_GP module, a third C2f_GP module and a fourth C2f_GP module, and the Conv module includes a sixth Conv module and a seventh Conv module, wherein the first Upsample module, the first Concat module, the first C2f_GP module, the second Upsample module, the second Concat module, the second C2f_GP module, the sixth Conv module, the third Concat module, the third C2f_GP module, the seventh Conv module, the fourth Concat module and the fourth C2f_GP module are connected in sequence; The Concat module based on the neck module is used to stitch the digital orthophoto features of the mangrove restoration target area to obtain the digital orthophoto features after preliminary stitching; Based on the Upsample module of the neck module, the features of the digital orthophoto after preliminary splicing are interpolated to obtain the features of the interpolated digital orthophoto; The Conv module based on the neck module performs convolution processing on the interpolated digital orthophoto features to obtain the convolved digital orthophoto features; Based on the C2f_GP module of the neck module, the convolutional digital orthophoto features are processed by group convolution and feature fusion to obtain the multi-scale features of the fused digital orthophoto of the target area of mangrove restoration.
[0012] Furthermore, the C2f_GP module based on the neck module performs group convolution and feature fusion processing on the convolved digital orthophoto features to obtain the fused multi-scale features of the digital orthophoto of the mangrove restoration target area, which specifically includes: Input the convolutional digital orthophoto features to the C2f_GP module of the neck module, wherein the C2f_GP module includes a first convolutional layer, a segmentation layer, a plurality of GPBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first GPBlock module among the plurality of GPBlock modules, the output end of the first GPBlock module is further connected to the input ends of other GPBlock modules among the plurality of GPBlock modules, the plurality of GPBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the plurality of GPBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer; Based on the first convolution layer of the C2f_GP module, the convolution processing is performed on the convolution digital orthophoto features to obtain the convolution digital orthophoto features; Based on the segmentation layer of the C2f_GP module, the convolutional digital orthophoto features are segmented to obtain several digital orthophoto sub-features; Based on several GPBlock modules of C2f_GP module, multi-level feature optimization processing is performed on several digital orthophoto sub-features to obtain several optimized digital orthophoto sub-features; Based on the connection layer of the C2f_GP module, several optimized digital orthophoto sub-features are spliced to obtain the digital orthophoto features of the mangrove restoration target area after preliminary splicing; Based on the second convolutional layer of the C2f_GP module, convolution processing is performed on the digital orthophoto features of the mangrove restoration target area after preliminary splicing to obtain the digital orthophoto features of the mangrove restoration target area after splicing.
[0013] The second technical solution adopted by the present invention is: a mangrove seedling survival rate assessment system based on deep learning, comprising: The first module is used to obtain visible light images of the target area for mangrove restoration and perform image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration; The second module is used to build an improved YOLOv8 network model based on the YOLOv8 network model by introducing the C2f_SE module, the DS_ACmix attention module and the C2f_GP module; The third module is used to identify and detect the digital orthophoto dataset of the mangrove restoration target area based on the improved YOLOv8 network model, and obtain the bounding box and confidence detection data of the surviving mangrove seedlings; The fourth module is used to splice the bounding box and confidence detection data of the surviving mangrove seedlings, and perform redundancy removal and counting processing through the non-maximum suppression algorithm to obtain the mangrove seedling survival rate assessment results.
[0014] The beneficial effects of the method and system of the present invention are as follows: the present invention obtains visible light images of the target area of mangrove restoration and performs image preprocessing, and then introduces the C2f_SE module, the DS_ACmix attention module and the C2f_GP module to construct an improved YOLOv8 network model. The computational efficiency of the model is improved by the C2f_SE module and the C2f_GP dual-path module, and the attention module DS_ACmix is embedded after each level of feature extraction layer. By dynamically adjusting the feature weights layer by layer, progressive optimization from local details to global semantics is achieved, the small target detection capability is improved, the robustness of the model in complex environments is improved, background noise is suppressed, and the target subject is highlighted. Finally, based on the improved YOLOv8 network model, the digital orthophotos of the target area of mangrove restoration are used to identify and detect surviving mangrove seedlings, and the non-maximum suppression algorithm is used to remove redundancy and count the spliced detection data, so that the characteristics of surviving mangrove seedlings in the complex coastal environment background can be extracted from the drone data, and the accuracy and efficiency of identifying surviving mangrove seedlings are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of the steps of a method for assessing the survival rate of mangrove seedlings based on deep learning of the present invention; Figure 2 It is a structural block diagram of a mangrove seedling survival rate assessment system based on deep learning of the present invention; Figure 3 It is a schematic diagram of a survival rate assessment process of mangrove seedlings provided by a specific embodiment of the present invention; Figure 4 is a schematic diagram of a method for cropping overlapping digital orthophotos provided by a specific embodiment of the present invention; Figure 5 It is a schematic diagram of the improved YOLOv8 neural network structure provided by a specific embodiment of the present invention; Figure 6 It is a schematic diagram of the structure of a C2f_SE module provided in a specific embodiment of the present invention; Figure 7 It is a schematic diagram of the structure of a SEBlock module provided in a specific embodiment of the present invention; Figure 8 It is a schematic diagram of the structure of a SCAM module provided by a specific embodiment of the present invention; Fig. 9 It is a schematic diagram of the ECS module structure provided by a specific embodiment of the present invention; Fig.10is a schematic diagram of the structure of a DS_ACmix module provided in a specific embodiment of the present invention; Fig.11 It is a schematic diagram of the structure of a C2f_GP module provided in a specific embodiment of the present invention; Fig.12 It is a schematic diagram of the GPBlock module structure provided by a specific embodiment of the present invention; Fig.13 It is a schematic diagram of the structure of the MDConvModule module provided in a specific embodiment of the present invention; Fig.14 It is a schematic diagram of the extraction results of surviving mangrove seedlings provided by a specific embodiment of the present invention; Fig.15 It is a coordinate conversion diagram provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0016] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0017] Reference Figure 1 and Figure 3 The present invention provides a method for assessing the survival rate of mangrove seedlings based on deep learning, the method comprising the following steps: S100, obtaining visible light images of the target area for mangrove restoration and performing image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration; Specifically, the visible light images of the target area for mangrove restoration at low tide were obtained by using drones; the visible light images were adaptively homogenized to obtain the homogenized visible light images; the homogenized visible light images were subjected to aerial triangulation and orthorectification to obtain preliminary digital orthophotos of the target area for mangrove restoration; the preliminary digital orthophotos of the target area for mangrove restoration were subjected to data cropping, data labeling and data amplification in sequence to obtain a digital orthophoto dataset of the target area for mangrove restoration.
[0018] Among them, it should be noted that the process of adaptive light and color uniformity processing is to perform data screening processing based on the visible light image, and divide the visible light image into a template image and an image to be corrected; convert the template image and the image to be corrected from the RGB color space to the HSV color space to obtain the converted template image and the converted image to be corrected; based on the converted template image and the converted image to be corrected, perform brightness histogram alignment processing and hue mean and standard deviation alignment processing, saturation mean and standard deviation alignment processing to obtain a preliminary visible light image after light and color uniformity; convert the preliminary visible light image after light and color uniformity back to the RGB color space to obtain a visible light image after light and color uniformity.
[0019] In this embodiment, data collection is first performed by using a drone with GPS RTK and a mapping aerial mode to collect low-tide visible light images of the target area for mangrove restoration. The heading overlap is 60%-80%, the lateral overlap is 60%-80%, and the spatial resolution of the drone images is better than 5 cm.
[0020] Further data preprocessing is performed, first of all, image adaptive light and color balancing is performed. UAV photography may cause inconsistent colors of the same batch of drone photos due to changes in lighting conditions, etc., and the original drone photos need to be adaptively light and color balancing. The embodiment of the present invention obtains the image after light and color balancing through color space conversion, histogram matching, and linear transformation.
[0021] First, select a drone photo with clear, bright, and detailed imaging from the same batch of drone photos collected as the template image, and the remaining drone photos as the images to be corrected. Convert all images from the RGB color space to the HSV color space to obtain the hue (H), saturation (S), and brightness (V) data of each image. For each image to be corrected, calculate the brightness histogram of the image to be corrected, and use histogram matching to adjust the brightness distribution of the image to be corrected to be consistent with the template image; calculate the mean and standard deviation of the hue of the image to be corrected, and the mean and standard deviation of the saturation, and use linear transformation to make its mean and standard deviation consistent with the mean and standard deviation of the template image. The expression is: ; in, are the adjusted hue and saturation values of the image to be corrected, are the hue and saturation values of the original image to be corrected, and are the standard deviation and mean of the image hue to be corrected, and are the standard deviation and mean of the template image hue, and are the standard deviation and mean of the saturation of the image to be corrected, and are the standard deviation and mean of the template image saturation, respectively.
[0022] The adjusted brightness, hue and saturation components of the image to be corrected are combined and converted back to the RGB color space to obtain the final image after uniform light and color. The images used in the training, verification and testing stages of the embodiment of the present invention need to be processed by adaptive uniform light and color.
[0023] Further, digital orthophoto acquisition is performed, and aerial triangulation and orthophoto correction processing are performed based on the drone image of the mangrove restoration target area after uniform light and color, so as to obtain a preliminary digital orthophoto of the mangrove restoration target area. In this embodiment, aerial triangulation and orthophoto correction can be processed using drone data processing software such as DJI Zhitu or Pix4D.
[0024] Finally, the data set is made. First, the image is cropped, such as Figure 4 As shown, UAV digital orthophotos have high resolution, occupy a lot of memory, and have high computational cost for deep learning. To save the time cost of model training, this example crops large-size digital orthophotos into small-size sub-image blocks for training, verification, and testing.
[0025] First, non-overlap cropping is performed. Non-overlap cropping is used to generate images for the training set and the validation set. Cropping is performed in a grid manner, that is, there is no overlap between adjacent sub-images. In this embodiment, the size of the cropped sub-image block is 640 640.
[0026] Then, overlapping cropping is performed, which is used to generate images in the test set. Image cropping may cause some mangrove seedlings to be cropped into different parts, resulting in large errors in the number of mangrove seedlings. Overlapping cropping can help use redundancy removal algorithms in subsequent plant number statistics to improve the accuracy of plant number statistics. Among them, the horizontal overlap and vertical overlap of overlapping cropping are respectively and The recommended overlap range is 20% to 30%. In this embodiment, the size of the cropped sub-image block is 640 640. If the image size is smaller than 640×640, it will be expanded to this size using zero padding.
[0027] The digital orthophotos of the mangrove restoration target area prepared for model training and verification after data preprocessing were cropped into sub-image blocks of the same size, and the cropping was performed using the non-overlap cropping method. The sub-image blocks containing at least one complete surviving mangrove seedling were selected, and then the surviving mangrove seedlings in the sub-image blocks were marked using the image marking tool. The location and border size of the surviving mangrove seedlings and other information were stored in a txt file in YOLO format. 2 / 3 to 5 / 6 of the image blocks in the dataset were used for training to obtain the training set, and the remaining image blocks were used as the verification set. For the image blocks in the training set, the dataset was expanded through seven common operations: rotation, flipping, brightness adjustment, contrast adjustment, mosaic, adding noise, and saturation adjustment.
[0028] For the test set, the digital orthophotos were cropped using overlapping cropping to reduce the missed detection of mangrove seedlings on the edge. The size of the sub-image block is , for the boundary case, the size of the sub-image block in the last row or column may be smaller than , then use zero-filling to ensure that the size of the last row or column of the sub-image is .
[0029] S200, based on the YOLOv8 network model, introduce the C2f_SE module, DS_ACmix attention module and C2f_GP module to build an improved YOLOv8 network model; Specifically, Figure 5 As shown, the improved YOLOv8 network model includes a backbone network, a neck module and a detection head module.
[0030] Among them, the backbone network includes a Conv module, a C2f_SE module, a DS_ACmix attention module and an SPPF module, the Conv module includes a first Conv module, a second Conv module, a third Conv module, a fourth Conv module and a fifth Conv module, the C2f_SE module includes a first C2f_SE module, a second C2f_SE module, a third C2f_SE module and a fourth C2f_SE module, and the DS_ACmix attention module includes a first DS_ACmix attention module, a second DS_ACmix attention module, a third DS_ACmix attention module and a fourth DS_ACmix attention module, wherein the first Conv module, the second Conv module, the first C2f_SE module, the first DS_ACmix attention module, the third Conv module, the second C2f_SE module, the second DS_ACmix attention module, the fourth Conv module, the third C2f_SE module, the third DS_ACmix attention module, the fifth Conv module, the fourth C2f_SE module, the fourth DS_ACmix attention module and the SPPF module are connected in sequence.
[0031] It should also be noted that Figure 6 The C2f_SE module includes a first convolutional layer, a segmentation layer, several SEBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first SEBlock module among the several SEBlock modules, the output end of the first SEBlock module is connected to the input end of other SEBlock modules among the several SEBlock modules, the several SEBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the several SEBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer.
[0032] Further, if Figure 7 As shown, the SEBlock module includes an input layer, a SCAM channel attention module, an ECS module, a residual connection module and an output layer, wherein the input layer, the SCAM channel attention module, the ECS module, the residual connection module and the output layer are connected in sequence.
[0033] Further, if Figure 8As shown, the SCAM channel attention module includes an input layer, an AdaptiveAvgPool2d layer, a Flatten layer, a Linear layer + ReLU6 layer, a Linear layer, a Hardsigmoid layer and a feature scaling layer, wherein the input layer, the AdaptiveAvgPool2d layer, the Flatten layer, the Linear layer + ReLU6 layer, the Linear layer, the Hardsigmoid layer and the feature scaling layer are connected in sequence, and in addition, the other output end of the input layer is also connected to the input end of the feature scaling layer.
[0034] Further, if Fig. 9 As shown, the ECS module includes an input layer, a segmentation layer, a 3×3 deep convolution layer, a first batch of normalization layers, a SiLU layer, a 1×1 point convolution layer, a second batch of normalization layers, a connection layer, a residual connection layer and an output layer, wherein the output end of the input layer is connected to the input end of the segmentation layer, the output end of the segmentation layer is respectively connected to the input end of the 3×3 deep convolution layer and the input end of the 1×1 point convolution layer, the 3×3 deep convolution layer, the first batch of normalization layers and the SiLU layer are connected in sequence, the 1×1 point convolution layer is connected to the second batch of normalization layers, the output end of the SiLU layer and the output end of the second batch of normalization layers are both connected to the input end of the connection layer, the connection layer, the residual connection layer and the output layer are connected in sequence, and the other output end of the input layer is also connected to the input end of the residual connection layer.
[0035] Further, such as Fig.10 As shown, the DS_ACmix attention module includes an input layer, a 3×3 first depth convolution layer, a 5×5 second depth convolution layer, a 7×7 third depth convolution layer, a 1×1 first point convolution, a 1×1 second point convolution, a 1×1 third point convolution and an ACmix module, wherein the output end of the input layer is respectively connected to the input ends of the 3×3 first depth convolution layer, the 5×5 second depth convolution layer, and the 7×7 third depth convolution layer, the output end of the 3×3 first depth convolution layer is connected to the input end of the 1×1 first point convolution, the output end of the 5×5 second depth convolution layer is connected to the input end of the 1×1 second point convolution, the output end of the 7×7 third depth convolution layer is connected to the input end of the 1×1 third point convolution, and the output ends of the 1×1 first point convolution, the 1×1 second point convolution, and the 1×1 third point convolution are all connected to the input end of the ACmix module.
[0036] The neck module includes an Upsample module, a Concat module, a C2f_GP module and a Conv module, the Upsample module includes a first Upsample module and a second Upsample module, the Concat module includes a first Concat module, a second Concat module, a third Concat module and a fourth Concat module, the C2f_GP module includes a first C2f_GP module, a second C2f_GP module, a third C2f_GP module and a fourth C2f_GP module, and the Conv module includes a sixth Conv module and a seventh Conv module, wherein the first Upsample module, the first Concat module, the first C2f_GP module, the second Upsample module, the second Concat module, the second C2f_GP module, the sixth Conv module, the third Concat module, the third C2f_GP module, the seventh Conv module, the fourth Concat module and the fourth C2f_GP module are connected in sequence.
[0037] Among them, Fig.11 As shown, the C2f_GP module includes a first convolutional layer, a segmentation layer, several GPBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first GPBlock module among the several GPBlock modules, the output end of the first GPBlock module is connected to the input ends of other GPBlock modules among the several GPBlock modules, the several GPBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the several GPBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer.
[0038] Among them, Fig.12 As shown, the GPBlock module includes a first-level MDConvModule module and a second-level MDConvModule module.
[0039] In addition, if Fig.13 The MDConvModule module includes an input layer, a 3×3 group of convolution layers, a first batch of normalization layers, a first SiLU layer, a 1×1 point convolution layer, a second batch of normalization layers, a second SiLU layer and an output layer, wherein the input layer, the 3×3 group of convolution layers, the first batch of normalization layers, the first SiLU layer, the 1×1 point convolution layer, the second batch of normalization layers, the second SiLU layer and the output layer are connected in sequence.
[0040] The detection head module includes a first Detect module, a second Detect module and a third Detect module.
[0041] S300, based on the improved YOLOv8 network model, the digital orthophoto dataset of the mangrove restoration target area was identified and detected to obtain the bounding box and confidence detection data of the surviving mangrove seedlings; S310, inputting the digital orthophoto dataset of the mangrove restoration target area into the improved YOLOv8 network model; S320, based on the backbone network of the improved YOLOv8 network model, feature extraction processing is performed on the digital orthophoto dataset of the mangrove restoration target area to obtain the digital orthophoto features of the mangrove restoration target area; Specifically, the digital orthophoto dataset of the target area of mangrove restoration is input into the backbone network based on the improved YOLOv8 network model; the Conv module based on the backbone network performs local feature extraction on the digital orthophoto of the target area of mangrove restoration to obtain the local features of the digital orthophoto of the target area of mangrove restoration; the C2f_SE module based on the backbone network performs feature enhancement and adaptive recalibration on the local features of the digital orthophoto of the target area of mangrove restoration to obtain the enhanced digital orthophoto features of the target area of mangrove restoration; the DS_ACmix attention module based on the backbone network performs feature selection on the enhanced digital orthophoto features of the target area of mangrove restoration to obtain the selected digital orthophoto features of the target area of mangrove restoration; the SPPF module based on the backbone network performs pooling on the selected digital orthophoto features of the target area of mangrove restoration to obtain the digital orthophoto features of the target area of mangrove restoration.
[0042] It should be noted that the backbone network in the embodiment of the present invention optimizes and replaces the original C2f module with the C2f_SE module, and embeds the DS_ACmix attention module after each level of feature extraction layer. The improved backbone network consists of different convolutions, C2f_SE modules, DS_ACmix attention modules, and SPPF modules to optimize feature extraction and computational efficiency.
[0043] Among them, for the C2f_SE module, its data processing process includes: inputting the local features of the digital orthophoto of the mangrove restoration target area into the C2f_SE module of the backbone network; based on the first convolution layer of the C2f_SE module, performing convolution processing on the local features of the digital orthophoto of the mangrove restoration target area to obtain the local features of the digital orthophoto of the mangrove restoration target area after convolution; based on the segmentation layer of the C2f_SE module, performing segmentation processing on the local features of the digital orthophoto of the mangrove restoration target area after convolution to obtain several local sub-features of the digital orthophoto of the mangrove restoration target area; based on the C2f_S Several SEBlock modules of the E module perform feature adaptive recalibration on local sub-features of digital orthophotos of several mangrove restoration target areas to obtain digital orthophoto sub-features of several mangrove restoration target areas; based on the connection layer of the C2f_SE module, feature splicing is performed on the digital orthophoto sub-features of several mangrove restoration target areas to obtain preliminary digital orthophoto features of the mangrove restoration target areas; based on the second convolutional layer of the C2f_SE module, convolution processing is performed on the preliminary digital orthophoto features of the mangrove restoration target areas to obtain enhanced digital orthophoto features of the mangrove restoration target areas.
[0044] Specifically, the Bottleneck submodule in the original C2f module is optimized and replaced with the SEBlock submodule. The SEBlock submodule realizes adaptive calibration of feature channels by introducing the SCAM channel attention module, uses linear layers and Hardsigmoid activation functions to enhance channel attention, and improves feature processing efficiency through the ECS module. The ECS module combines grouped convolution and depthwise separable convolution, and further optimizes feature expression through batch normalization and SiLU activation. After global average pooling, the SEBlock module enhances channel attention through a fully connected layer, and finally concatenates and fuses multi-stage features to optimize computational efficiency and feature expression capabilities.
[0045] Furthermore, the C2f_SE module is used to expand the original input channel number to the target output channel dimension through a 1×1 convolution layer based on the multi-level expression requirements of the input mangrove restoration target area image feature map, generate an extended feature map of C×H×W dimensions, and then evenly divide it into two sub-feature maps with the same number of channels along the channel dimension; the second sub-feature map is sequentially input into a preset number of SEBlock modules for n iterative optimization processing, and each iteration generates an intermediate feature map of C / 2×H×W dimensions and retains it to the feature sequence; the feature fusion strategy specifically includes: sequentially connecting the first sub-feature map of the initial segmentation, the n intermediate feature maps generated by the second sub-feature map after n iterations, and the optimization results output by each SEBlock module along the channel dimension to form a stacked feature map of (n+2)×C / 2×H×W dimensions; finally, the stacked feature map is channel compressed and nonlinearly mapped through a 1×1 convolution layer, and a C×H×W dimensional image feature map of the mangrove restoration target area is output. The process is detailed as follows: the input feature map is expanded to C×H×W dimensions through 1×1 convolution, divided into two C / 2×H×W sub-feature maps, the second sub-feature is generated by n SEBlock modules to generate n C / 2×H×W intermediate features, the initial sub-feature and all intermediate features are connected and compressed to C×H×W dimensions through 1×1 convolution and output.
[0046] Furthermore, the SEBlock module in the C2f_SE module is used to generate channel attention weights through the SCAM channel attention module to calibrate the features based on the channel and spatial correlation characteristics of the input mangrove restoration target area image feature map, and then input the calibrated features into the ECS module for channel reorganization optimization, and then process them through the residual connection module; the residual connection condition judgment logic includes: if the number of input and output channels is equal, the processed feature map is added element by element to the original input, otherwise the processing result is directly output. The processing flow is: the input feature map of C×H×W dimensions is generated into a channel-weighted feature map through the SCAM channel attention module, and then the channel is reorganized through the ECS module and the number of channels is adjusted through the 1×1 convolution layer, and finally the residual features are superimposed and output.
[0047] The SCAM channel attention module in the SEBlock module is used to compress the spatial dimension to 1×1 through the AdaptiveAvgPool2d layer based on the global channel statistics of the input mangrove restoration target area image feature map, generate a channel description vector, and then input the flattened vector into the dimension reduction linear layer for feature compression through the Flatten layer and the Linear layer, and then enhance the nonlinear expression ability through the ReLU6 activation function, and then restore the original channel dimension through the dimension increase Linear layer, and finally generate a normalized channel weight mask through the Hardsigmoid activation function, and the weight mask is multiplied by the original input feature map by channel-by-channel multiplication to generate a calibrated output feature map. The processing flow includes: compressing the input feature map of C×H×W dimensions into a channel statistics vector of C×1×1 through global average pooling, and then inputting it into a perceptron composed of two linear layers to perform channel dimension compression and then restoration operations, and finally generating a channel attention weight of C×1×1 dimensions, which is multiplied by the original input feature map channel by channel to achieve feature calibration.
[0048] The specific calculation process of the SCAM channel attention module is: ; in, is the global average pooling, and is the linear layer for dimensionality reduction and dimensionality increase, for Activation function, for Activation function, represents the channel-wise product, is the input feature map, is the output feature map.
[0049] The ECS module in the SEBlock module is used to divide the channels into two sub-feature groups, deep and shallow, based on the channel distribution characteristics of the input mangrove restoration target area image feature map by a preset segmentation ratio of 1 / 4, wherein the number of channels of the shallow sub-feature group is calculated by multiplying the preset segmentation ratio by the total number of channels, i.e., 1 / 4C; a 3×3 deep convolution is applied to the shallow sub-feature group for local feature extraction, and then a batch normalization layer is used to enhance nonlinearity through the SiLU activation function; a 1×1 point-by-point convolution is applied to the deep sub-feature group for global context fusion, and then a batch normalization module is used for processing; then the two sub-feature maps are connected along the channel dimension and the original input feature map is superimposed for residual connection, and finally output. The processing flow includes: dividing the input feature map of C×H×W dimension into two sub-feature maps of 1 / 4C×H×W and 3 / 4C×H×W along the channel dimension, performing 3×3 deep convolution processing on the shallow sub-feature map, stabilizing the training process through a batch normalization layer after the convolution operation, and introducing nonlinear expression ability through a SiLU activation function; performing point convolution processing on the deep sub-feature map, standardizing the output through a batch normalization layer after the convolution operation, and finally connecting the two sub-feature maps along the channel dimension and superimposing the original input feature map to form a residual connection, and finally outputting.
[0050] The specific calculation process of the ECS module is: ; in is the grouped depthwise convolution, is point-wise convolution, is the split ratio, for Activation function, Indicates channel splicing, is the input feature map, is the output feature map, is the depthwise convolution, is point-wise convolution, It is batch normalization.
[0051] Furthermore, for the DS_ACmix attention module, its data processing process includes: inputting the enhanced digital orthophoto features of the mangrove restoration target area into the DS_ACmix attention module of the backbone network; based on the input layer of the DS_ACmix attention module, obtaining the enhanced digital orthophoto features of the mangrove restoration target area; based on the 3×3 first deep convolution layer, 5×5 second deep convolution layer and 7×7 third deep convolution layer of the DS_ACmix attention module, performing deep convolution processing on the enhanced digital orthophoto features of the mangrove restoration target area, respectively, to obtain the first digital orthophoto deep convolution layer. The deep features of the first digital orthophoto, the deep features of the second digital orthophoto and the deep features of the third digital orthophoto are respectively processed by point convolution based on the 1×1 first point convolution, 1×1 second point convolution and 1×1 third point convolution of the DS_ACmix attention module to obtain the deep features of the multi-scale digital orthophoto to be fused; the ACmix module based on the DS_ACmix attention module performs multi-scale fusion processing on the deep features of the multi-scale digital orthophoto to be fused to obtain the digital orthophoto features of the selected mangrove restoration target area.
[0052] The DS_ACmix module introduces multi-scale depthwise separable convolution based on the original ACmix architecture. It captures local features through parallel 3×3, 5×5, and 7×7 convolution kernels, and the output features are weighted fused to better capture spatial information of different scales, thereby improving the performance of the model.
[0053] The DS_ACmix module performs 3×3, 5×5, and 7×7 kernel deep convolution operations on the input mangrove restoration target area image feature map, generating three C×H×W dimensional deep feature maps; then performs 1×1 point-by-point convolution on each deep feature map to generate three C×H×W dimensional multi-scale feature maps; finally, the three feature maps are added to generate an enhanced feature map that integrates multi-scale information, and then input into the ACMix module to obtain the output mangrove restoration target area image feature map. The multi-scale deep separable convolution branch in the DS_ACmix module is used to extract local features under different receptive fields in parallel based on the spatial multi-scale features of the input mangrove restoration target area image feature map through deep separable convolutions of three kernel sizes of 3×3, 5×5, and 7×7, and then the output feature maps of the three branches are added and fused element by element; the deep separable convolution is composed of a deep convolution layer and a point-by-point convolution layer connected in series.
[0054] The specific calculation process of the DS_ACmix module is: ; in, is the input feature map, is the output feature map, The kernel size is The depth convolution of is point-wise convolution, Represents a convolution operation.
[0055] S330, based on the neck module of the improved YOLOv8 network model, feature fusion processing is performed on the digital orthophoto features of the mangrove restoration target area to obtain the fused multi-scale features of the digital orthophoto of the mangrove restoration target area; Specifically, the digital orthophoto features of the target area of mangrove restoration are input into the neck module of the improved YOLOv8 network model; based on the Concat module of the neck module, the digital orthophoto features of the target area of mangrove restoration are spliced to obtain the preliminary spliced digital orthophoto features; based on the Upsample module of the neck module, the preliminary spliced digital orthophoto features are interpolated to obtain the interpolated digital orthophoto features; based on the Conv module of the neck module, the interpolated digital orthophoto features are convoluted to obtain the convoluted digital orthophoto features; based on the C2f_GP module of the neck module, the convolved digital orthophoto features are grouped and convolved and feature fused to obtain the fused multi-scale features of the digital orthophoto of the target area of mangrove restoration.
[0056] Among them, for the C2f_GP module, its data processing process is as follows: inputting the convolved digital orthophoto features into the C2f_GP module of the neck module; based on the first convolution layer of the C2f_GP module, convolution processing is performed on the convolved digital orthophoto features to obtain the convolved digital orthophoto features; based on the segmentation layer of the C2f_GP module, the convolutional digital orthophoto features are segmented to obtain a number of digital orthophoto sub-features; based on a number of GPBlock modules of the C2f_GP module, multi-level feature optimization processing is performed on a number of digital orthophoto sub-features to obtain a number of optimized digital orthophoto sub-features; based on the connection layer of the C2f_GP module, splicing processing is performed on the optimized number of digital orthophoto sub-features to obtain the digital orthophoto features of the mangrove restoration target area after preliminary splicing; based on the second convolution layer of the C2f_GP module, convolution processing is performed on the digital orthophoto features of the mangrove restoration target area after preliminary splicing to obtain the digital orthophoto features of the mangrove restoration target area after splicing.
[0057] In this embodiment, the C2f_GP dual-path module is used to replace the standard C2f to optimize the transmission and fusion effect of feature information. The Bottleneck submodule in the original C2f module is optimized and replaced with the GPBlock submodule. The C2f_GP module adopts a dual-path convolution structure. The main path is composed of grouped convolution and point-by-point convolution in series, aiming to effectively reduce the amount of calculation and improve the feature expression ability. The auxiliary path is connected across layers through the GPBlock submodule. Each GPBlock submodule is composed of two MDConvModule submodules, and the number of input and output channels is kept consistent, thereby optimizing the feature transfer efficiency. The MDConvModule submodule includes grouped convolution, point-by-point convolution, batch normalization, and activation functions, aiming to improve the feature extraction capability through multi-level convolution operations and inter-channel information fusion. The C2f_GP module further enhances the performance of the model through hierarchical processing and feature fusion.
[0058] The C2f_GP module is used to divide the channel distribution characteristics of the input mangrove restoration target area image feature map into two equal-channel sub-feature maps through a 1×1 convolution layer, and then the second sub-feature map is sequentially processed by n GPBlock modules for multi-level feature optimization; finally, all intermediate feature maps are connected with the initial sub-feature map along the channel dimension and the number of channels is compressed by 1×1 convolution. The processing flow includes: expanding the number of channels of the input feature map through a 1×1 convolution layer and generating an expanded feature map, then performing channel segmentation on the expanded feature map of C×H×W dimensions to generate two sub-feature maps of C / 2×H×W dimensions; the second sub-feature map is processed by n GPBlock modules to generate n optimized feature maps of C / 2×H×W dimensions; finally, the initial sub-feature map and all optimized feature maps are connected to form (n+2) C / 2×H×W fusion feature maps, and compressed to the target channel dimension through 1×1 convolution.
[0059] The GPBlock module in the C2f_GP module is used to expand the input channel to the hidden channel dimension through the first-level MDConvModule module based on the channel dimension of the input mangrove restoration target area image feature map, and then compress the hidden channel to the target output channel dimension through the second-level MDConvModule module; finally, the residual features are selectively superimposed according to the channel consistency condition of the input feature map and the output feature map. The processing flow includes: the original feature map is processed by two MDConvModule modules in series to generate a new feature map of C×H×W dimensions; if the number of input and output channels is equal, the original feature map and the new feature map are added element by element to generate the final output, otherwise the new feature map is directly output.
[0060] The MDConvModule module in the GPBlock module is used to extract spatial features through the grouped convolution layer based on the channel features of the input mangrove restoration target area image feature map, and then perform batch normalization on the extracted features, generate an intermediate feature map through the SiLU activation function, and then input the point-by-point convolution layer for channel dimension fusion, and then perform batch normalization again and generate the final output mangrove restoration target area image feature map through the SiLU activation function. The processing flow includes: inputting the input feature map of C×H×W dimensions into the 3×3 grouped convolution layer, and then performing batch normalization, and generating an intermediate feature map of C×H×W dimensions through the SiLU activation function; then performing feature fusion on the channel dimension on the intermediate feature map through the point-by-point convolution layer, performing batch normalization on the output of the point-by-point convolution, and generating an output feature map of C×H×W dimensions through the SiLU activation function.
[0061] The specific calculation process of the MDConvModule module is: ; in, is the input feature map, is the output feature map, is the group convolution, is point-wise convolution, for Activation function, is batch normalization.
[0062] S340, a detection head module based on the improved YOLOv8 network model, decodes and predicts the multi-scale features of the fused digital orthophotos of the target area of mangrove restoration to obtain the bounding box and confidence detection data of the surviving mangrove seedlings.
[0063] Specifically, based on the improved YOLOv8 neural network structure, the training set is input into the improved neural network model for training. The validation set is input into the saved improved neural network model for detection, and the detection accuracy of different neural network models is evaluated using performance evaluation indicators, and the model with the highest average accuracy is selected as the detection model.
[0064] Select the accuracy and recall to evaluate the performance of the model. The accuracy reflects the proportion of positive samples correctly predicted by the model to all predicted positive samples, and the recall is the proportion of positive samples correctly predicted by the model to all actual positive samples. The specific formula is as follows: ; in, represents the number of actual surviving mangrove seedlings (true positives) detected; represents the number of samples that incorrectly identified non-viable mangrove seedlings as viable mangrove seedlings (false positives); Represents the number of samples that were truly viable mangrove seedlings but were misdetected as non-viable mangrove seedlings (false negatives).
[0065] Based on the improved YOLOv8 model constructed in the present invention, the surviving mangrove seedlings in the target area of mangrove restoration are extracted. We use the Ubuntu 20.04.3 operating system, the CPU model is AMD EPYC 7601, the GPU model is NVIDIAGeForce RTX3080, the GPU memory size is 10GB, the CUDA version is 11.3.0 and the corresponding version of the cudnn acceleration library is matched. The network development framework used in the present invention is pytorch 1.12.1, and the programming environment is based on Python 3.9.7. The specific parameters in the improved YOLOv8 model are shown in Table 1.
[0066] Table 1 Parameter training table
[0067] S400, splicing the bounding box and confidence detection data of the surviving mangrove seedlings, and performing redundancy removal and counting processing through a non-maximum suppression algorithm to obtain a mangrove seedling survival rate assessment result.
[0068] Specifically, the detection model is used to detect the surviving mangrove seedlings in the digital orthophotos of the large-scale mangrove restoration target area, and the bounding box and confidence detection data of the surviving mangrove seedlings are obtained, such as Fig.14 The detection data are spliced, and the soft non-maximum suppression algorithm (Soft-NMS) is used to remove redundant bounding boxes to obtain the detection and counting results of the surviving mangrove seedlings in the entire digital orthophoto.
[0069] First, the detection data is spliced to convert the coordinates of the bounding box of the surviving mangrove seedlings in the sub-image block into the coordinates of the digital orthophoto of the large-scale mangrove restoration target area. The specific method is as follows: Since the detection data is the original sub-image block obtained by cropping the digital orthophoto in an overlapping cropping method, the size of the digital orthophoto is , the sub-image blocks are numbered in the form of { }, and are the row and column indices (starting from 0). Here, the position and size of the bounding box in the detection data are represented by the upper left corner vertex and the lower right corner vertex of the border. The detection results of the sub-image blocks need to be merged. The sub-image block number and the overlap of the clipping are used to transform the coordinates of the detected bounding box to obtain the coordinates in the coordinate system represented by the original large-size digital orthophoto, such as Fig.15 The conversion formula is as follows: ; in, are the vertex coordinates of the bounding box transformed to the coordinate system represented by the original large-scale orthophoto. are the vertex coordinates of the bounding box in the coordinate system represented by the sub-image block, and are the width and height of the sub-image block, respectively. and They are respectively the horizontal overlap ratio and the vertical overlap ratio in the overlapping cropping method.
[0070] Considering that overlapping cropping may fill the sub-image blocks in the last row or column, only the vertex coordinates are saved here. and The bounding box data of .
[0071] We further use the non-maximum suppression algorithm Soft-NMS to remove redundant bounding boxes. First, we construct a bounding box data set B = { }, each box Contains coordinates and confidence , and sort these bounding boxes by confidence value; construct an empty set K to save the bounding boxes that are finally retained, and then traverse the sorted detection boxes and put the box with the highest current confidence Join the K set and calculate and the remaining boxes For boxes whose IoU is greater than the IoU threshold (iou_threshold), the following formula is used to reduce their confidence, which is expressed as: ; in, yes The confidence of the box, IoU( ) yes Frame with IoU of the box, is the Gaussian attenuation parameter.
[0072] Then, remove the boxes whose confidence is lower than the set confidence threshold, repeat the above steps of traversing the sorted detection boxes and removing the boxes whose confidence is lower than the set confidence threshold, until the set B is empty, and return the final detection result set K.
[0073] Among them, iou_threshold is recommended to be set to 0.1~0.3. The recommended setting is 0.5~0.6, and the confidence threshold is recommended to be set to 0.1~0.2.
[0074] Further calculation of the survival rate of mangrove seedlings in the target area of mangrove restoration is based on the detection count value of surviving mangrove seedlings in the full digital orthophoto map of the target area of mangrove restoration. , and the number of mangrove trees planned to be planted in the area , the survival rate of mangrove seedlings was calculated .
[0075] In summary, the present invention has the following advantages over the prior art: 1) Through the nonlinear expression of data by deep convolutional neural network, the characteristics of surviving mangrove seedlings were extracted from complex data, which improved the accuracy and efficiency of identifying surviving mangrove seedlings and ensured the accuracy of the mangrove seedling survival rate assessment results.
[0076] 2) Reconstruct the backbone network and optimize the original C2f module to C2f_SE to improve computational efficiency; embed the attention module DS_ACmix after each level of feature extraction layer, and dynamically adjust the feature weights layer by layer to achieve progressive optimization from local details to global semantics, improve the small target detection capability, improve the robustness of the model in complex environments, suppress background noise, and highlight the target body; DS_ACmix can improve model performance by enhancing local feature diversity and optimizing computational efficiency by adding multi-scale deep separable convolution before ACmix; optimize the feature pyramid and use the C2f_GP dual-path module instead of the standard C2f to improve computational efficiency.
[0077] 3) Using a combination of UAV aerial photography and deep learning methods to assess the survival rate of mangrove seedlings can assist ecological protection and restoration experts in improving the efficiency of mangrove seedling survival rate calculations, reducing manpower and time costs, and providing important data support for subsequent mangrove protection and restoration project evaluation and management, mangrove protection policy formulation, and resource management decisions.
[0078] Reference Figure 2 , a mangrove seedling survival rate assessment system based on deep learning, including: The first module 201 is used to obtain visible light images of the mangrove restoration target area and perform image preprocessing to obtain a digital orthophoto dataset of the mangrove restoration target area; The second module 202 is used to introduce the C2f_SE module, the DS_ACmix attention module and the C2f_GP module based on the YOLOv8 network model to build an improved YOLOv8 network model; The third module 203 is used to identify and detect the digital orthophoto dataset of the mangrove restoration target area based on the improved YOLOv8 network model, and obtain the bounding box and confidence detection data of the surviving mangrove seedlings; The fourth module 204 is used to splice the bounding box and confidence detection data of the surviving mangrove seedlings, and perform redundancy removal and counting processing through a non-maximum suppression algorithm to obtain a mangrove seedling survival rate assessment result.
[0079] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0080] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for assessing the survival rate of mangrove seedlings based on deep learning, characterized in that: The following steps are involved: Obtain visible light images of the target area for mangrove restoration and perform image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration; Based on the YOLOv8 network model, the C2f_SE module, DS_ACmix attention module and C2f_GP module are introduced to build an improved YOLOv8 network model; Based on the improved YOLOv8 network model, the digital orthophoto dataset of the mangrove restoration target area was identified and detected, and the bounding box and confidence detection data of the surviving mangrove seedlings were obtained; The bounding box and confidence detection data of the surviving mangrove seedlings were spliced, and redundancy removal and counting processing were performed using the non-maximum suppression algorithm to obtain the mangrove seedling survival rate assessment results.
2. According to claim 1, a method for assessing the survival rate of mangrove seedlings based on deep learning is characterized in that: The step of obtaining visible light images of the target area for mangrove restoration and performing image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration specifically includes: Obtain visible light images of mangrove restoration target areas at low tide using drones; Adaptively perform light and color uniformity processing on the visible light image to obtain a visible light image after light and color uniformity; The uniformly lighted and color-homogenized visible light images were subjected to aerial triangulation and orthorectification to obtain a preliminary digital orthophoto of the target area for mangrove restoration. The digital orthophotos of the preliminary mangrove restoration target area were processed by data cropping, data labeling and data amplification in sequence to obtain a digital orthophoto dataset of the mangrove restoration target area.
3. According to claim 2, a method for assessing the survival rate of mangrove seedlings based on deep learning is characterized in that: The step of performing adaptive light and color homogenization processing on the visible light image to obtain the visible light image after light and color homogenization specifically includes: Based on the visible light image, data screening and processing are performed to divide the visible light image into a template image and an image to be corrected; Convert the template image and the image to be corrected from the RGB color space to the HSV color space to obtain a converted template image and a converted image to be corrected; Based on the converted template image and the converted image to be corrected, the brightness histogram alignment processing and the mean and standard deviation of the hue, and the mean and standard deviation of the saturation are aligned to obtain a preliminary visible light image after uniform light and color; The preliminary uniformly lighted and uniformly colored visible light image is converted back to the RGB color space to obtain a uniformly lighted and uniformly colored visible light image.
4. According to claim 3, a method for assessing the survival rate of mangrove seedlings based on deep learning is characterized in that: The step of identifying and detecting the digital orthophoto dataset of the mangrove restoration target area based on the improved YOLOv8 network model to obtain the bounding box and confidence detection data of the surviving mangrove seedlings specifically includes: The digital orthophoto dataset of the mangrove restoration target area was input into the improved YOLOv8 network model; Based on the backbone network of the improved YOLOv8 network model, feature extraction and processing were performed on the digital orthophoto dataset of the target area for mangrove restoration, and the digital orthophoto features of the target area for mangrove restoration were obtained. Based on the neck module of the improved YOLOv8 network model, the digital orthophoto features of the target area of mangrove restoration were fused to obtain the multi-scale features of the fused digital orthophotos of the target area of mangrove restoration. Based on the detection head module of the improved YOLOv8 network model, the multi-scale features of the fused digital orthophotos of the target area of mangrove restoration are decoded and predicted to obtain the bounding box and confidence detection data of the surviving mangrove seedlings.
5. A method for assessing the survival rate of mangrove seedlings based on deep learning according to claim 4, characterized in that: The backbone network based on the improved YOLOv8 network model performs feature extraction processing on the digital orthophoto dataset of the mangrove restoration target area to obtain the digital orthophoto features of the mangrove restoration target area. The step specifically includes: The digital orthophoto dataset of the target area for mangrove restoration is input into the backbone network of the improved YOLOv8 network model, wherein the backbone network includes a Conv module, a C2f_SE module, a DS_ACmix attention module and a SPPF module. The Conv module includes a first Conv module, a second Conv module, a third Conv module, a fourth Conv module and a fifth Conv module. The C2f_SE module includes a first C2f_SE module, a second C2f_SE module, a third C2f_SE module and a fourth C2f_SE module. The DS_ACmix attention module includes a first DS_ACmix attention module. the intention module, the second DS_ACmix attention module, the third DS_ACmix attention module and the fourth DS_ACmix attention module, wherein the first Conv module, the second Conv module, the first C2f_SE module, the first DS_ACmix attention module, the third Conv module, the second C2f_SE module, the second DS_ACmix attention module, the fourth Conv module, the third C2f_SE module, the third DS_ACmix attention module, the fifth Conv module, the fourth C2f_SE module, the fourth DS_ACmix attention module and the SPPF module are connected in sequence; Based on the Conv module of the backbone network, the local features of the digital orthophoto dataset of the mangrove restoration target area are extracted and processed to obtain the local features of the digital orthophoto of the mangrove restoration target area; Based on the C2f_SE module of the backbone network, the local features of the digital orthophotos of the target area of mangrove restoration are enhanced and adaptively recalibrated to obtain the enhanced digital orthophoto features of the target area of mangrove restoration. Based on the DS_ACmix attention module of the backbone network, feature selection is performed on the digital orthophoto features of the enhanced mangrove restoration target area to obtain the digital orthophoto features of the selected mangrove restoration target area; Based on the SPPF module of the backbone network, the digital orthophoto features of the selected mangrove restoration target area are pooled to obtain the digital orthophoto features of the mangrove restoration target area.
6. A method for assessing the survival rate of mangrove seedlings based on deep learning according to claim 5, characterized in that: The C2f_SE module based on the backbone network performs feature enhancement and adaptive recalibration processing on the local features of the digital orthophoto of the mangrove restoration target area to obtain the enhanced digital orthophoto features of the mangrove restoration target area. This step specifically includes: Input the local features of the digital orthophoto of the target area of mangrove restoration into the C2f_SE module of the backbone network, wherein the C2f_SE module includes a first convolutional layer, a segmentation layer, a plurality of SEBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first SEBlock module among the plurality of SEBlock modules, the output end of the first SEBlock module is connected to the input end of other SEBlock modules among the plurality of SEBlock modules, the plurality of SEBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the plurality of SEBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer; Based on the first convolution layer of the C2f_SE module, the local features of the digital orthophoto of the mangrove restoration target area are convolved to obtain the local features of the digital orthophoto of the mangrove restoration target area after convolution; Based on the segmentation layer of the C2f_SE module, the local features of the digital orthophoto of the mangrove restoration target area after convolution are segmented to obtain several local sub-features of the digital orthophoto of the mangrove restoration target area; Based on several SEBlock modules of the C2f_SE module, feature adaptive recalibration is performed on the local sub-features of the digital orthophotos of several mangrove restoration target areas to obtain the sub-features of the digital orthophotos of several mangrove restoration target areas; Based on the connection layer of the C2f_SE module, feature splicing was performed on the digital orthophoto sub-features of several mangrove restoration target areas to obtain preliminary digital orthophoto features of the mangrove restoration target areas. Based on the second convolutional layer of the C2f_SE module, the digital orthophoto features of the preliminary mangrove restoration target area are convolved to obtain the enhanced digital orthophoto features of the mangrove restoration target area.
7. A method for assessing the survival rate of mangrove seedlings based on deep learning according to claim 6, characterized in that: The DS_ACmix attention module based on the backbone network performs feature selection on the enhanced digital orthophoto features of the mangrove restoration target area to obtain the digital orthophoto features of the selected mangrove restoration target area. This step specifically includes: Input the enhanced digital orthophoto features of the mangrove restoration target area into the DS_ACmix attention module of the backbone network, wherein the DS_ACmix attention module includes an input layer, a first deep convolution layer, a second deep convolution layer, a third deep convolution layer, a first point convolution, a second point convolution, a third point convolution and an ACmix module, wherein the output end of the input layer is connected to the input ends of the first deep convolution layer, the second deep convolution layer and the third deep convolution layer respectively, the output end of the first deep convolution layer is connected to the input end of the first point convolution, the output end of the second deep convolution layer is connected to the input end of the second point convolution, the output end of the third deep convolution layer is connected to the input end of the third point convolution, and the output ends of the first point convolution, the second point convolution and the third point convolution are all connected to the input end of the ACmix module; Based on the input layer of the DS_ACmix attention module, the enhanced digital orthophoto features of the mangrove restoration target area are input; Based on the first deep convolution layer, the second deep convolution layer and the third deep convolution layer of the DS_ACmix attention module, the digital orthophoto features of the enhanced mangrove restoration target area are subjected to deep convolution processing to obtain the first deep features of the digital orthophoto, the second deep features of the digital orthophoto and the third deep features of the digital orthophoto; Based on the first point convolution, the second point convolution and the third point convolution of the DS_ACmix attention module, the deep features of the first digital orthophoto, the deep features of the second digital orthophoto and the deep features of the third digital orthophoto are processed by point convolution respectively to obtain the deep features of the multi-scale digital orthophoto to be fused; The ACmix module based on the DS_ACmix attention module performs multi-scale fusion processing on the deep features of the fused multi-scale digital orthophotos to obtain the digital orthophoto features of the selected mangrove restoration target area.
8. A method for assessing the survival rate of mangrove seedlings based on deep learning according to claim 7, characterized in that: The neck module based on the improved YOLOv8 network model performs feature fusion processing on the digital orthophoto features of the mangrove restoration target area to obtain the fused multi-scale features of the digital orthophoto of the mangrove restoration target area. This step specifically includes: Input the digital orthophoto features of the mangrove restoration target area into the neck module of the improved YOLOv8 network model, wherein the neck module includes an Upsample module, a Concat module, a C2f_GP module and a Conv module, the Upsample module includes a first Upsample module and a second Upsample module, the Concat module includes a first Concat module, a second Concat module, a third Concat module and a fourth Concat module, the C2f_GP module includes a first C2f_GP module, a second C2f_GP module, a third C2f_GP module and a fourth C2f_GP module, and the Conv module includes a sixth Conv module and a seventh Conv module, wherein the first Upsample module, the first Concat module, the first C2f_GP module, the second Upsample module, the second Concat module, the second C2f_GP module, the sixth Conv module, the third Concat module, the third C2f_GP module, the seventh Conv module, the fourth Concat module and the fourth C2f_GP module are connected in sequence; The Concat module based on the neck module is used to stitch the digital orthophoto features of the mangrove restoration target area to obtain the digital orthophoto features after preliminary stitching; Based on the Upsample module of the neck module, the features of the digital orthophoto after preliminary splicing are interpolated to obtain the features of the interpolated digital orthophoto; The Conv module based on the neck module performs convolution processing on the interpolated digital orthophoto features to obtain the convolved digital orthophoto features; Based on the C2f_GP module of the neck module, the convolutional digital orthophoto features are processed by group convolution and feature fusion to obtain the multi-scale features of the fused digital orthophoto of the target area of mangrove restoration.
9. A method for assessing the survival rate of mangrove seedlings based on deep learning according to claim 8, characterized in that: The C2f_GP module based on the neck module performs group convolution and feature fusion processing on the convolved digital orthophoto features to obtain the fused multi-scale features of the digital orthophoto of the mangrove restoration target area. This step specifically includes: Input the convolutional digital orthophoto features to the C2f_GP module of the neck module, wherein the C2f_GP module includes a first convolutional layer, a segmentation layer, a plurality of GPBlock modules, a connection layer and a second convolutional layer, wherein the output end of the first convolutional layer is connected to the input end of the segmentation layer, the first output end of the segmentation layer is connected to the input end of the first GPBlock module among the plurality of GPBlock modules, the output end of the first GPBlock module is further connected to the input ends of other GPBlock modules among the plurality of GPBlock modules, the plurality of GPBlock modules are connected in series, the second output end of the segmentation layer and the output ends of the plurality of GPBlock modules are connected to the input end of the connection layer, and the output end of the connection layer is connected to the input end of the second convolutional layer; Based on the first convolution layer of the C2f_GP module, the convolution processing is performed on the convolution digital orthophoto features to obtain the convolution digital orthophoto features; Based on the segmentation layer of the C2f_GP module, the convolutional digital orthophoto features are segmented to obtain several digital orthophoto sub-features; Based on several GPBlock modules of C2f_GP module, multi-level feature optimization processing is performed on several digital orthophoto sub-features to obtain several optimized digital orthophoto sub-features; Based on the connection layer of the C2f_GP module, several optimized digital orthophoto sub-features are spliced to obtain the digital orthophoto features of the mangrove restoration target area after preliminary splicing; Based on the second convolutional layer of the C2f_GP module, convolution processing is performed on the digital orthophoto features of the mangrove restoration target area after preliminary splicing to obtain the digital orthophoto features of the mangrove restoration target area after splicing.
10. A mangrove seedling survival rate assessment system based on deep learning, characterized in that: Includes the following modules: The first module is used to obtain visible light images of the target area for mangrove restoration and perform image preprocessing to obtain a digital orthophoto dataset of the target area for mangrove restoration; The second module is used to build an improved YOLOv8 network model based on the YOLOv8 network model by introducing the C2f_SE module, the DS_ACmix attention module and the C2f_GP module; The third module is used to identify and detect the digital orthophoto dataset of the mangrove restoration target area based on the improved YOLOv8 network model, and obtain the bounding box and confidence detection data of the surviving mangrove seedlings; The fourth module is used to splice the bounding box and confidence detection data of the surviving mangrove seedlings, and perform redundancy removal and counting processing through the non-maximum suppression algorithm to obtain the mangrove seedling survival rate assessment results.
Citation Information
Patent Citations
Sugarcane seedling automatic identification and counting method based on deep neural network
CN113392775A
Underwater wireless charging platform docking bin angle and foreign matter identification method
CN118298288A
Seed metering detection method and device, electronic equipment and storage medium
CN118537781A
Unmanned aerial vehicle visible light image individual tree detection method suitable for complex forest environment
CN118918479A
Wind turbine generator blade detection method, system and equipment and storage medium
CN119048885A
Cited By
Transplanted rock red bean survival monitoring method and system
CN120563910A
Methods and systems for monitoring the survival of transplanted rock-grown red beans
CN120563910B