Remote sensing water depth inversion model training method based on feature-space balanced sampling

CN123016002APending Publication Date: 2026-10-30BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611267481.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

(1)浅海遥感影像中的相邻像元在光谱、纹理与地形属性上通常高度相似,大量临近样本重复携带相近信息,导致训练集内部存在严重冗余;(2)由于真实海底地形与海岸带地貌分布不均,不同水深区间的样本数量天然失衡,浅水样本往往占据主导,而深水、过渡带或复杂地形边缘样本相对稀缺,模型容易被多数样本主导而产生训练偏置;(3)若仅依赖随机抽样或简单空间抽样,虽然可以减少样本数量,但往往无法同时保证样本在特征表示空间中的代表性和在地理空间中的均匀性,从而导致关键地貌模式、复杂底质模式或边界变化样本被遗漏,进而削弱模型精度与跨区域泛化能力

Benefits of technology

本发明通过构建融合深度语义、光谱物理、空间位置及地形变化信息的联合特征子空间,并协同最远优先核心集选择、空间最小间距约束与水深区间平衡约束,实现了多维度的技术效果:在训练效率方面,有效剔除了大规模遥感样本中的空间自相关冗余,以约1%的采样比例即可替代全量训练,大幅降低计算成本;在反演精度方面,克服了随机采样和单一特征或空间采样的偏倚,显著增强了样本在特征覆盖、空间分散与水深分布上的均衡性,使模型在测试区域的水深反演误差明显降低且稳定性更高;在泛化能力方面,基于采样掩膜控制监督信号的训练方式在不改变网络结构的前提下保留了图像上下文,并促使模型在多个跨区域岛礁场景中均表现出更优的误差控制能力与泛化性能,最终实现了样本效率、反演精度与跨区域适用性的协同提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016002A_ABST
    Figure CN123016002A_ABST
Patent Text Reader

Abstract

The application discloses a remote sensing water depth inversion model training method based on feature-space balanced sampling, and the method comprises the following steps: firstly, a preheated water depth inversion model is used to extract deep features related to the water depth task, then image spectral features, spatial coordinate features and terrain change features are fused to construct a joint feature representation for sample selection; subsequently, Core-set representative sampling is performed in the joint feature representation, and a spatial minimum distance constraint and a water depth interval balance constraint are added in the sampling process to finally generate a sampling mask; finally, only the pixels marked by the sampling mask are used for supervised training. Therefore, the application does not simply reduce the number of training samples, but realizes efficient sample training through a complete technical process of "task-related feature representation construction-representative sample selection-spatial redundancy suppression-water depth distribution balance-masked supervised training".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of satellite remote sensing water depth inversion technology, and in particular to a training method for a remote sensing water depth inversion model based on feature-spatial balanced sampling. Background Technology

[0002] Satellite remote sensing depth retrieval missions typically rely on multispectral remote sensing imagery and high-quality ground truth depth data for supervised training. With the increasing spatial resolution of remote sensing imagery and the expansion of the study area, the size of the training sample has grown rapidly, with supervised samples constructed pixel-by-pixel often reaching hundreds of thousands or even millions. Superficially, large-scale samples seem beneficial for depth model training; however, in shallow sea remote sensing scenarios, training data simultaneously exhibits significant spatial autocorrelation, sample distribution skewness, and information redundancy, thus making "full-scale training" not equivalent to "optimal training." The shortcomings of existing technologies are: (1) Adjacent pixels in shallow sea remote sensing images are usually highly similar in terms of spectral, texture and topographic attributes. A large number of neighboring samples repeatedly carry similar information, resulting in serious redundancy within the training set. (2) Due to the uneven distribution of real seabed topography and coastal landforms, the number of samples in different water depth ranges is naturally unbalanced. Shallow water samples often dominate, while deep water, transition zone or complex terrain edge samples are relatively scarce. The model is easily dominated by the majority of samples, resulting in training bias. (3) If only random sampling or simple spatial sampling is used, although the number of samples can be reduced, it is often impossible to simultaneously guarantee the representativeness of the samples in the feature representation space and the uniformity in the geographic space. This leads to the omission of key landform patterns, complex seabed patterns or boundary change samples, thereby weakening the model accuracy and cross-regional generalization ability.

