Add real YOLO train acceptance

This commit is contained in:
2026-06-30 23:33:43 +08:00
parent 5055084788
commit fb96c96d8b
10 changed files with 270 additions and 16 deletions

View File

@@ -198,10 +198,11 @@ scripts/check_no_weight_git.sh
For a fast non-training validation pass, run agents with
`PYTHONPATH=backend conda run -n seg_smp python scripts/run_agents.py --no-deep`.
Add `--live`, `--acceptance`, or `--real` only after the backend and frontend
are running and you want HTTP endpoint, smoke, or real-workspace checks. The
browser dashboard exposes the same readiness, coverage, GPU, weight, result,
and agent checks through the UI.
Add `--live`, `--acceptance`, `--real`, or `--real-train` only after the
backend and frontend are running and you want HTTP endpoint, smoke,
real-workspace, or real short-training checks. The browser dashboard exposes
the same readiness, coverage, GPU, weight, result, and agent checks through
the UI.
The web UI includes a dataset bench for creating upload workspaces, uploading
images/labels/masks, and jumping into the existing rename, PNG conversion,
@@ -272,6 +273,16 @@ real image/mask pair. The latest report is available from
`GET /api/acceptance/real/latest` and is shown in the coverage panel as
`真实数据`.
`POST /api/acceptance/real-train` goes one step further and launches a short
operator-style YOLO loop on real workspace data. It uploads a real YOLO
image/txt pair, generates `dataset.yaml`, runs one CPU epoch through
`yolo.train_custom`, verifies `results.csv` and `best.pt`, then uses that
trained checkpoint for prediction and GradCAM heatmap jobs. The latest report
is available from `GET /api/acceptance/real-train/latest` and is shown in the
coverage panel as `真实短训`. This is heavier than the real-data predict
acceptance, so run it when you want proof that real uploaded data can create
loss curves, trained weights, segmentation previews, and heatmap artifacts.
For stronger runtime proof, `POST /api/acceptance/deep` runs minimal training
loops for the three model families: one SegModel optimizer step, one YOLO
segmentation epoch on a synthetic 64x64 dataset, one YOLO GradCAM heatmap
@@ -372,8 +383,9 @@ non-training validation pass is needed.
The web dashboard calls validation in light mode by default:
`/api/agents/validate?run_build=false&run_acceptance=false&run_deep=false`.
Pass `run_live=true`, `run_acceptance=true`, `run_real=true`, or
`run_deep=true` only when you explicitly want the agent to launch live endpoint
or heavier runtime acceptance checks from the browser/API. Smoke and real data
acceptance automatically enable the live backend checks because they submit
jobs through the API.
Pass `run_live=true`, `run_acceptance=true`, `run_real=true`,
`run_real_train=true`, or `run_deep=true` only when you explicitly want the
agent to launch live endpoint or heavier runtime acceptance checks from the
browser/API. Smoke, real data, and real short-training acceptance
automatically enable the live backend checks because they submit jobs through
the API.