Add guarded promoted YOLO activation
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-07-11 10:45:06 +02:00
parent 340be960e9
commit b1a4074cc8
13 changed files with 550 additions and 23 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ AI Lab run controls explicitly explain when no raster dataset is available, inst
- Detection Lab now exposes the `yolo-configured` capability reported by the backend.
- When `yolo-configured` is selected, users can provide an existing raster tile manifest path.
- Detection Lab lists local model assets from `GET /api/v1/detection/model-assets` so operators can choose an existing mounted model file instead of editing only one hidden `YOLO_MODEL_PATH` slot.
- Detection Lab exposes explicit operator profiles for the current inactive local AOI1024 building detector: balanced review at threshold `0.15` and conservative review at threshold `0.35`. Applying a profile deliberately selects the local model asset and threshold; it does not approve or promote a default model.
- Detection Lab exposes explicit operator profiles for the local AOI1024 building detector: balanced review at threshold `0.15` remains candidate-only, while conservative review at threshold `0.35` is marked as the promoted profile after the split-background pure-empty gate passed.
- Applying a profile deliberately selects the local model asset and threshold for the browser-run request; runtime default activation remains a separate guarded `.env` operation through `scripts/activate_promoted_yolo_candidate.py`.
- Detection Lab includes a read-only YOLO runtime preflight panel with backend status, dependency visibility, local model configuration, `torch`/`ultralytics` versions, CUDA state and `YOLO_CONFIG_DIR`.
- The UI still does not download models or create fake detections; backend status and error codes remain the source of truth.
@@ -255,7 +255,7 @@ export function DetectionLab({
<strong>Operator profiles</strong>
<p>
Candidate profiles apply a local model asset and confidence threshold only after an explicit click.
Candidate only - not default-approved while the promotion recommendation remains none.
Promoted profiles still require explicit operator action and do not mutate the runtime environment.
</p>
</div>
<div className="operator-profile-grid" aria-label="Configured YOLO operator profiles">
@@ -305,8 +305,8 @@ export function DetectionLab({
<div className="model-asset-guidance">
<strong>Selected model asset status</strong>
<p>
{selectedModelAsset.display_name} is operator-selected. Keep local candidates inactive until persisted
promotion evidence explicitly recommends default activation.
{selectedModelAsset.display_name} is selected for this browser-run request. Runtime default activation
remains a separate guarded operator action backed by a promotion report.
</p>
</div>
) : null}
@@ -24,24 +24,24 @@ export const DETECTION_OPERATOR_PROFILES: DetectionOperatorProfile[] = [
precision: 0.636639,
recall: 0.424258,
f1: 0.5074022485589402,
maxBackgroundDetections: 103,
maxBackgroundDetections: 46,
description: 'Best positive-AOI F1 profile for deliberate operator review of the inactive AOI1024 model asset.',
limitationMessage:
'Candidate only because false-positive pressure still blocks default promotion on the background/hard-negative gate.',
'Candidate only because pure-empty false-positive pressure still blocks default promotion on the background gate.',
},
{
id: 'conservative-review',
displayName: 'Conservative review',
displayName: 'Promoted conservative review',
modelAssetId: 'geointel-building-yolov8s-aoi1024bg512r3e50-pt',
confidenceThreshold: 0.35,
defaultApproved: false,
promotionRecommendation: 'none',
defaultApproved: true,
promotionRecommendation: 'promote_candidate',
precision: 0.840006,
recall: 0.202135,
f1: 0.32086574003576274,
maxBackgroundDetections: 55,
description: 'Higher-precision profile for demos or review sessions where fewer false positives matter more than recall.',
maxBackgroundDetections: 0,
description: 'Promoted high-precision profile for demos or review sessions where fewer false positives matter more than recall.',
limitationMessage:
'Candidate only because false-positive pressure remains visible; use it deliberately and inspect persisted QA evidence.',
'Default-approved after the split-background pure-empty gate passed; sparse-context detections remain review-only evidence.',
},
]