[0003] Furthermore, true water depth data typically originates from airborne laser bathymetry, shipborne surveying, or other high-cost mapping methods. Therefore, when constructing shallow water depth inversion models, selecting a small proportion of high-quality training samples from a large-scale, highly redundant, and unevenly distributed candidate sample set, which balances feature representativeness, spatial balance, and reasonable depth distribution, has become a key issue restricting the improvement of model efficiency and generalization performance.

[0004] To address the characteristics of satellite remote sensing water depth retrieval training samples, such as strong spatial autocorrelation, high local redundancy, and uneven water depth distribution, this invention provides a training sample selection and model training method. This method ensures that a small number of samples selected from a large pool of effective supervisory pixels simultaneously meet the requirements of task feature coverage, spatial dispersion, and water depth interval coverage, thereby reducing resource consumption and sampling bias caused by redundant samples participating in training. This invention also proposes a feature-spatial balanced sample selection method for shallow sea remote sensing scenarios, which maintains or improves model accuracy and generalization performance while significantly reducing the size of the training sample. Summary of the Invention

[0005] The purpose of this invention is to provide a training method for a remote sensing water depth inversion model based on feature-spatial balanced sampling. The training method based on sampling mask control of the supervision signal preserves the image context without changing the network structure, and enables the model to exhibit better error control and generalization performance in multiple cross-regional island and reef scenarios. Ultimately, it achieves a synergistic improvement in sample efficiency, inversion accuracy and cross-regional applicability.

[0006] To achieve the above objectives, the present invention provides the following solution: A training method for a remote sensing water depth inversion model based on feature-spatial balanced sampling includes the following steps: S1. Acquire multispectral remote sensing images of the target sea area and corresponding ground truth water depth data, perform preprocessing, spatial registration and cropping to obtain training image patches, including multiband remote sensing image patches, ground truth water depth maps and effective supervision masks; wherein the effective supervision mask marks pixels with reliable ground truth water depth values. S2. Use training image patches to preheat the preset water depth inversion network, extract intermediate feature maps from multiple coding layers or multi-scale feature layers of the preheated water depth inversion network, and stitch them together after channel compression and spatial resolution unification to obtain the deep task features of each effective pixel. S3. Concatenate the deep task features and auxiliary features of each effective pixel into a joint feature vector. Standardize the joint feature vector to construct a unified joint feature subspace. S4. In the joint feature subspace, representative samples are selected step by step based on the core set selection mechanism of the farthest priority traversal strategy. During the selection process, spatial minimum spacing constraints and water depth distribution balance constraints are introduced simultaneously to finally generate the sampling mask corresponding to each training image block. S5. Combine the sampling mask with the effective supervision mask to obtain the final supervision region mask. In the formal training phase, input the training image patch into the water depth inversion network, calculate the supervision loss only at the position marked by the final supervision region mask and update the model parameters to complete the model training. S6. Input the multispectral remote sensing image to be inverted into the trained water depth inversion network to obtain the corresponding water depth estimation map.

[0007] Preferably, in S1, the multispectral remote sensing image uses Sentinel-2 blue, green, and red band surface reflectance data; the true water depth data uses airborne laser bathymetry data; preprocessing includes cloud, cloud shadow, solar flare, land area and anomalous pixel removal, multi-temporal image screening and fusion, and unified elevation benchmark conversion.

[0008] Preferably, in S2, the water depth inversion network adopts a dual-branch structure that includes a main branch for water depth prediction and a physical prior auxiliary branch. The physical prior auxiliary branch introduces the water depth index as auxiliary information. After the preheating training is completed, multi-scale feature maps are extracted from the shallow, middle and high layers of the encoder, channel compression is performed by 1×1 convolution, and then the maps are stitched together after upsampling to restore them to a uniform spatial resolution.

[0009] Preferably, in S3, the auxiliary features include one or more of the following: normalized multispectral band features, band ratio features, brightness features, normalized spatial coordinate features, and water depth gradient amplitude features; wherein, the water depth gradient amplitude features are obtained by calculating the true water depth or the initial predicted water depth of the preheating model, and are used to highlight the topographic change areas of slope breaks, reef edges, channels, and shallow-deep transition zones.

[0010] Preferably, in S4, a core set selection mechanism based on the furthest-first traversal strategy is used to progressively select representative samples, specifically including: Let the candidate sample set be The selected sample set is Then the minimum feature distance from candidate sample p to the selected set is... Defined as:

[0011] In each iteration, the sample with the largest minimum distance is selected and added to the selected set; candidate samples must satisfy a preset spatial spacing constraint:

