fix: remove gf3 water priors from production workflow
This commit is contained in:
@@ -119,8 +119,6 @@ IDL_DINSAR_DEM_BASE_FILE=D:\SRTM30m\SRTMDEM_RSP_SARscape
|
||||
SRTM_DEM_DIR=D:\SRTM30m
|
||||
GF3_GEO_DEM_PATH=D:\DEM\gf3_dem.jp2
|
||||
WATER_RESULTS_DIR=D:\WaterResult
|
||||
GF3_WATER_USE_DLTB=false
|
||||
GF3_WATER_DLTB_CACHE_DIR=
|
||||
GF3_WATER_DEM_PATH=
|
||||
GF3_WATER_DEFAULT_CARTOGRAPHIC=true
|
||||
GF3_WATER_DEFAULT_OUT_VECTOR=true
|
||||
|
||||
@@ -215,8 +215,6 @@ class Settings(BaseSettings):
|
||||
RADAR_PREVIEW_BUILD_ON_DEMAND: bool = True
|
||||
|
||||
WATER_RESULTS_DIR: str = ""
|
||||
GF3_WATER_USE_DLTB: bool = False
|
||||
GF3_WATER_DLTB_CACHE_DIR: str = ""
|
||||
GF3_WATER_DEM_PATH: str = ""
|
||||
GF3_WATER_DEFAULT_CARTOGRAPHIC: bool = True
|
||||
GF3_WATER_DEFAULT_OUT_VECTOR: bool = True
|
||||
|
||||
@@ -134,15 +134,8 @@ def run_gf3_hh_hv_water_extraction(
|
||||
|
||||
hh = _existing_path(hh_path, label="HH input")
|
||||
hv = _existing_path(hv_path, label="HV input")
|
||||
use_dltb = _as_bool(params.get("use_dltb"), bool(settings.GF3_WATER_USE_DLTB))
|
||||
dltb_cache_dir = (
|
||||
_optional_existing_path(
|
||||
params.get("dltb_cache_dir") or settings.GF3_WATER_DLTB_CACHE_DIR,
|
||||
label="GF3_WATER_DLTB_CACHE_DIR",
|
||||
)
|
||||
if use_dltb
|
||||
else None
|
||||
)
|
||||
use_dltb = False
|
||||
dltb_cache_dir = None
|
||||
dem = _optional_existing_path(
|
||||
params.get("dem") or params.get("dem_path") or settings.GF3_WATER_DEM_PATH,
|
||||
label="GF3_WATER_DEM_PATH",
|
||||
@@ -162,9 +155,9 @@ def run_gf3_hh_hv_water_extraction(
|
||||
out_dir=out_dir,
|
||||
dem=dem,
|
||||
dltb_cache_dir=dltb_cache_dir,
|
||||
dltb_mode=str(params.get("dltb_mode") or "soft"),
|
||||
water_vector=_path_param_list(params, "water_vector"),
|
||||
paddy_vector=_path_param_list(params, "paddy_vector"),
|
||||
dltb_mode="off",
|
||||
water_vector=[],
|
||||
paddy_vector=[],
|
||||
threshold_method=str(params.get("threshold_method") or "percentile"),
|
||||
score_percentile=_numeric_param(params, "score_percentile", 95.0, float),
|
||||
hv_percentile=_numeric_param(params, "hv_percentile", 20.0, float),
|
||||
@@ -227,9 +220,13 @@ def run_gf3_hh_hv_water_extraction(
|
||||
"hv": str(hv),
|
||||
"dem": str(dem) if dem else None,
|
||||
"dltb_cache_dir": str(dltb_cache_dir) if dltb_cache_dir else None,
|
||||
"water_vector": [],
|
||||
"paddy_vector": [],
|
||||
},
|
||||
"runtime": {
|
||||
"dltb_enabled": use_dltb and dltb_cache_dir is not None,
|
||||
"prior_inputs_enabled": False,
|
||||
"dltb_enabled": False,
|
||||
"deep_learning_enabled": False,
|
||||
"vector_requested": out_vector,
|
||||
"vector_runtime_available": vector_runtime_available,
|
||||
"vector_output_enabled": vector_output_enabled,
|
||||
|
||||
@@ -15,12 +15,18 @@ The goal is integration, not bulk import. Code that is reusable should be copied
|
||||
- `gf3_water/`: active Python package for GF-3 HH/HV water extraction.
|
||||
- `scripts/`: thin CLI/data-preparation wrappers.
|
||||
- `docs/`: algorithm and integration notes.
|
||||
- `data/`: local scenes and prior data.
|
||||
- `data/`: local scenes and prior data from the experiment workspace.
|
||||
- `outputs/`: generated products.
|
||||
- `gf3-water-ai4g-unet/`: legacy deep-learning experiment/checkpoints.
|
||||
|
||||
The active production-facing implementation is the non-DL `gf3_water` package. It consumes SARscape ENVI HH/HV geocoded assets, for example `_hh_geo` and `_hv_geo`, and writes raster, preview, vector and `metadata.json` outputs.
|
||||
|
||||
Production policy:
|
||||
|
||||
- Do not use DLTB, hydro, water-vector or paddy-vector priors.
|
||||
- Do not use deep-learning checkpoints or U-Net inference.
|
||||
- Use the current HH/HV machine-learning-style threshold, candidate and morphology workflow.
|
||||
|
||||
## Current System Entry Points
|
||||
|
||||
The existing system already has a suitable production chain:
|
||||
@@ -88,16 +94,15 @@ Do not store runtime data in Git.
|
||||
|
||||
Current integration does not use DLTB priors. The GF-3 HH/HV processor runs from SAR backscatter, morphology and optional vector/DEM inputs only.
|
||||
|
||||
Optional future runtime assets:
|
||||
Not transferred:
|
||||
|
||||
- `D:\Code\Water\data\priors\dltb_cache\heilongjiang`
|
||||
- Current size observed: 25 files, about 8.5 GB.
|
||||
- Do not transfer for the current workflow.
|
||||
- If DLTB is re-enabled later, transfer to a managed runtime asset path, for example `D:\production_assets\gf3_water\priors\dltb_cache\heilongjiang`, then set `GF3_WATER_USE_DLTB=true` and `GF3_WATER_DLTB_CACHE_DIR`.
|
||||
|
||||
Optional runtime assets:
|
||||
|
||||
- Hydro prior vectors under `data/priors/hydro`.
|
||||
- Water/paddy vector priors.
|
||||
|
||||
Optional runtime asset:
|
||||
|
||||
- DEM path if slope filtering should be enabled.
|
||||
|
||||
Build-only assets:
|
||||
@@ -118,8 +123,6 @@ These are large model artifacts and should stay outside the application until a
|
||||
|
||||
Add configuration keys:
|
||||
|
||||
- `GF3_WATER_USE_DLTB=false`
|
||||
- `GF3_WATER_DLTB_CACHE_DIR`
|
||||
- `GF3_WATER_DEM_PATH`
|
||||
- `GF3_WATER_DEFAULT_CARTOGRAPHIC=true`
|
||||
- `GF3_WATER_DEFAULT_OUT_VECTOR=true`
|
||||
@@ -156,5 +159,5 @@ flowchart TD
|
||||
## Open Decisions
|
||||
|
||||
- Whether runtime execution should be in-process Python API first or always subprocess CLI. Initial integration should use in-process API because it fits the existing worker model and keeps job accounting simple.
|
||||
- DLTB priors are disabled for the current workflow. Re-enabling them later should be a deployment decision because the cache is about 8.5 GB.
|
||||
- Whether legacy AI4G U-Net should be supported later. It should not block the current HH/HV production chain.
|
||||
- DLTB, hydro, water-vector and paddy-vector priors are not part of the current workflow.
|
||||
- Legacy AI4G U-Net/deep-learning checkpoints are not part of the current workflow.
|
||||
|
||||
Reference in New Issue
Block a user