Add detection calibration sweep
This commit is contained in:
@@ -167,6 +167,21 @@ download model weights. A zero detection count is valid as runtime evidence only
|
||||
when the selected model genuinely returns no usable detections after canonical
|
||||
class filtering; it does not prove the model is useful for the target imagery.
|
||||
|
||||
For confidence-threshold calibration, use the sweep wrapper:
|
||||
|
||||
```bash
|
||||
REAL_RASTER_PATH=/mnt/user/appdata/geointel/storage/operator-data/geel_orthophoto_wms_512.tif \
|
||||
REAL_REFERENCE_VECTOR_PATH=/mnt/user/appdata/geointel/storage/operator-data/geel_grb_gbg_buildings.geojson \
|
||||
CALIBRATION_THRESHOLDS="0.50 0.35 0.25 0.15" \
|
||||
bash scripts/run_detection_calibration_sweep.sh http://192.168.10.150:1202
|
||||
```
|
||||
|
||||
The sweep runs the real-data workflow once per threshold and then reads the
|
||||
persisted project quality-check list to build `calibration_summary.json`.
|
||||
Results are honest QA/QC evidence from persisted detections and persisted
|
||||
reference `vector_features`; no demo detections, live provider fetches or model
|
||||
downloads are introduced by the calibration tool.
|
||||
|
||||
### Sprint 8C detection visualization and QA status
|
||||
|
||||
Sprint 8C makes persisted detections reviewable:
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
## Sprint 124 Detection calibration sweep tooling (2026-07-07)
|
||||
|
||||
Changed:
|
||||
- Added `scripts/run_detection_calibration_sweep.sh` as an operator-facing confidence-threshold sweep for the configured-YOLO real-data path.
|
||||
- The sweep reuses `scripts/verify_real_data_detection_qa_workflow.sh` once per threshold, so each row is backed by persisted Project, Dataset, AnalysisRun, Detection, QualityCheck, Metric and export records.
|
||||
- The sweep fetches project `quality-checks` after each run and writes per-threshold summaries plus `calibration_summary.json` with detection count, QA score, precision, recall, F1, mean IoU, matches, false positives and false negatives.
|
||||
- Registered the sweep in `scripts/run_readiness_check.sh` as a syntax check.
|
||||
- Added regression coverage in `backend/tests/test_sprint124_detection_calibration_sweep.py`.
|
||||
- Updated `scripts/README.md`, `backend/README.md`, `docs/AI_PIPELINES.md`, `docs/TODO.md` and `CHANGELOG.md`.
|
||||
|
||||
Validation:
|
||||
- RED: `python -m pytest backend/tests/test_sprint124_detection_calibration_sweep.py -q` failed because `scripts/run_detection_calibration_sweep.sh` did not exist.
|
||||
- `python -m pytest backend/tests/test_sprint124_detection_calibration_sweep.py -q` passed.
|
||||
- `bash -n scripts/run_detection_calibration_sweep.sh` passed.
|
||||
- `bash scripts/run_detection_calibration_sweep.sh --help` passed.
|
||||
- Missing-input guard printed usage and did not start a live workflow.
|
||||
|
||||
Open:
|
||||
- Run the sweep on Tower with the Geel operator sample and record the observed threshold metrics.
|
||||
|
||||
Limitations:
|
||||
- The sweep is intentionally mutating and creates one real workflow run per threshold.
|
||||
- It is calibration tooling only; it does not change inference, add model downloads, fetch providers, seed demo detections or change API/UI behavior.
|
||||
|
||||
Next recommended pass:
|
||||
- Run the Tower sweep for the current Geel sample, then repeat on additional operator-provided orthophoto/reference samples before choosing V1 default confidence/IoU guidance.
|
||||
|
||||
## Sprint 123 YOLO class and tile CRS normalization (2026-07-07)
|
||||
|
||||
Changed:
|
||||
|
||||
@@ -95,6 +95,7 @@ This file now starts with the current implementation status. Older preparation/b
|
||||
- [x] Validate the configured building model on a real georeferenced Kempen orthophoto/GeoTIFF with persisted reference vectors and QA/QC metrics.
|
||||
- [x] Fix configured-YOLO mixed-case class labels so `Building` model output matches `building` domain filters.
|
||||
- [x] Persist CRS metadata in raster tile manifests so AI detections can be transformed to WGS84 GeoJSON correctly.
|
||||
- [x] Add real-data detection calibration sweep tooling for confidence-threshold and QA/QC metric comparison.
|
||||
- [ ] Calibrate confidence, IoU and model selection against persisted Geel detections and additional local orthophoto/reference samples.
|
||||
|
||||
## Sprint 8 status
|
||||
|
||||
Reference in New Issue
Block a user