Persist raster tile CRS metadata
This commit is contained in:
@@ -1,24 +1,42 @@
|
||||
## Sprint 123 YOLO class normalization and real-data inference fix (2026-07-07)
|
||||
## Sprint 123 YOLO class and tile CRS normalization (2026-07-07)
|
||||
|
||||
Changed:
|
||||
- Investigated the Geel real-data smoke that persisted zero detections despite the configured building model being available.
|
||||
- Confirmed on Tower that `/app/models/yolov8n-building-segmentation.pt` reports model class `Building` and returns 4 raw detections at confidence `0.5` on the same real Geel tile manifest.
|
||||
- Fixed configured-YOLO detection persistence so model class names are compared case-insensitively against `class_filter`, persisted as canonical lowercase domain classes, and preserve the original model class name in `properties_json.model_class_name`.
|
||||
- Added regression coverage in `backend/tests/test_sprint8b_yolo_foundation.py`.
|
||||
- Found a second live GIS correctness issue: generated tile manifests carried Lambert bounds/transforms but no CRS, so detection GeoJSON could expose EPSG:31370 coordinates as if they were EPSG:4326.
|
||||
- Fixed raster tile manifest generation to include `crs`, `source_crs` and `dataset_crs` on the manifest and `crs` on each tile entry when the source raster CRS is known.
|
||||
- Added regression coverage in `backend/tests/test_sprint8b_yolo_foundation.py` and `backend/tests/test_raster_operations_service.py`.
|
||||
|
||||
Validation:
|
||||
- RED: `python -m pytest backend/tests/test_sprint8b_yolo_foundation.py::test_yolo_class_filter_is_case_insensitive_and_persists_canonical_class -q` failed with `detection_count=0` because `Building` did not match `building`.
|
||||
- `python -m pytest backend/tests/test_sprint8b_yolo_foundation.py::test_yolo_class_filter_is_case_insensitive_and_persists_canonical_class -q` passed.
|
||||
- `python -m pytest backend/tests/test_sprint8b_yolo_foundation.py backend/tests/test_model_asset_catalog.py backend/tests/test_sprint121_real_data_detection_qa_smoke.py backend/tests/test_sprint122_raster_upload_metadata_mapping.py -q` passed: 20 tests.
|
||||
- RED: `python -m pytest backend/tests/test_raster_operations_service.py::test_raster_tile_returns_manifest_payload -q` failed because the tile manifest had no `crs`.
|
||||
- `python -m pytest backend/tests/test_raster_operations_service.py::test_raster_tile_returns_manifest_payload -q` passed.
|
||||
- `python -m compileall backend/app` passed.
|
||||
- `bash scripts/run_readiness_check.sh` passed: 387 backend tests, Alembic head check, frontend typecheck/build and shell syntax checks.
|
||||
- Tower deploy from commit `71c2cd9` passed with `GEOINTEL_INSTALL_AI=true`.
|
||||
- Deploy-time live migration smoke passed; PostGIS reported `3.6 USE_GEOS=1 USE_PROJ=1 USE_STATS=1` and Alembic head was `202606120900`.
|
||||
- Deploy-time browser runtime verification passed for `http://192.168.10.150:1202`.
|
||||
- Real-data smoke after the class-normalization deploy passed and persisted 4 detections:
|
||||
- project: `cb80638d-dbef-48ac-b19c-cec7c3efc96e`
|
||||
- raster dataset: `ae0ff76d-70c0-404f-b777-54d14517179a`
|
||||
- reference dataset: `8ac01b4f-bd6a-4d6a-b625-a0950ae0f3eb`
|
||||
- analysis run: `7ba34274-411d-45e3-8f54-c37baec598b1`
|
||||
- quality check: `66907e6a-9ed7-4b0c-976f-5ad1ba9b8b7a`
|
||||
- detection export: `516d37a3-2305-48a2-a3dd-b56f70eb055e`
|
||||
- persisted detections used canonical `class_name=building` and preserved `model_class_name=Building`.
|
||||
|
||||
Open:
|
||||
- Full readiness, Tower deploy and repeated live real-data smoke still need to be run for this pass.
|
||||
- Redeploy the tile-CRS manifest fix and rerun the real-data smoke to verify Detection GeoJSON coordinates are in EPSG:4326.
|
||||
|
||||
Limitations:
|
||||
- This fixes class routing and persistence, not model quality. Thresholds, false positives and reference IoU quality still need calibration on larger local orthophoto samples.
|
||||
- This fixes class routing, persistence and future tile manifest CRS propagation. Existing tile manifests generated before this fix remain missing CRS and should be regenerated before AI runs.
|
||||
- Thresholds, false positives and reference IoU quality still need calibration on larger local orthophoto samples.
|
||||
|
||||
Next recommended pass:
|
||||
- Redeploy to Tower, rerun the Geel real-data smoke, then inspect persisted detections and QA metrics to choose practical confidence/IoU defaults.
|
||||
- Redeploy the tile-CRS fix, rerun the Geel real-data smoke, confirm WGS84 Detection GeoJSON coordinates and then calibrate practical confidence/IoU defaults.
|
||||
|
||||
## Sprint 122 Real operator data availability and raster metadata fix (2026-07-07)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user