Artificial Intelligence-Based Automatic Method and System for Reef Mask Extraction
By employing environmentally adaptive preprocessing, multi-scale feature pyramid encoding, and adaptive threshold segmentation algorithms, the problem of multi-scale feature fusion and environmental adaptation in coral reef mask extraction technology under complex marine environments was solved, achieving high-precision coral reef mask generation and supporting marine ecological monitoring.
Patent Information
- Application Number
- CN202511274421.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing coral reef mask extraction technologies lack multi-scale feature fusion and environmental adaptability in complex marine environments, leading to decreased segmentation accuracy and inaccurate mask generation.
A standardized image dataset is generated using an environment-adaptive preprocessing algorithm. A multi-scale feature pyramid encoder is constructed, feature weights are calculated through an environment-aware module, and a multi-level fusion decoder and an adaptive threshold segmentation algorithm are set up. Finally, a coral reef mask is generated by combining morphological postprocessing.
It improves the accuracy and environmental adaptability of coral reef mask extraction, ensuring the generation of high-quality coral reef masks in complex marine environments, and supporting marine ecological monitoring and protection.
Smart Images

Figure CN120747760B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to an automatic method and system for extracting coral reef masks based on artificial intelligence. Background Technology
[0002] Coral reefs are an important component of marine ecosystems, and monitoring their spatial distribution is crucial for marine biodiversity conservation and ecological assessment. Traditional coral reef monitoring relies primarily on underwater surveys, satellite remote sensing, and drone aerial photography. However, with the development of artificial intelligence (AI) technology, deep learning-based automatic coral reef identification technologies are emerging. Existing AI-powered coral reef mask extraction technologies mainly employ convolutional neural networks for end-to-end image segmentation, using trained labeled data to achieve automatic identification of coral reef areas and mask generation.
[0003] However, existing technologies have significant shortcomings in complex marine environments: First, traditional CNN architectures lack the ability to effectively integrate coral reef features at different scales, failing to fully capture multi-level feature information from global distribution to pixel-level details; second, existing methods lack environmental adaptation mechanisms, and cannot dynamically adjust feature extraction strategies when facing complex underwater environments such as low light, turbid water, and biological occlusion, resulting in a significant decrease in segmentation accuracy; in addition, traditional decoder structures lack effective utilization of cross-scale information during feature fusion, making it difficult to accurately reconstruct coral reef boundary details.
[0004] Based on a layer-by-layer analysis of the aforementioned technical deficiencies, the fundamental problem with existing technologies lies in the lack of a complete multi-scale adaptive feature extraction and fusion mechanism. Specifically, the image preprocessing stage lacks adaptive processing strategies for marine images of different qualities, resulting in uneven input quality for subsequent feature extraction; the feature encoding stage lacks multi-scale pyramid structure-based depth feature representation, failing to fully capture the multi-layered spatial features of coral reefs; the feature weight allocation stage lacks an adaptive adjustment mechanism based on environmental complexity, failing to dynamically optimize feature weights according to the specific marine environment; the decoding and fusion stage lacks a progressive cross-scale feature fusion strategy, making it difficult to accurately reconstruct coral reef mask boundaries; and the mask generation stage lacks adaptive threshold selection and intelligent post-processing mechanisms, affecting the accuracy and integrity of the final mask. Summary of the Invention
[0005] This application provides an artificial intelligence-based automatic coral reef mask extraction method and system to solve the problems of insufficient multi-scale feature fusion and insufficient environmental adaptability of existing coral reef mask extraction technologies in complex marine environments, thereby improving the accuracy and environmental adaptability of coral reef mask extraction.
[0006] In a first aspect, this application provides an automatic coral reef mask extraction method based on artificial intelligence, the automatic coral reef mask extraction method based on artificial intelligence includes:
[0007] Step S101: Collect multi-source coral reef remote sensing images, analyze the image quality through an environment-adaptive preprocessing algorithm and perform hierarchical preprocessing to generate a standardized coral reef image dataset.
[0008] Step S102: Construct a multi-scale feature pyramid encoder. Input the standardized coral reef image dataset into the encoder to extract feature information at different resolutions and output a five-layer coral reef feature pyramid.
[0009] Step S103: Establish an environmental perception module to analyze the five-layer coral reef feature pyramid, calculate the environmental complexity vector and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation.
[0010] Step S104: Set up a multi-level fusion decoder to receive the adaptive coral reef feature representation, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map;
[0011] Step S105: Apply the adaptive threshold segmentation algorithm to process the coral reef probability distribution map, combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef masking result.
[0012] Secondly, this application provides an AI-based automatic coral reef mask extraction system, the AI-based automatic coral reef mask extraction system comprising:
[0013] The acquisition module is used to acquire multi-source coral reef remote sensing images, analyze image quality through an environment-adaptive preprocessing algorithm, perform hierarchical preprocessing, and generate a standardized coral reef image dataset.
[0014] The input module is used to construct a multi-scale feature pyramid encoder. The standardized coral reef image dataset is input into the encoder to extract feature information at different resolutions and output a five-layer coral reef feature pyramid.
[0015] The analysis module is used to establish the five-layer coral reef feature pyramid analyzed by the environmental perception module, calculate the environmental complexity vector, and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation.
[0016] The fusion module is used to set up a multi-level fusion decoder to receive the adaptive coral reef feature representation, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map.
[0017] The output module is used to process the coral reef probability distribution map using an adaptive threshold segmentation algorithm, and combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef masking result.
[0018] Thirdly, an AI-based automatic coral reef mask extraction device is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the AI-based automatic coral reef mask extraction device to execute the aforementioned AI-based automatic coral reef mask extraction method.
[0019] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the aforementioned artificial intelligence-based automatic coral reef mask extraction method.
[0020] The technical solution provided in this application solves the problem that traditional preprocessing methods cannot cope with the quality differences in complex marine environments by constructing an environment-adaptive preprocessing algorithm for multi-source coral reef remote sensing images, ensuring the consistency of data quality in subsequent processing. The design of the multi-scale feature pyramid encoder breaks through the limitations of the traditional CNN architecture, achieving complete feature coverage from global semantics to pixel-level details through a five-layer feature pyramid structure, significantly enhancing the expressive power of coral reef features. The introduction of the environmental perception module and environmental complexity vector enables the system to dynamically adjust feature weights according to environmental factors such as illumination, water quality, and occlusion, resulting in an adaptive coral reef feature representation that maintains stable recognition performance in various complex marine environments. The multi-level fusion decoder effectively integrates feature information at different levels through progressive upsampling and cross-scale feature fusion mechanisms, generating a coral reef probability distribution map with higher spatial accuracy and boundary clarity. The adaptive threshold segmentation algorithm combined with a smart mask generation strategy based on morphological post-processing not only eliminates the limitations of traditional fixed threshold methods but also effectively removes noise and smooths boundaries through morphological operations, resulting in coral reef mask results that are significantly superior to existing technologies in terms of accuracy and completeness.
[0021] In the specific application field of coral reef monitoring and ecological protection, the core algorithm features of this application play a crucial role. The environmentally adaptive preprocessing algorithm, tailored to the unique properties of marine remote sensing imagery, ensures that image data from different sources and of varying quality achieves a unified processing standard through quality assessment and hierarchical processing strategies, laying a solid foundation for subsequent intelligent analysis. The multi-scale feature pyramid encoder is particularly suitable for identifying marine organisms with complex spatial structures, such as coral reefs. Its hierarchical feature extraction mechanism can simultaneously capture the overall distribution pattern and local texture details of coral reefs, which is essential for accurately distinguishing coral reefs from other seabed features. The environmental complexity vector calculation and adaptive weight recalibration mechanism are specifically designed for the complexity and variability of underwater environments, enabling the system to automatically adjust its identification strategy under different marine environmental conditions. This adaptive capability has significant practical value for large-scale, long-term coral reef monitoring projects, ensuring the consistency and reliability of monitoring results. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of an embodiment of the automatic coral reef mask extraction method based on artificial intelligence in this application.
[0024] Figure 2 This is a schematic diagram of an embodiment of the automatic coral reef mask extraction method based on artificial intelligence in this application.
[0025] Figure 3 This is a schematic diagram of one embodiment of the artificial intelligence-based automatic coral reef mask extraction system in this application.
[0026] Figure 4 This is a schematic block diagram of the structure of the automatic coral reef mask extraction device based on artificial intelligence in an embodiment of the present invention. Detailed Implementation
[0027] This application provides an artificial intelligence-based automatic coral reef mask extraction method and system. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] This application relates to the field of image recognition technology and discloses an automatic coral reef mask extraction method and system based on artificial intelligence. It involves acquiring multi-source remote sensing images of coral reefs, generating a standardized dataset through environment-adaptive preprocessing, constructing a multi-scale feature pyramid encoder to extract five layers of feature information, establishing an environment perception module to calculate the environment complexity vector and recalibrate feature weights to form an adaptive feature representation, setting a multi-level fusion decoder to perform progressive upsampling and cross-scale fusion to generate a probability distribution map, and applying an adaptive threshold segmentation algorithm combined with morphological post-processing to output the coral reef mask result. This method solves the problems of insufficient multi-scale feature fusion and inadequate environment adaptation in existing coral reef mask extraction technologies under complex marine environments, improving the accuracy and environmental adaptability of coral reef mask extraction.
[0029] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the artificial intelligence-based automatic coral reef mask extraction method in this application includes:
[0030] Step S101: Collect multi-source coral reef remote sensing images, analyze the image quality through an environment-adaptive preprocessing algorithm and perform hierarchical preprocessing to generate a standardized coral reef image dataset.
[0031] Step S102: Construct a multi-scale feature pyramid encoder. Input the standardized coral reef image dataset into the encoder to extract feature information at different resolutions and output a five-layer coral reef feature pyramid.
[0032] Step S103: Establish an environmental perception module to analyze the five-layer coral reef feature pyramid, calculate the environmental complexity vector and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation.
[0033] Step S104: Set up a multi-level fusion decoder to receive adaptive coral reef feature representations, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map.
[0034] Step S105: Apply the adaptive threshold segmentation algorithm to process the coral reef probability distribution map, combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef mask result.
[0035] It is understood that the executing entity of this application can be an AI-based automatic coral reef mask extraction system, or it can be a terminal or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.
[0036] Specifically, the process begins with multi-source data acquisition, integrating various data sources such as satellite imagery, drone aerial photography, and underwater photography to ensure comprehensive data coverage. Addressing the unique challenges of underwater environments, including uneven lighting, water turbidity, and biological occlusion, an environment-adaptive preprocessing algorithm is employed to assess the quality and perform stratified processing of the input images. The quality assessment model analyzes indicators such as image brightness distribution, color shift, and water turbidity, classifying images into three levels: high quality, medium quality, and low quality. Corresponding preprocessing operations are then performed on each level, including size normalization, color space conversion, contrast enhancement, and multi-scale illumination compensation, ultimately generating a standardized coral reef image dataset.
[0037] In the feature extraction stage, the system constructs a multi-scale feature pyramid encoder based on an improved ResNet50 architecture, extending the network depth by adding fine-grained feature layers. The encoder employs a bidirectional pyramid structure, extracting features at each stage via a bottom-up path and passing high-level semantic information via a top-down path, achieving feature fusion through lateral connections. The introduction of depthwise separable convolutions significantly reduces computational complexity while maintaining the accuracy of feature extraction. The encoder ultimately outputs a five-layer feature pyramid, corresponding to coral reef feature information at different scales, forming a complete feature representation system from global semantic features to pixel-level detailed features.
[0038] The environmental perception module consists of three parallel branch networks, each responsible for assessing lighting conditions, water quality, and occlusion levels. Each branch network analyzes feature maps at different levels, calculating metrics such as lighting uniformity, water quality clarity, and occlusion complexity, and then fuses these metrics into an environmental complexity vector through a fully connected layer. Based on this vector, the system employs a channel attention mechanism to dynamically adjust the weight distribution of features at each layer. In well-lit conditions, high-resolution feature weights are enhanced; in low-light or turbid environments, low-resolution global features are emphasized; and in highly occluded scenes, the weights of features at different scales are balanced, forming an adaptive feature representation that adapts to environmental changes.
[0039] The multi-layered fusion decoder employs a symmetrical upsampling structure and gradually restores spatial resolution through a progressive feature fusion strategy. Each decoding block introduces a multi-scale receptive field module, using convolutional kernels of different sizes to process feature information in parallel, and combines a boundary enhancement module to optimize edge detection performance. The decoding process organically combines high-level semantic information with low-level detailed features, ultimately generating a coral reef probability distribution map that accurately reflects the probability that each pixel belongs to a coral reef region.
[0040] In the results generation phase, the system applies an improved adaptive threshold segmentation algorithm, adding connected component constraints to the traditional inter-class variance maximization to ensure the continuity of the segmentation results. Morphological post-processing eliminates noise points and fills holes through opening and closing operations, while boundary smoothing effectively improves the quality of the mask edges. The final output coral reef mask results are validated by the quality assessment module, providing reliable data support for coral reef ecological monitoring and protection. The entire processing workflow has been comprehensively optimized for the special characteristics of the underwater environment, effectively addressing the shortcomings of traditional methods in feature fusion and environmental adaptability, and improving the accuracy and reliability of coral reef monitoring.
[0041] In one specific embodiment, the process of performing step S101 may specifically include the following steps:
[0042] The image quality assessment model was used to detect low-light areas, water turbidity, and color shift in multi-source coral reef remote sensing images, and the resulting image quality assessment vector was obtained.
[0043] Based on the image quality assessment vector, a layered preprocessing strategy is implemented for coral reef remote sensing images. High-quality images are subjected to size normalization and color space conversion, medium-quality images are subjected to histogram equalization and contrast enhancement, and low-quality images are subjected to illumination compensation and detail enhancement using the multi-scale Retinex algorithm to obtain quality-optimized images.
[0044] The enhanced image data is obtained by performing data augmentation operations such as random rotation, horizontal and vertical flipping, random cropping, and elastic deformation on the quality-optimized image.
[0045] Based on the augmented image data, a 512×512 pixel resolution adjustment was performed and the pixel values were normalized to the [0,1] interval to obtain a standardized coral reef image dataset.
[0046] Specifically, the acquisition and processing of coral reef remote sensing images face technical challenges due to the complex and ever-changing marine environment. Multi-source data exhibit significant differences in lighting conditions, water transparency, and color fidelity. The image quality assessment model employs a three-channel parallel architecture to process the input image. The weak light detection branch analyzes the luminance components of the RGB channels, quantifying the degree of lighting unevenness by calculating the average pixel value and variance of local areas; higher values indicate worse lighting conditions. The water turbidity detection branch operates in the HSV color space, focusing on analyzing the histogram distribution of the saturation channel and combining it with high-frequency component energy calculations. Turbid waters typically exhibit high-frequency energy attenuation characteristics. The color shift detection branch converts the image to the LAB color space, calculating the mean shift of channels a and b; when the shift exceeds a threshold, color distortion is identified. The outputs of the three branches are normalized and then concatenated into a three-dimensional quality assessment vector. The values of each dimension of the vector range from 0 to 1, corresponding to the quantitative scores of lighting, turbidity, and color shift, respectively.
[0047] A hierarchical preprocessing strategy based on quality assessment vectors establishes a dynamic processing path. Images with scores below 0.3 across all dimensions are considered high-quality. The processing flow includes bilinear interpolation to adjust the size to the target resolution and RGB-to-LAB color space conversion, maintaining a linear relationship between pixel values. Medium-quality images with scores between 0.3 and 0.6 undergo additional contrast-limited adaptive histogram equalization on top of the basic processing. The tile size is set to 16×16 pixels, and the clip limiting coefficient is 0.03 to avoid excessive noise enhancement. Low-quality images (any score exceeding 0.6) employ an improved multi-scale Retinex algorithm with three Gaussian kernel sizes (15, 80, and 200 pixels). Illumination estimation and compensation are performed in the luminance channel, with the compensation intensity positively correlated with the quality score. Chroma channel compensation is enabled when the turbidity score is above 0.7. The processed images are validated using the SSIM metric to ensure a structural similarity improvement of at least 15%.
[0048] In the data augmentation stage, a mapping relationship between the original image and the derived samples is established. Random rotation is performed with uniform sampling angles within the range of 0-360 degrees, and edge reflection filling is used to maintain the integrity of the coral reef area. The horizontal and vertical flip probability is set to 0.5 to generate mirrored samples and increase visual diversity. Random cropping is performed to extract a 512×512 pixel region from the original image while ensuring the integrity of the coral reef, with the overlap rate controlled within 30%. Elastic deformation uses a B-spline-based grid deformation algorithm with a grid spacing of 64 pixels, and the maximum deformation displacement does not exceed 20% of the grid spacing to avoid excessive geometric distortion. The number of augmented samples is increased to 8 times that of the original data, and the transformation parameters of each sample are recorded for subsequent analysis.
[0049] The standardization process involves resolution unification and numerical normalization. A bicubic interpolation algorithm adjusts enhanced images of different sizes to a standard resolution of 512×512. The interpolation weights are calculated based on the Lanczos kernel function, preserving high-frequency details while suppressing ringing effects. Pixel value normalization uses global statistics, linearly mapping each channel value to the [0,1] interval based on the maximum and minimum pixel values of the entire dataset. A metadata recording system is established during processing to store the quality assessment vector, processing parameters, and enhancement method for each image, forming a complete preprocessing traceability chain. The standardized image dataset is stored according to quality level, maintaining class balance in sample distribution to provide high-quality input for subsequent model training.
[0050] Step S102: Construct a multi-scale feature pyramid encoder. Input the standardized coral reef image dataset into the encoder to extract feature information at different resolutions and output a five-layer coral reef feature pyramid.
[0051] In one specific embodiment, the process of performing step S102 may specifically include the following steps:
[0052] A multi-scale feature pyramid encoder is constructed using an improved ResNet backbone network. By adding fine-grained feature layers to extend the network depth, a five-layer feature pyramid structure is obtained.
[0053] The standardized coral reef image dataset is input into a five-layer feature pyramid structure, and global semantic features, regional boundary features, local texture features, detail edge features and pixel-level features are extracted respectively to obtain a multi-scale feature map group;
[0054] Based on multi-scale feature map groups, depthwise separable convolution is used to replace traditional convolution for feature processing. Through lateral connections and top-down path fusion, element-wise addition of high-level semantic information and low-level features is achieved to obtain fused feature representation.
[0055] The fused feature representation is expanded by channel dimension so that each feature map contains the same number of channels, resulting in a five-layer coral reef feature pyramid.
[0056] Specifically, the multi-scale feature pyramid encoder extends the architecture based on the improved ResNet50 backbone network. By introducing a cross-level feature interaction mechanism and depthwise separable convolution optimization, it constructs a feature extraction system with a five-layer pyramid structure.
[0057] Standardized coral reef imagery is input into the encoder as a 512×512 resolution three-channel matrix. In the first processing stage, a fine-grained feature extraction branch is added after the original ResNet50 stem module. Standard convolutional layers use a 7×7 kernel size with a stride of 2 for downsampling to obtain initial feature maps, while a parallel branch employs cascaded 3×3 convolutions to retain more detailed information. The outputs of the two paths are concatenated in the channel dimension to form a 256-dimensional low-level feature representation. This dual-path design maintains the receptive field while avoiding the loss of high-frequency information caused by early downsampling, which is particularly beneficial for preserving the contours of coral reef edges.
[0058] Furthermore, a fifth feature extraction stage is inserted based on the four standard residual blocks of ResNet50, constructing a multi-scale receptive field by modifying the dilation rate. The first four stages maintain the original network's [3,4,6,3] layer configuration, with the output feature map size successively reduced to 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the input size. The newly added fifth stage uses dilated convolution instead of ordinary convolution, setting the dilation coefficient to [1,2,4] while maintaining 1 / 32 resolution, enabling a single neuron to cover structural features at different scales in the coral reef region. The outputs of each stage are processed through batch normalization and the ReLU activation function to form a feature pyramid with a clear semantic hierarchy.
[0059] The feature fusion employs a bidirectional feature pyramid network architecture. The bottom-up path directly extracts the outputs of each stage as the base feature map, while the top-down path uses 2x nearest neighbor upsampling to pass high-level semantic features to the low-resolution layer. Lateral connections use 1×1 convolutions to align the channel dimensions, ensuring that features from different levels can be added element-wise. The introduction of depthwise separable convolutions significantly reduces computational complexity; after 3×3 spatial convolutions process each input channel independently, 1×1 pointwise convolutions achieve cross-channel information fusion.
[0060] The channel dimension expansion module employs grouped convolution to process the fused feature map, dividing the 256-dimensional input channels into four 64-dimensional subspaces. Each subspace undergoes an independent 3×3 convolution operation before being merged. This structure ensures rich feature representation while avoiding the over-parameterization problem of fully connected convolutions. The expanded five-layer feature map is uniformly adjusted to 256 channels, corresponding to resolutions of 128×128, 64×64, 32×32, 16×16, and 8×8, respectively, forming a complete coral reef feature pyramid.
[0061] Step S103: Establish an environmental perception module to analyze the five-layer coral reef feature pyramid, calculate the environmental complexity vector, and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation.
[0062] In one specific embodiment, the process of executing step S103 may specifically include the following steps:
[0063] The environmental perception module is constructed by including three parallel branch networks: illumination assessment branch, water quality assessment branch, and occlusion assessment branch. The five-layer coral reef feature pyramid is input into each branch for environmental analysis to obtain illumination uniformity index, water quality clarity index, and occlusion complexity index.
[0064] An environmental complexity vector is obtained by fusing the illumination uniformity index, water quality clarity index, and occlusion complexity index through a fully connected layer.
[0065] Based on the environmental complexity vector, the five-layer coral reef feature pyramid is weighted using a channel attention mechanism. High-resolution feature weights are enhanced for well-lit environments, low-resolution global feature weights are enhanced for low-light or turbid environments, and feature weights at all scales are balanced for highly occluded environments, thus obtaining the weighting results.
[0066] The weight allocation results are multiplied element-wise with the five-layer coral reef feature pyramid to obtain an adaptive coral reef feature representation.
[0067] Specifically, in the analysis of coral reef remote sensing images, the environmental perception module is designed to optimize for complex underwater environmental conditions. A five-layer feature pyramid serves as input data, with resolutions of 128×128, 64×64, 32×32, 16×16, and 8×8 pixels, each containing 256 feature channels. The illumination evaluation branch selects 128×128 high-resolution features as input, preserving sufficient spatial detail. The branch structure includes a global average pooling layer and two fully connected layers. The 256-dimensional vector output from the pooling layer is compressed into 3-dimensional features by the fully connected network, corresponding to the image's mean brightness, variance, and contrast indices. These statistics are linearly combined to generate an illumination uniformity score in the 0-1 range, with the variance term assigned a weight coefficient of 0.6 to ensure sensitive detection of areas with uneven illumination.
[0068] The water quality assessment branch processes 64×64 mid-level features, which retains sufficient spatial detail while possessing a certain degree of semantic abstraction. The branch employs a channel attention mechanism, calculating the importance weights of each channel through 1×1 convolutions, focusing on amplifying the contribution of high-frequency texture features. The weighted feature map undergoes spatial pyramid pooling, and energy distribution is calculated at different grid scales; higher output values indicate more severe turbidity caused by water scattering and suspended matter.
[0069] The occlusion assessment branch analyzes the anisotropy of the 32×32 feature map, revealing that coral reef areas exhibit unique texture orientation distributions under biological occlusion. This branch uses gradient operators in three directions (0°, 45°, 90°) to calculate the feature map gradient and calculates the distribution entropy of the gradient magnitude in each direction. High entropy values indicate disordered texture orientations, suggesting occlusion conditions such as algal cover or fish schools.
[0070] Furthermore, the outputs of the three branches are interactively computed in the fusion layer. Illumination and water quality indicators are coupled through a gating mechanism, designed as a product to reflect their synergistic effect: when illumination is insufficient and water is turbid, the product result exponentially amplifies the severity of the environment. The shading coefficient is retained as an independent dimension because its causes are relatively independent of illumination and water conditions. The fully connected network maps these three parameters into a three-dimensional environment vector. The vector magnitude is normalized using the sigmoid function, and the orientation angle is used to determine the dominant disturbance type. This vector, as a compact representation of the environmental state, has mathematical properties that ensure robustness under complex environmental combinations.
[0071] The channel attention mechanism generates a five-dimensional weight distribution based on the environment vector. In the design, the vector magnitude is input into a sigmoid function to generate a basic scaling factor. The orientation angle is decomposed into three axial components using trigonometric functions, controlling the relative weights of high, medium, and low-resolution features respectively. The implementation consists of three fully connected layers: the first layer expands the 3-dimensional environment vector into 64-dimensional hidden features; the second layer compresses it to 5 dimensions corresponding to pyramid levels; and the final layer applies softmax to ensure weight normalization. This structure assigns a weight greater than 0.35 to 128×128 features under sufficient lighting (vector pointing to the first quadrant) and increases the weight of 16×16 features to 0.4 under murky conditions (vector pointing to the second quadrant), consistent with the identifiable characteristics of coral reefs in different environments.
[0072] In the weighting application stage, channel-wise multiplication is used for feature recalibration. Each of the five feature maps is multiplied by its corresponding weight coefficient, maintaining the original dimensionality. This fine-grained adjustment is more precise than traditional inter-layer weight allocation. For example, in cases of partial occlusion, only the channel response of the affected spatial region is reduced, rather than the entire layer's features. During processing, the feature dimension is gradually compressed from 256 channels to a single-channel probability output, while the spatial resolution remains constant at 512×512, ensuring that each input pixel corresponds to a unique probability prediction value.
[0073] Step S104: Set up a multi-level fusion decoder to receive adaptive coral reef feature representations, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map.
[0074] In one specific embodiment, the process of executing step S104 may specifically include the following steps:
[0075] The multi-level fusion decoder consists of five decoding blocks, each corresponding to a feature layer of the adaptive coral reef feature representation. Decoding is performed through a symmetrical upsampling structure to obtain the decoder framework.
[0076] The adaptive coral reef feature representation is input into the decoder framework. A progressive feature fusion strategy is adopted to upsample the highest layer features through transposed convolution and make skip connections with the corresponding encoder features. The features are fused layer by layer until the original resolution is restored, resulting in progressively fused features.
[0077] Based on progressive fusion features, a multi-scale receptive field module is introduced in each decoding block. Convolutional kernels of different sizes are used to process the fused features in parallel and combine them with a boundary enhancement module to detect edge information through the Sobel operator. The edge features and semantic features are then weighted and fused to obtain the boundary enhancement features.
[0078] The boundary enhancement features are processed to generate a probability distribution map of the coral reef.
[0079] Specifically, the designed multi-level fusion decoder achieves the conversion process from adaptive feature representation to high-precision probability distribution map through progressive upsampling and cross-scale feature fusion mechanisms.
[0080] First, the decoder architecture adopts a five-layer pyramid structure symmetrical to the encoder, with each decoding block corresponding to a feature layer of a specific resolution. The input adaptive reef feature representation contains five sets of feature maps, with resolutions increasing sequentially from 8×8 to 128×128, and each set of feature maps has 256 channels. The decoding process starts with the lowest resolution 8×8 features, performing a 2x upsampling through transposed convolution, with the kernel size set to 4×4 to ensure sufficient neighborhood information participates in the computation. The upsampled features are then concatenated with the 16×16 features passed through the encoder path via skip connections. Before concatenation, a 1×1 convolution is used to unify the channel dimension to 128 dimensions to avoid feature dilution. This progressive fusion strategy maintains the integrity of high-level semantics while gradually restoring spatial detail information.
[0081] Secondly, a multi-scale receptive field module is embedded in the core position of each decoding block, employing a three-way parallel convolutional structure to process fused features. The first path uses a 3×3 standard convolution to capture local neighborhood features, suitable for coral reef texture analysis; the second path uses a 5×5 dilated convolution (dilation rate 2) to expand the receptive field to 9×9, detecting medium-sized coral community structures; the third path applies a 7×7 depthwise separable convolution, covering a larger area while reducing computational cost, identifying the overall pattern of coral reef distribution. After the three outputs are concatenated along the channel dimension, cross-scale feature interaction is achieved through a 1×1 convolution, generating 256-dimensional multi-scale fused features.
[0082] Furthermore, the boundary enhancement module improves edge localization accuracy by fusing spatial gradient information. The Sobel operator is implemented with a 3×3 convolution kernel, calculating the spatial gradients of the feature maps in both the horizontal and vertical directions. The gradient magnitudes are then fused using the L2 norm to form an edge intensity map. This intensity map is then gated and added to the multi-scale fused features. The gating coefficients are adaptively generated from the feature maps, ensuring that edge responses are suppressed in flat regions and contour information is enhanced in boundary regions.
[0083] Finally, the decoding stage employs cascaded convolutional layers to process boundary enhancement features. The first 3×3 convolutional layer, combined with batch normalization and the LeakyReLU activation function, performs feature transformation. The second 1×1 convolutional layer compresses the number of channels to one dimension, outputting a single-channel feature response map. All decoded block outputs are uniformly upsampled to 512×512 resolution using bilinear interpolation. The response values are then mapped to probability values in the [0,1] interval using the sigmoid function, forming a two-dimensional distribution matrix of the probability of coral reef existence. The value of each pixel in this matrix represents the probability that the location belongs to the coral reef region. After thresholding, a binary mask can be directly generated.
[0084] In one specific embodiment, the process of performing final decoding output processing on the boundary enhancement features to generate a coral reef probability distribution map may specifically include the following steps:
[0085] Boundary enhancement features are passed through a residual connection structure. Each decoding block contains two convolutional layers, a batch normalization layer, and an activation function for deep feature processing to obtain deep decoding features.
[0086] Based on deep decoding features, a fully convolutional network structure is used to perform pixel-level classification calculation. The classification probability value of each pixel location belonging to the coral reef area is calculated by the convolution kernel to obtain the pixel classification probability.
[0087] The pixel classification probability is processed by applying the Sigmoid activation function to map the probability value to the interval between zero and one, thus obtaining the normalized probability value.
[0088] Based on the normalized probability values, a complete two-dimensional probability distribution matrix is reconstructed according to the pixel position, generating a coral reef probability distribution map.
[0089] Specifically, boundary enhancement features are input to the final decoding stage as tensors of 512×512×256 dimensions, and residual connection structures establish multi-level feature propagation paths. 128×128 resolution features are upsampled to the target size via bilinear interpolation, 64×64 features are transposed through convolution to restore spatial details, and 32×32 features preserve global contextual information. The three levels of residual features are adjusted to 64 dimensions using 1×1 convolutions and then weighted and summed with the current layer features. The weight coefficients are dynamically generated by a three-layer fully connected network to ensure the adaptability of feature fusion. The first convolutional layer within the decoding block uses a 3×3 kernel to process the 256-dimensional input, and the output features are normalized to adjust their distribution. Moving average statistics record the global mean and variance during training, and are used consistently during inference. The LeakyReLU activation function introduces a non-linear transformation, with a slope of 0.01 in the negative interval to avoid the vanishing gradient problem. The second convolutional layer compresses the channels to 128 dimensions using a 1×1 kernel size, reducing subsequent computational complexity. The convolutional weights are initialized to a He normal distribution, and the bias terms are initialized to zero.
[0090] A fully convolutional classifier processes 128-dimensional depth-decoded features. The classification layer uses a single 3×3 convolutional kernel, with kernel parameters designed as a ring distribution with positive weights at the center and negative weights at the edges, based on the coral reef morphology. The dot product response is calculated for each spatial location using a sliding window, and parallel computation on a 512×512 grid generates a complete response map. The response values are mapped to probability values using a sigmoid function, with a temperature coefficient of 0.8 to control the gradient slope, and the output value range is strictly limited to 0-1. The probability distribution matrix reconstruction process maintains the spatial coordinate correspondence: matrix row numbers correspond to image latitude coordinates, and column numbers correspond to longitude coordinates. 32-bit floating-point format storage ensures numerical accuracy. The probability value for coral reef areas is typically higher than 0.7, while the background area is lower than 0.3, exhibiting a smooth gradient characteristic in the transition zone. This distribution characteristic provides a reliable foundation for subsequent adaptive thresholding segmentation. During processing, the feature dimension is progressively compressed from 256 channels to a single-channel probability output, while the spatial resolution remains constant at 512×512, ensuring that each input pixel corresponds to a unique probability prediction value.
[0091] Step S105: Apply the adaptive threshold segmentation algorithm to process the coral reef probability distribution map, combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef mask result.
[0092] In one specific embodiment, the process of executing step S105 may specifically include the following steps:
[0093] Histogram distribution feature analysis was performed on the probability distribution map of coral reefs. By calculating the threshold point with the largest inter-class variance and combining it with the connectivity constraints of coral reef regions, an adaptive segmentation threshold was obtained.
[0094] Binarization segmentation is performed on the probability distribution map of coral reefs based on an adaptive segmentation threshold. Pixels with probability values higher than the threshold are marked as coral reef regions, and pixels with probability values lower than the threshold are marked as background regions, thus obtaining an initial binary mask.
[0095] The initial binary mask is processed sequentially by morphological opening and closing operations. The structuring element is first used to perform erosion and dilation operations to remove noise points, and then dilation and erosion operations are performed to fill holes and fractures, resulting in a morphologically optimized mask.
[0096] The morphologically optimized mask is smoothed by a Gaussian filter to eliminate jagged artifacts at the boundaries, and the overall mask quality score is calculated to obtain the coral reef mask result.
[0097] Specifically, the coral reef probability distribution map is used as a 512×512 resolution single-channel floating-point matrix input for the threshold segmentation stage. Each element in the matrix has a value range of [0,1], representing the probability that the corresponding pixel belongs to the coral reef region. The adaptive threshold calculation employs an improved Otsu algorithm, introducing connected component constraints based on the traditional inter-class variance maximization. The probability histogram divides the [0,1] interval into 100 bins with an interval of 0.01, and the pixel frequency in each bin is counted to form a distribution curve. The algorithm traverses all possible threshold candidate points, and for each candidate threshold... t Calculate the prospect (probability ≥ t ) and background (probability < t The inter-class variance of the data is calculated, and the area ratio of the largest connected region in the foreground pixels is also statistically analyzed. The objective function is designed as a weighted product of the inter-class variance and the area ratio of the connected region. The weight coefficients are set to 0.7 to 0.3 based on the morphological characteristics of coral reefs to ensure that the segmentation results maintain both inter-class discriminative power and conform to the continuous distribution characteristics of coral reefs. Optimal threshold... t The calculation process is accelerated in parallel on the GPU through exhaustive search, and the processing time is controlled within 8ms.
[0098] In the binarization stage, the probability matrix is compared pixel-by-pixel with a threshold t. Pixels with a probability value ≥ t are set to 1 (coral reef), and the rest are set to 0 (background), generating an initial binary mask. This mask removes isolated noise points with an area less than 50 pixels through four-connected region analysis, while filling internal holes with an area less than 100 pixels. Morphological processing uses a sequence of circular structuring elements. In the opening operation stage, a circular kernel with a radius of 3 pixels is used to first perform an erosion operation to eliminate edge burrs, and then a dilation operation is performed to restore the shape of the main area. In the closing operation stage, a circular kernel with a radius of 5 pixels is used to first dilate and fill small fractures, and then erode to trim the boundary contours. Morphological operations are implemented with FPGA hardware acceleration, and the processing time for a single image is no more than 5ms.
[0099] In the boundary optimization stage, the morphologically processed binary mask is fused with the original probability map. A Gaussian filter is selected. σ A 7×7 kernel with a resolution of 1.5 is used to perform weighted smoothing on the region within a 3-pixel range of the binary boundary. The weight coefficients are taken from the corresponding position values of the probability map, achieving a soft transition from hard segmentation boundaries to probability-based smoothing. The quality evaluation module calculates three metrics for the mask: boundary tortuosity (calculated through chain code analysis), region compactness (4... π The quality score is calculated by linearly combining three indicators: area / perimeter², probability consistency (mean probability within the mask area), and other metrics. Masks scoring below 70 points trigger a manual review process. The final output coral reef mask is saved in GeoTIFF format, along with the threshold parameters and quality score as metadata.
[0100] The above describes the automatic coral reef mask extraction method based on artificial intelligence in the embodiments of this application. The following describes the processing flow of the automatic coral reef mask extraction method based on artificial intelligence in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the automatic coral reef mask extraction method based on artificial intelligence in this application includes the following processing flow:
[0101] The AI-based automatic coral reef mask extraction method comprises four core processing steps, forming a complete end-to-end processing chain. First, the data standardization process intelligently grades the input raw coral reef images (high / medium / low), performing normalization + color conversion, histogram equalization + contrast enhancement, and multi-scale Reinex processing for different quality levels, uniformly outputting 512×512 resolution Lab color space data. Second, the feature extraction process constructs a five-layer feature pyramid using an improved ResNet architecture, employing techniques such as depthwise separable convolution, dilated convolution, and SE attention mechanisms to extract the five-layer feature pyramid across a multi-scale space ranging from 128×128 to 8×8, including: global semantic features, local texture features, region boundary features, detail edge features, and pixel-level features. Further, for environment adaptive processing, parallel execution of illumination, water quality, and occlusion evaluation branches generates an environment complexity vector through a learnable dynamic weight formula. Finally, in the decoding output process, a three-way parallel feature fusion strategy is adopted: the first path uses standard 3×3 convolution to extract local neighborhood features, the second path uses 5×5 dilated convolution to expand the receptive field, and the third path uses 7×7 depthwise separable convolution to reduce computational complexity. The three features are added element-wise to achieve multi-scale information fusion. Bilinear interpolation is used to complete progressive upsampling, gradually reconstructing from 8×8 to 128×128 resolution. Combined with the improved Otsu algorithm for hybrid threshold segmentation, the output mask is morphologically optimized by 5×5 circular structural elements.
[0102] The above describes the processing flow of the AI-based automatic coral reef mask extraction method in the embodiments of this application. The following describes the AI-based automatic coral reef mask extraction system in the embodiments of this application. Please refer to [link / reference]. Figure 3 One embodiment of the artificial intelligence-based automatic coral reef mask extraction system in this application includes:
[0103] The acquisition module 301 is used to acquire multi-source coral reef remote sensing images, analyze the image quality through an environment-adaptive preprocessing algorithm, perform hierarchical preprocessing, and generate a standardized coral reef image dataset.
[0104] Input module 302 is used to construct a multi-scale feature pyramid encoder. It inputs a standardized coral reef image dataset into the encoder to extract feature information at different resolutions and outputs a five-layer coral reef feature pyramid.
[0105] Analysis module 303 is used to establish the five-layer coral reef feature pyramid analyzed by the environmental perception module, calculate the environmental complexity vector and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation;
[0106] The fusion module 304 is used to set up a multi-level fusion decoder to receive the adaptive coral reef feature representation, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map.
[0107] The output module 305 is used to process the coral reef probability distribution map by applying an adaptive threshold segmentation algorithm, and combine morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef masking result.
[0108] above Figure 3 The automatic coral reef mask extraction system based on artificial intelligence in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The automatic coral reef mask extraction device based on artificial intelligence in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0109] Reference Figure 4 This invention also provides an AI-based automatic coral reef mask extraction device 400, which can be a server, and its internal structure can be as follows: Figure 4As shown. This AI-based automated coral reef mask extraction device includes a processor 402, a memory 403, a display screen 404, an input device 405, a network interface 406, and a database 407 connected via a system bus 401. The processor 402, designed as a computer, provides computing and control capabilities. The memory 403 of the AI-based automated coral reef mask extraction device includes a non-volatile storage medium 4031 and internal memory 4032. The non-volatile storage medium 4031 stores the operating system and computer programs. The internal memory 4032 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database 407 of the AI-based automated coral reef mask extraction device stores the data corresponding to this embodiment. The network interface 406 of the AI-based automated coral reef mask extraction device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.
[0110] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the artificial intelligence-based automatic coral reef mask extraction device to which the present invention is applied.
[0111] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the artificial intelligence-based automatic coral reef mask extraction method.
[0112] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an artificial intelligence-based automatic coral reef mask extraction device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic method for extracting coral reef masks based on artificial intelligence, characterized in that, The method includes: Step S101: Collect multi-source coral reef remote sensing images, analyze the image quality through an environment-adaptive preprocessing algorithm and perform hierarchical preprocessing to generate a standardized coral reef image dataset. Step S102: Construct a multi-scale feature pyramid encoder. Input the standardized coral reef image dataset into the encoder to extract feature information at different resolutions and output a five-layer coral reef feature pyramid. This includes: constructing a multi-scale feature pyramid encoder using an improved ResNet backbone network; expanding the network depth by adding fine-grained feature layers to obtain a five-layer feature pyramid structure; inputting the standardized coral reef image dataset into the five-layer feature pyramid structure to extract global semantic features, regional boundary features, local texture features, detail edge features, and pixel-level features to obtain a multi-scale feature map set; using depthwise separable convolution instead of traditional convolution for feature processing based on the multi-scale feature map set; achieving element-wise addition of high-level semantic information and low-level features through lateral connections and top-down path fusion to obtain a fused feature representation; and expanding the channel dimension of the fused feature representation so that each feature map contains the same number of channels to obtain a five-layer coral reef feature pyramid. Step S103: Establish an environmental perception module to analyze the five-layer coral reef feature pyramid, calculate the environmental complexity vector, and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation. This includes: constructing an environmental perception module containing three parallel branch networks: a light assessment branch, a water quality assessment branch, and an occlusion assessment branch; inputting the five-layer coral reef feature pyramid into each branch for environmental analysis to obtain light uniformity index, water quality clarity index, and occlusion complexity index; fusing the light uniformity index, water quality clarity index, and occlusion complexity index through a fully connected layer to obtain an environmental complexity vector; assigning weights to the five-layer coral reef feature pyramid using a channel attention mechanism based on the environmental complexity vector; enhancing high-resolution feature weights for well-lit environments, enhancing low-resolution global feature weights for weak light or turbid environments, and balancing feature weights at various scales for highly occluded environments to obtain a weight allocation result; and performing element-wise multiplication operations between the weight allocation result and the five-layer coral reef feature pyramid to obtain an adaptive coral reef feature representation. Step S104: Set up a multi-level fusion decoder to receive the adaptive coral reef feature representation, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map; Step S105: Apply the adaptive threshold segmentation algorithm to process the coral reef probability distribution map, combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef masking result.
2. The method for automatic extraction of coral reef masks based on artificial intelligence according to claim 1, characterized in that, Step S101 further includes: The image quality assessment model was used to detect low-light areas, water turbidity, and color shift in multi-source coral reef remote sensing images, and the resulting image quality assessment vector was obtained. Based on the image quality assessment vector, a layered preprocessing strategy is performed on the coral reef remote sensing image. Size normalization and color space conversion are performed on the high-quality image, histogram equalization and contrast enhancement are added to the medium-quality image, and the multi-scale Retinex algorithm is used to perform illumination compensation and detail enhancement on the low-quality image to obtain the quality-optimized image. The quality-optimized image is subjected to data augmentation operations such as random rotation, horizontal and vertical flipping, random cropping, and elastic deformation to obtain augmented image data. Based on the augmented image data, a 512×512 pixel resolution adjustment process is performed and the pixel values are normalized to the [0,1] interval to obtain a standardized coral reef image dataset.
3. The method for automatic extraction of coral reef masks based on artificial intelligence according to claim 1, characterized in that, Step S104 further includes: The multi-level fusion decoder consists of five decoding blocks, each corresponding to a feature layer of the adaptive coral reef feature representation. Decoding is performed through a symmetrical upsampling structure to obtain the decoder framework. The adaptive coral reef feature representation is input into the decoder framework. A progressive feature fusion strategy is adopted to upsample the highest layer features through transposed convolution and make skip connections with the corresponding encoder features. The features are fused layer by layer until the original resolution is restored, and progressive fused features are obtained. Based on the progressive fusion feature, a multi-scale receptive field module is introduced in each decoding block. Convolutional kernels of different sizes are used to process the fusion feature in parallel and combined with the boundary enhancement module to detect edge information through the Sobel operator. The edge features and semantic features are weighted and fused to obtain the boundary enhancement feature. The boundary enhancement features are then processed to generate a coral reef probability distribution map.
4. The method for automatic extraction of coral reef masks based on artificial intelligence according to claim 3, characterized in that, The final decoding output processing of the boundary enhancement features to generate a coral reef probability distribution map includes: The boundary enhancement features are passed through a residual connection structure. Each decoding block contains two convolutional layers, a batch normalization layer, and an activation function for deep feature processing to obtain deep decoding features. Based on the aforementioned deep decoding features, a fully convolutional network structure is used to perform pixel-level classification calculations. The classification probability value of each pixel location belonging to the coral reef region is calculated by the convolutional kernel to obtain the pixel classification probability. The pixel classification probability is processed by the Sigmoid activation function to map the probability value to the interval between zero and one, thus obtaining the normalized probability value. Based on the normalized probability values, a complete two-dimensional probability distribution matrix is reconstructed according to pixel positions to generate a coral reef probability distribution map.
5. The method for automatic extraction of coral reef masks based on artificial intelligence according to claim 1, characterized in that, Step S105 further includes: Histogram distribution feature analysis was performed on the probability distribution map of the coral reef. By calculating the threshold point with the largest inter-class variance and combining it with the connectivity constraints of the coral reef region, an adaptive segmentation threshold was obtained. Based on the adaptive segmentation threshold, the probability distribution map of the coral reef is subjected to binarization segmentation processing. Pixels with probability values higher than the threshold are marked as coral reef regions, and pixels with probability values lower than the threshold are marked as background regions, thus obtaining an initial binary mask. The initial binary mask is subjected to a sequence of morphological opening and closing operations. First, erosion and dilation operations are performed on the structuring element to remove noise points, and then dilation and erosion operations are performed to fill holes and fractures, resulting in a morphologically optimized mask. The morphologically optimized mask is smoothed by a Gaussian filter to eliminate jagged artifacts at the boundaries, and a comprehensive mask quality score is calculated to obtain the coral reef mask result.
6. An automated coral reef mask extraction system based on artificial intelligence, characterized in that, For implementing the AI-based automatic coral reef mask extraction method as described in any one of claims 1-5, the AI-based automatic coral reef mask extraction system comprises: The acquisition module is used to acquire multi-source coral reef remote sensing images, analyze image quality through an environment-adaptive preprocessing algorithm, perform hierarchical preprocessing, and generate a standardized coral reef image dataset. The input module is used to construct a multi-scale feature pyramid encoder. The standardized coral reef image dataset is input into the encoder to extract feature information at different resolutions, outputting a five-layer coral reef feature pyramid. This includes: constructing a multi-scale feature pyramid encoder using an improved ResNet backbone network, expanding the network depth by adding fine-grained feature layers to obtain a five-layer feature pyramid structure; inputting the standardized coral reef image dataset into the five-layer feature pyramid structure to extract global semantic features, region boundary features, local texture features, detail edge features, and pixel-level features, respectively, to obtain a multi-scale feature map set; using depthwise separable convolution instead of traditional convolution for feature processing based on the multi-scale feature map set, and achieving element-wise addition of high-level semantic information and low-level features through lateral connections and top-down path fusion to obtain a fused feature representation; and expanding the channel dimension of the fused feature representation so that each feature map contains the same number of channels, resulting in a five-layer coral reef feature pyramid. The analysis module is used to establish an environmental perception module to analyze the five-layer coral reef feature pyramid, calculate the environmental complexity vector, and recalibrate the feature weights of each layer to form an adaptive coral reef feature representation. This includes: constructing a parallel branch network for the environmental perception module, comprising a light assessment branch, a water quality assessment branch, and an occlusion assessment branch; inputting the five-layer coral reef feature pyramid into each branch for environmental analysis to obtain light uniformity, water quality clarity, and occlusion complexity indices; fusing these indices through a fully connected layer to obtain an environmental complexity vector; assigning weights to the five-layer coral reef feature pyramid using a channel attention mechanism based on the environmental complexity vector; enhancing high-resolution feature weights for well-lit environments, enhancing low-resolution global feature weights for weak light or turbid environments, and balancing feature weights at various scales for highly occluded environments; and performing element-wise multiplication of the weight allocation results with the five-layer coral reef feature pyramid to obtain the adaptive coral reef feature representation. The fusion module is used to set up a multi-level fusion decoder to receive the adaptive coral reef feature representation, perform progressive upsampling and cross-scale feature fusion, and generate a coral reef probability distribution map. The output module is used to process the coral reef probability distribution map using an adaptive threshold segmentation algorithm, and combine it with morphological post-processing to eliminate noise and smooth boundaries, and output the coral reef masking result.
7. An automated coral reef mask extraction device based on artificial intelligence, characterized in that, It includes a memory and a processor, the memory storing a computer program that can run on the processor, and the processor executing the computer program to implement the artificial intelligence-based automatic coral reef mask extraction method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to perform the artificial intelligence-based automatic coral reef mask extraction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Coral reef benthic substance information extraction method
CN115131681A