[0012] in, To preset the minimum spatial spacing threshold, The distance between the image planes, , Let p be the joint feature vector, where p is the candidate sample. This is the selected sample.

[0013] Preferably, in S4, the minimum spatial spacing constraint and water depth distribution balance constraint are introduced simultaneously during the selection process, specifically including: Minimum Spatial Spacing Constraint: Requires that the spatial distance between any two selected samples on the image plane is not less than a preset threshold; Water depth distribution balance constraint: Divide the candidate samples into multiple depth intervals according to the true water depth value, and allocate corresponding sample budgets to each interval. Perform Core-set sampling with spatial constraints independently in each depth interval, or explicitly control the sample ratio of each interval during the overall sampling process.

[0014] Preferably, in S5, for the water depth inversion network including a physical prior auxiliary branch, the main task water depth loss and the auxiliary branch loss share the same sampling mask; let the original effective supervision mask be... The sampling mask is The final supervised region mask is then represented as:

[0015] in, This represents an element-wise logical AND or OR product operation.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a remote sensing water depth inversion model training method based on feature-space balanced sampling as described above.

[0017] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention achieves multi-dimensional technical effects by constructing a joint feature subspace that integrates deep semantics, spectral physics, spatial location, and terrain change information, and by coordinating the selection of the farthest priority core set, spatial minimum spacing constraints, and water depth interval balance constraints. In terms of training efficiency, it effectively eliminates spatial autocorrelation redundancy in large-scale remote sensing samples, allowing full training to be replaced with approximately 1% sampling, significantly reducing computational costs. Regarding inversion accuracy, it overcomes the biases of random sampling and single feature or spatial sampling, significantly enhancing the balance of samples in feature coverage, spatial dispersion, and water depth distribution, resulting in a significant reduction in water depth inversion error and higher stability in the test area. In terms of generalization ability, the training method based on sampling mask control of the supervision signal preserves the image context without changing the network structure, and enables the model to exhibit better error control and generalization performance in multiple cross-regional island and reef scenarios, ultimately achieving a synergistic improvement in sample efficiency, inversion accuracy, and cross-regional applicability. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the training method for the remote sensing water depth inversion model based on feature-spatial balanced sampling provided by the present invention. Figure 2 This is a visualization result of the water depth gradient amplitude of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] like Figure 1 As shown, the present invention provides a method for training a remote sensing water depth inversion model based on feature-spatial balanced sampling, comprising the following steps: S1. Acquire multispectral remote sensing images of the target sea area and corresponding ground truth water depth data, perform preprocessing, spatial registration and cropping to obtain training image patches, including multiband remote sensing image patches, ground truth water depth maps and effective supervision masks; wherein the effective supervision mask marks pixels with reliable ground truth water depth values. S2. Use training image patches to preheat the preset water depth inversion network, extract intermediate feature maps from multiple coding layers or multi-scale feature layers of the preheated water depth inversion network, and stitch them together after channel compression and spatial resolution unification to obtain the deep task features of each effective pixel. S3. Concatenate the deep task features and auxiliary features of each effective pixel into a joint feature vector. Standardize the joint feature vector to construct a unified joint feature subspace. S4. In the joint feature subspace, representative samples are selected step by step based on the core set selection mechanism of the farthest priority traversal strategy. During the selection process, spatial minimum spacing constraints and water depth distribution balance constraints are introduced simultaneously to finally generate the sampling mask corresponding to each training image block. S5. Combine the sampling mask with the effective supervision mask to obtain the final supervision region mask. In the formal training phase, input the training image patch into the water depth inversion network, calculate the supervision loss only at the position marked by the final supervision region mask and update the model parameters to complete the model training. S6. Input the multispectral remote sensing image to be inverted into the trained water depth inversion network to obtain the corresponding water depth estimation map.

[0023] Specifically, the method of the present invention includes: Step 1: Constructing a remote sensing water depth training dataset Acquire multispectral remote sensing imagery of the target sea area and corresponding ground truth water depth data. Preprocess, register, and crop both to obtain foundational training data for sampling and training. Sentinel-2 surface reflectance imagery is preferentially used for multispectral remote sensing, with input bands encompassing blue, green, and red bands. Depending on available data conditions, it can be extended to near-infrared or other usable bands. Ground truth water depth data is preferentially used, primarily airborne laser bathymetry data, but shipborne bathymetry data or other high-precision water depth measurement data can also be used.

