feat: add measured detection review loop
This commit is contained in:
@@ -1300,6 +1300,71 @@ candidate evidence exposes the equivalent persisted model/source fields plus
|
||||
`segmentation_id`, `mask_path` and `area_m2`. These are additive GeoJSON
|
||||
properties; the canonical envelope and endpoint path are unchanged.
|
||||
|
||||
For detection QA, false-positive and false-negative evidence properties also
|
||||
include `review_decision`, `review_notes`, `reviewed_by` and `reviewed_at`.
|
||||
Missing review rows are represented as `review_decision=unreviewed`. Evidence
|
||||
resolution is bounded to identifiers stored by the selected quality check.
|
||||
|
||||
### GET `/api/v1/projects/{project_id}/quality-checks/{quality_check_id}/reviews`
|
||||
|
||||
Returns the paginated operator review queue for a persisted
|
||||
`detections_vs_reference` quality check. Optional query parameters are
|
||||
`evidence_role=false_positive|false_negative`, `decision`, `reviewed=true|false`,
|
||||
`limit` (1-200) and `offset`. Items derive only from persisted QA evidence.
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"items": [{
|
||||
"id": null,
|
||||
"project_id": "uuid",
|
||||
"quality_check_id": "uuid",
|
||||
"analysis_run_id": "uuid",
|
||||
"evidence_role": "false_positive",
|
||||
"evidence_feature_id": "detection-uuid",
|
||||
"detection_id": "detection-uuid",
|
||||
"decision": "unreviewed",
|
||||
"confidence": 0.62,
|
||||
"class_name": "building"
|
||||
}],
|
||||
"total": 1,
|
||||
"limit": 50,
|
||||
"offset": 0,
|
||||
"summary": {
|
||||
"total": 73,
|
||||
"reviewed": 0,
|
||||
"remaining": 73,
|
||||
"false_positive_total": 17,
|
||||
"false_negative_total": 56,
|
||||
"decision_counts": {"unreviewed": 73}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### POST `/api/v1/projects/{project_id}/quality-checks/{quality_check_id}/reviews`
|
||||
|
||||
Creates or updates one durable operator decision. The evidence id must belong
|
||||
to the quality check and resolve to the persisted Detection or reference
|
||||
VectorFeature. False-positive and false-negative roles accept only their
|
||||
role-specific decisions.
|
||||
|
||||
```json
|
||||
{
|
||||
"evidence_role": "false_positive",
|
||||
"evidence_feature_id": "detection-uuid",
|
||||
"decision": "qa_alignment_mismatch",
|
||||
"notes": "The detection box overlaps the irregular GRB footprint.",
|
||||
"reviewed_by": "operator"
|
||||
}
|
||||
```
|
||||
|
||||
Allowed decisions are `confirmed_model_false_positive`,
|
||||
`confirmed_model_false_negative`, `reference_gap_or_change`,
|
||||
`qa_alignment_mismatch`, `imagery_obscured_or_uncertain`, `uncertain` and
|
||||
`unreviewed`. Invalid role/decision combinations return
|
||||
`INVALID_DETECTION_REVIEW_DECISION`.
|
||||
|
||||
## Exports
|
||||
|
||||
### POST `/api/v1/exports/geojson`
|
||||
|
||||
Reference in New Issue
Block a user