Add Mol multi-zone operational validation
This commit is contained in:
@@ -27,6 +27,9 @@ Optional environment:
|
||||
QUALITY_THRESHOLDS Space/comma separated confidence thresholds, default: 0.50 0.25 0.15.
|
||||
QUALITY_OUTPUT_DIR Output directory, default: artifacts/detection-quality-matrix/<timestamp>.
|
||||
QUALITY_SAMPLE_SLUG Optional AOI slug included in persisted project names.
|
||||
REAL_PROJECT_REGION Persisted project region forwarded to the workflow.
|
||||
REAL_AREA_NAME Persisted AOI name when REAL_AREA_BBOX is set.
|
||||
REAL_AREA_BBOX Optional EPSG:4326 minx,miny,maxx,maxy AOI bounds.
|
||||
REAL_IOU_THRESHOLD QA IoU threshold, default inherited by the underlying workflow.
|
||||
|
||||
This script never downloads models and never uses fixture detections. It repeats
|
||||
@@ -45,6 +48,9 @@ QUALITY_TILE_SIZES="${QUALITY_TILE_SIZES:-640}"
|
||||
QUALITY_TILE_OVERLAPS="${QUALITY_TILE_OVERLAPS:-64}"
|
||||
QUALITY_THRESHOLDS="${QUALITY_THRESHOLDS:-0.50 0.25 0.15}"
|
||||
QUALITY_SAMPLE_SLUG="${QUALITY_SAMPLE_SLUG:-}"
|
||||
REAL_PROJECT_REGION="${REAL_PROJECT_REGION:-Kempen}"
|
||||
REAL_AREA_NAME="${REAL_AREA_NAME:-${QUALITY_SAMPLE_SLUG:-Detection quality} AOI}"
|
||||
REAL_AREA_BBOX="${REAL_AREA_BBOX:-}"
|
||||
QUALITY_OUTPUT_DIR="${QUALITY_OUTPUT_DIR:-artifacts/detection-quality-matrix/$(date -u +%Y%m%dT%H%M%SZ)}"
|
||||
|
||||
if [ "${BASE_URL}" = "-h" ] || [ "${BASE_URL}" = "--help" ]; then
|
||||
@@ -184,6 +190,9 @@ while IFS=$'\t' read -r model_request tile_size tile_overlap threshold run_label
|
||||
|
||||
echo "-- Matrix run ${run_index}: model=${model_request} tile=${tile_size} overlap=${tile_overlap} threshold=${threshold} --"
|
||||
if ! REAL_PROJECT_NAME="GeoIntel Detection Quality Matrix${project_sample_label} ${model_request} tile ${tile_size} overlap ${tile_overlap} threshold ${threshold}" \
|
||||
REAL_PROJECT_REGION="${REAL_PROJECT_REGION}" \
|
||||
REAL_AREA_NAME="${REAL_AREA_NAME}" \
|
||||
REAL_AREA_BBOX="${REAL_AREA_BBOX}" \
|
||||
REAL_MODEL_ASSET_ID="${model_env}" \
|
||||
REAL_TILE_SIZE="${tile_size}" \
|
||||
REAL_TILE_OVERLAP="${tile_overlap}" \
|
||||
@@ -196,6 +205,7 @@ while IFS=$'\t' read -r model_request tile_size tile_overlap threshold run_label
|
||||
fi
|
||||
|
||||
project_id="$(sed -n 's/^Project: //p' "${run_log}" | tail -n 1)"
|
||||
area_id="$(sed -n 's/^Area: //p' "${run_log}" | tail -n 1)"
|
||||
raster_dataset_id="$(sed -n 's/^Raster dataset: //p' "${run_log}" | tail -n 1)"
|
||||
reference_dataset_id="$(sed -n 's/^Reference dataset: //p' "${run_log}" | tail -n 1)"
|
||||
selected_model_asset_id="$(sed -n 's/^Model asset: //p' "${run_log}" | tail -n 1)"
|
||||
@@ -223,6 +233,7 @@ while IFS=$'\t' read -r model_request tile_size tile_overlap threshold run_label
|
||||
"${tile_overlap}" \
|
||||
"${threshold}" \
|
||||
"${project_id}" \
|
||||
"${area_id}" \
|
||||
"${raster_dataset_id}" \
|
||||
"${reference_dataset_id}" \
|
||||
"${manifest_path}" \
|
||||
@@ -244,6 +255,7 @@ import sys
|
||||
tile_overlap,
|
||||
threshold,
|
||||
project_id,
|
||||
area_id,
|
||||
raster_dataset_id,
|
||||
reference_dataset_id,
|
||||
manifest_path,
|
||||
@@ -252,7 +264,7 @@ import sys
|
||||
detection_count,
|
||||
export_id,
|
||||
run_log,
|
||||
) = sys.argv[1:18]
|
||||
) = sys.argv[1:19]
|
||||
|
||||
with open(quality_path, "r", encoding="utf-8") as handle:
|
||||
payload = json.load(handle)
|
||||
@@ -281,6 +293,7 @@ summary = {
|
||||
"tile_overlap": int(tile_overlap),
|
||||
"threshold": float(threshold),
|
||||
"project_id": project_id,
|
||||
"area_id": area_id or None,
|
||||
"raster_dataset_id": raster_dataset_id,
|
||||
"reference_dataset_id": reference_dataset_id,
|
||||
"manifest_path": manifest_path,
|
||||
|
||||
Reference in New Issue
Block a user