[0024] The remote sensing imagery and ground truth water depth data are processed as follows: (1) Remove clouds, cloud shadows, solar flares, land areas and anomalous pixels from remote sensing images; (2) Screening and fusing multi-temporal images to improve effective water coverage; (3) Convert the true water depth data to a unified elevation datum and spatially register it with the remote sensing image; (4) Unify remote sensing images and true water depth values ​​to the same spatial resolution; (5) Crop the image into training image patches according to the set size; (6) Generate an effective monitoring mask based on the validity of the true water depth value.

[0025] After the above processing, each training image patch encompasses three types of data: a multi-band remote sensing image patch, the corresponding ground truth depth map, and an effective supervision mask. The effective supervision mask is used to mark which pixels possess reliable ground truth depth values; only those pixels marked as valid will enter the subsequent sampling candidate set. In a preferred embodiment, the size of the training image patch can be set to 224×224 or 64×64; in the effective supervision mask, a value of 1 indicates that the pixel has a valid ground truth depth value, while a value of 0 indicates that the pixel does not participate in sampling and training.

[0026] Step 2: Train and warm up the model and extract task-related deep features. In order to make the sample selection results more relevant to the water depth inversion task itself, this invention does not directly carry out sampling in the original spectral pixel space, but first trains a preheated water depth inversion model, and then uses this model to extract deep features related to the task.

[0027] Specifically, the training image patches obtained in step S1 are input into the water depth inversion network for preheating training. This water depth inversion network can be a regular convolutional neural network, a U-Net-like network, a Transformer-like network, or the HybridBathNet network proposed by the applicant in the prior art. In a preferred embodiment, the preheating model adopts a structure that simultaneously includes a main branch for water depth prediction and a physical prior auxiliary branch. The main branch is specifically used to predict water depth, while the auxiliary branch is used to introduce physical prior information such as the water depth index (WDI).

[0028] The purpose of preheating training is not to obtain the final optimal model, but to enable the network to initially possess the ability to represent water depth. After preheating, intermediate feature maps are extracted from multiple coding layers or multi-scale feature layers of the network. Given that the feature maps output by different layers may differ in the number of channels and spatial resolution, this invention will unify these feature maps. First, channel compression is performed using 1×1 convolution or linear transformation. Then, upsampling or interpolation methods are used to restore the feature maps of different scales to a spatial resolution consistent with or approximately consistent with the input image patch. Finally, these feature maps from multiple scales are stitched together along the channel dimension to obtain the deep task features corresponding to each pixel.

[0029] The purpose of this step is to ensure that subsequent sampling is no longer limited to shallow spectral differences, but can reflect the differences in sediment, optical differences in water, topographic changes, and boundary transition patterns learned by the model in the task of water depth inversion.

[0030] Step 3: Construct the joint sampling feature subspace The joint feature representation in this invention is a key technical feature that distinguishes the FSBS sampling method from ordinary random sampling, spatial sampling, and general Core-set sampling. The joint feature representation preferably consists of two parts: deep task features and auxiliary features. The auxiliary features are used to supplement explicit information beyond the deep task features.

[0031] Deep task features are obtained from the intermediate layer output of the preheating water depth inversion model. Preferably, feature maps can be extracted from different scale layers of the encoder, such as shallow features, mid-level features, and high-level semantic features. Shallow features are more sensitive to edges, textures, and local spectral changes; mid-level features can express the sediment and water body change patterns; and high-level features are closer to the water depth prediction task itself. The feature maps at different scales are stitched together after channel compression and spatial resolution unification to obtain the deep task features for each pixel. This feature is used to characterize the task-related differences of pixels in the water depth inversion network.

[0032] Building upon deep network features, this paper further integrates original spectral information, auxiliary physical features, spatial location information, and terrain change information to construct a joint feature vector for each effective pixel. The joint features include at least one or more of the following: (1) Multi-scale deep semantic features extracted from the preheating model; (2) Original or normalized multispectral band characteristics; including reflectance of blue, green, red and other bands, used to preserve the original spectral response; (3) Shallow remote sensing features such as spectral ratio and brightness constructed from blue-green bands; for example, the blue-green band ratio or logarithmic ratio is used to reflect the trend of water body attenuation and water depth change; brightness features are used to characterize the overall reflectance intensity; (4) Normalized spatial coordinate features of pixels in image blocks; After normalizing the row and column coordinates of pixels, they are added to joint features to provide geographic location constraint information; (5) Topographic features such as gradient amplitude constructed from the initial predicted water depth or the true water depth; calculated from the true water depth or the initial predicted water depth, used to highlight topographic change areas such as slope breaks, reef edges, channels, and shallow-deep transition zones.

[0033] Among these features, water depth gradient magnitude is particularly suitable for enhancing the identification of terrain edges and changing areas. In shallow island and reef scenarios, these areas often have a small number of samples, but they are highly valuable for models learning complex terrain.

[0034] Let z be the joint eigenvector of pixel p. p Then it can be expressed as:

[0035] Where, d p Representing deep task characteristics, e p Indicates additional auxiliary features, This represents a vector concatenation operation. To avoid the unreasonable influence of features with different dimensions on subsequent distance calculations, the joint features are standardized and normalized to form a unified sampling candidate feature space.

[0036] Step 4: Perform feature-space balanced sampling For each training image patch, a core-set selection strategy based on the furthest-first traversal is used in the joint feature space to progressively select representative candidate samples. The basic idea is to prioritize samples that can cover currently underrepresented feature regions, thereby approximating the overall distribution with a smaller sample size.

[0037] Building upon this foundation, the present invention further introduces spatial balance constraints, requiring that any two selected samples satisfy a preset minimum spatial distance to reduce the repeated selection of locally adjacent pixels. Furthermore, to alleviate the training bias caused by the far greater number of shallow water samples compared to deep water samples in shallow sea scenarios, the present invention divides the candidate samples into multiple depth bins according to water depth ranges and assigns a corresponding sample budget to each bin, ensuring that the final sampling results remain relatively balanced across different water depth ranges.

[0038] Let the candidate sample set be The selected sample set is Then the minimum feature distance from candidate sample p to the selected set is defined as:

[0039] In each iteration, the sample with the largest minimum distance is preferentially selected and added to the selected set. At the same time, candidate samples must also meet the preset spatial spacing constraints in order to be ultimately retained.

[0040] After generating the sampling mask using the FSBS sampling method, it can be directly embedded into the existing water depth inversion model training process.

[0041] Specifically, during each training iteration, the model still uses the complete training image patch as input and outputs the corresponding water depth prediction map. However, when calculating the supervised loss, the loss is only calculated for locations jointly marked as valid by the sampling mask and the effective supervised mask. The advantage of this approach is that the model can still utilize the contextual information of the image patch for forward propagation, but during backpropagation, only the selected high-quality samples provide the supervised signal. This method is particularly suitable for pixel-level water depth inversion models because it does not require changes to the network structure; it only requires adding a supervised mask to the loss function. Therefore, this invention has strong engineering feasibility and model compatibility.

[0042] In a preferred embodiment, the FSBS sampling method is used in conjunction with HybridBathNet. HybridBathNet is first used as a warm-up model to extract multi-scale deep task features, and the FSBS sampling method generates a sampling mask based on these features; then, the sampling mask is used to train HybridBathNet or other water depth inversion models.

[0043] Through the above process, the sampling mask or sampling index set corresponding to each training image block can be obtained.

[0044] Specifically, spatial equilibrium constraints: Relying solely on feature distance for Core-set sampling may still result in the repeated selection of spatially adjacent samples in the image plane, making it difficult to effectively suppress spatial autocorrelation redundancy of remote sensing samples. To address this, the present invention further introduces a spatial balance constraint, requiring that a candidate sample, before being added to the selected set, must satisfy a preset minimum spatial distance with the currently selected samples.

[0045] Let the distance between pixel p and the selected sample q in the image plane be . Then the candidate samples must satisfy:

[0046] in, This is the preset minimum spatial spacing threshold.

[0047] This constraint effectively reduces the phenomenon of clustered sampling in local areas, lowers spatial redundancy, and improves sample compression efficiency. The spatial spacing threshold can be set according to image resolution, target terrain scale, and training block size, for example, set to 6 to 8 pixels.

[0048] Specifically, water depth distribution equilibrium constraints: Shallow water remote sensing training samples often exhibit a significantly higher number of shallow water pixels than deep water pixels. If the sampling process only focuses on feature coverage and spatial balance, the final result may still be biased towards the mainstream shallow water samples, leading to model instability in deeper waters or transitional zones. To address this, this invention further introduces a water depth distribution balance constraint.

[0049] Specifically, candidate samples are divided into multiple depth intervals according to the true water depth or a reliable reference depth, and a corresponding sample budget is allocated to each interval. Based on this, spatially constrained Core-set sampling can be performed independently within each depth interval, or the sample ratio of each interval can be explicitly controlled during the overall sampling process, so that the final training subset retains sufficiently representative samples in shallow, medium, and deep water areas.

[0050] This design can effectively alleviate the model bias caused by the skewness of the training set depth distribution and improve the stability and generalization ability of the model in different water depth ranges.

[0051] Step 5: Train the water depth inversion model based on a high-quality sample subset The sampling results are applied to the training data, and the supervision loss is calculated only for the selected valid pixels, thus completing the formal training of the target water depth inversion model. Let the original valid supervision mask be... The sampling mask is Then the supervised region that ultimately participates in the training can be represented as:

[0052] in, This represents an element-wise logical AND or OR product operation.

[0053] The formal training model can be a deep inversion network that includes a physical prior branch, or other neural network structures that support pixel-level supervision. By employing the high-quality training subset constructed in this invention, the model can achieve higher training efficiency with fewer training samples and maintain or improve inversion accuracy in the test area and cross-regional scenarios.

[0054] After sampling, this invention outputs a pixel-level sampling mask or sampling index list, which is then applied to the supervised region selection during the formal training phase. Valid pixels that are not selected do not participate in the gradient update of the current round; valid pixels that are selected participate in model parameter optimization according to the set loss function.

[0055] This training method can be easily embedded into existing pixel-level supervised training frameworks. For example, the original effective supervision mask can be combined with the sampling mask to obtain the final supervised region mask; for networks with auxiliary branches, the same sampling region can be shared in the main task loss and auxiliary loss to maintain consistency in the supervision range.

[0056] Step Six: Output the inversion model and sampling results After training, the final depth inversion model weights, sampling mask, sampling index, training log, and inference results on the target region are output. Inference results may include depth raster maps, error statistics, contour products, and visualizations.

[0057] The final output of the method of this invention includes, but is not limited to: (1) A subset of training samples, a sampling mask, or a sampling index obtained through feature-space balanced sampling; (2) The water depth inversion model trained based on this sample subset; (3) Water depth inference results and accuracy statistics for the target area; (4) Sample distribution analysis results, training efficiency analysis results and related visualization products.

[0058] The above outputs can be used for offline model training or further integrated into operational systems for shallow water depth mapping of islands and reefs.

[0059] This invention addresses the technical challenges of large training sample size, high spatial redundancy, insufficient representativeness of random or single sampling strategies, uneven sample distribution across different depth ranges, and limited cross-regional generalization ability in shallow sea remote sensing water depth inversion. It proposes an efficient training method based on feature-spatial balanced sampling. This method does not simply reduce the number of training samples; instead, it achieves this by jointly constructing a feature subspace, selecting the furthest-first core set, constraining the minimum spatial spacing, imposing water depth distribution constraints, and supervising training with a sampling mask. This ensures that the training subset simultaneously possesses feature coverage, spatial balance, and reasonable water depth distribution.

[0060] (1) In terms of sample redundancy control, the present invention alleviates the problem of adjacent pixels repeatedly participating in training during full training by using a feature-space balanced sampling mechanism.

[0061] To address the issues of high training costs and the lack of proportional information gain from full-scale training, this invention introduces Feature-Spatial Balanced Sampling during the sample construction phase. First, it utilizes a pre-warmed HybridBathNet to extract multi-layer depth features from the depth prediction and WDI branches. Then, it fuses auxiliary features such as RGB reflectance, blue-green ratio, brightness, normalized spatial coordinates, and depth gradient magnitude to construct a joint feature subspace. During the sampling phase, this invention employs a farthest-first core-set selection mechanism and sets a minimum spatial spacing constraint. This ensures that candidate samples not only supplement the existing sample set in the joint feature space but also maintain a certain distance from selected samples on the image plane. This reduces the possibility of repeatedly selecting highly similar pixels in locally adjacent regions, allowing the limited training samples to be distributed more widely across different spatial locations and feature regions. In the experiments conducted in this invention, training was performed under approximately 1% sampling conditions, rather than relying on all effective pixels. As shown in Table 1 (performance comparison of different sampling strategies on the Oahu test set), the experimental results show that on the Oahu test set, the fully trained HybridBathNet achieves an RMSE of 1.1425 m, an MAE of 0.8350 m, and a R... 2 0.9664; After adopting FSBS, RMSE decreased to 0.9376 m, MAE decreased to 0.6981 m, R 2 The error was increased to 0.9798. This result shows that, under the experimental conditions, the reduced sample size after constraint screening did not decrease the test performance; on the contrary, it achieved a lower error, thus demonstrating the effectiveness of the present invention in screening out redundant samples and improving the effectiveness of training samples.

[0062] Table 1

[0063] (2) In terms of sample representativeness, the present invention reduces the risk of missing key sample patterns by combining feature subspace and Core-set farthest priority selection.

[0064] To address the drawback of randomly sampled subsets inheriting the imbalanced characteristics of the original sample distribution, this invention does not directly randomly extract samples from effective pixels. Instead, it first constructs a joint feature representation containing deep task features, remote sensing spectral features, spatial location features, and terrain gradient features, and then performs farthest-priority core-set selection within this feature space. The logic of farthest-priority selection is: at each step, candidate samples that are farther away from the currently selected sample set are prioritized, thus gradually expanding the coverage of the training subset in the joint feature space. Since the joint feature space contains information related to the water depth inversion task, this mechanism is more targeted than random sampling. As shown in Table 2 (ablation experiment results of FSBS on the Oahu test set), the experimental results show that on the Oahu test set, the RMSE of the 1% random sampling scheme is 1.0358 m, MAE is 0.7720 m, and R... 2 The value was 0.9724; after using only the core-set mechanism, the RMSE was 1.0175 m, the MAE was 0.7601 m, and the R... 2 The mean RMSE was 0.9734; the complete FSBS further achieved an RMSE of 0.9376 m, a MAE of 0.6981 m, and an R² of 0.9798. Meanwhile, Table 2 shows the mean and fluctuation of RMSE from multiple experiments, indicating that the RMSE for 1% random sampling was 1.177 ± 0.210 m, while that for FSBS was 0.968 ± 0.036 m. These results demonstrate that, under the experimental settings, random sampling not only has a higher average error but also exhibits greater fluctuations in results. This invention reduces sampling randomness through structured feature selection, thereby improving the representativeness and stability of the training subset.

[0065] Table 2

[0066] (3) In terms of spatial balance, the present invention compensates for the shortcomings of ordinary feature representative sampling being prone to local clustering by using spatial minimum spacing constraints.

[0067] To address the issue that common feature-representation sampling methods such as Core-set, K-Means, or Herding may repeatedly select multiple adjacent pixels within a local region, making it difficult to adequately suppress redundancy caused by spatial autocorrelation, this invention further introduces a minimum spatial distance constraint on top of Core-set feature coverage. That is, even if a candidate sample has a large distance in the feature space, it must still meet the spatial distance requirement with already selected samples to be included in the training subset. This mechanism subjectes sample selection to both "feature difference" and "spatial dispersion" constraints, thus distinguishing it from ordinary representative sampling that only focuses on the feature space. Experiments show that on the Oahu test set, K-Means sampling achieves an RMSE of 1.0147 m, a MAE of 0.7672 m, and a R... 2 The value was 0.9735; Herding's sampling had an RMSE of 0.9911 m, a MAE of 0.7356 m, and R... 2 The value was 0.9747; the RMSE of InfoBatch sampling was 1.0091 m, the MAE was 0.7370 m, and the R... 2 The RMSE was 0.9738; while the FSBS of this invention achieved RMSE 0.9376 m, MAE 0.6981 m, and R² 0.9798. This result demonstrates that, under the same experimental conditions, relying solely on feature clustering, sample prototypes, or dynamic sample selection is still inferior to FSBS, which simultaneously considers spatial constraints. Therefore, this invention can reduce the redundancy risk caused by repeated sampling in local spaces while maintaining feature coverage.

[0068] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a remote sensing water depth inversion model training method based on feature-space balanced sampling as described above.

[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0070] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A training method for a remote sensing water depth inversion model based on feature-spatial balanced sampling, characterized in that, Includes the following steps: S1. Acquire multispectral remote sensing images of the target sea area and corresponding ground truth water depth data, perform preprocessing, spatial registration and cropping to obtain training image patches, including multiband remote sensing image patches, ground truth water depth maps and effective supervision masks; wherein the effective supervision mask marks pixels with reliable ground truth water depth values. S2. Use the training image blocks to preheat the preset water depth inversion network, extract intermediate feature maps from multiple coding layers or multi-scale feature layers of the preheated water depth inversion network, and stitch them together after channel compression and spatial resolution unification to obtain the deep task features of each effective pixel. S3. Concatenate the deep task features and auxiliary features of each effective pixel into a joint feature vector. Standardize the joint feature vector to construct a unified joint feature subspace. S4. In the joint feature subspace, representative samples are selected step by step based on the core set selection mechanism of the farthest priority traversal strategy. During the selection process, spatial minimum spacing constraints and water depth distribution balance constraints are introduced simultaneously to finally generate the sampling mask corresponding to each training image block. S5. Combine the sampling mask with the effective supervision mask to obtain the final supervision region mask; During the formal training phase, training image patches are input into the water depth inversion network. The supervision loss is calculated and the model parameters are updated only at the locations marked by the mask in the final supervision region to complete the model training. S6. Input the multispectral remote sensing image to be inverted into the trained water depth inversion network to obtain the corresponding water depth estimation map.

2. The method for training a remote sensing water depth inversion model based on feature-space balanced sampling according to claim 1, characterized in that, In S1, the multispectral remote sensing image uses Sentinel-2 blue, green, and red band surface reflectance data; the true water depth data uses airborne laser bathymetry data; preprocessing includes cloud, cloud shadow, solar flare, land area and anomalous pixel removal, multi-temporal image screening and fusion, and unified elevation benchmark conversion.

3. The method for training a remote sensing water depth inversion model based on feature-spatial balanced sampling according to claim 1, characterized in that, In S2, the water depth inversion network adopts a dual-branch structure that includes a main branch for water depth prediction and a physical prior auxiliary branch. The physical prior auxiliary branch introduces water depth index as auxiliary information. After the warm-up training is completed, multi-scale feature maps are extracted from the shallow, middle and high layers of the encoder, channel compression is performed by 1×1 convolution, and then upsampling is performed to restore the uniform spatial resolution before stitching.

4. The method for training a remote sensing water depth inversion model based on feature-space balanced sampling according to claim 1, characterized in that, In S3, the auxiliary features include one or more of the following: normalized multispectral band features, band ratio features, brightness features, normalized spatial coordinate features, and water depth gradient amplitude features; wherein, the water depth gradient amplitude features are obtained by calculating the true water depth or the initial predicted water depth of the preheating model, and are used to highlight the topographic change areas of slope breaks, reef edges, channels, and shallow-deep transition zones.

5. The method for training a remote sensing water depth inversion model based on feature-spatial balanced sampling according to claim 1, characterized in that, In S4, a core set selection mechanism based on the furthest-first traversal strategy is used to gradually select representative samples, specifically including: Let the candidate sample set be The selected sample set is Then the minimum feature distance from candidate sample p to the selected set is... Defined as: In each iteration, the sample with the largest minimum distance is selected and added to the selected set; candidate samples must satisfy a preset spatial spacing constraint: in, To preset the minimum spatial spacing threshold, The distance between the image planes, , Let p be the joint feature vector, where p is the candidate sample. This is the selected sample.

6. The method for training a remote sensing water depth inversion model based on feature-spatial balanced sampling according to claim 1, characterized in that, In step S4, the selection process simultaneously introduces spatial minimum spacing constraints and water depth distribution balance constraints, specifically including: Minimum Spatial Spacing Constraint: Requires that the spatial distance between any two selected samples on the image plane is not less than a preset threshold; Water depth distribution balance constraint: Divide the candidate samples into multiple depth intervals according to the true water depth value, and allocate corresponding sample budgets to each interval. Perform Core-set sampling with spatial constraints independently in each depth interval, or explicitly control the sample ratio of each interval during the overall sampling process.

7. The method for training a remote sensing water depth inversion model based on feature-spatial balanced sampling according to claim 1, characterized in that, In S5, for the water depth inversion network including a physical prior auxiliary branch, the main task water depth loss and the auxiliary branch loss share the same sampling mask; let the original effective supervision mask be... The sampling mask is The final supervised region mask is then represented as: in, This represents an element-wise logical AND or OR product operation.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a remote sensing water depth inversion model training method based on feature-space balanced sampling as described in any one of claims 1-7.