Add operator user agent and video recorder

This commit is contained in:
2026-07-01 00:44:10 +08:00
parent dcd6f7fd41
commit 1d43efd5b4
9 changed files with 502 additions and 9 deletions

View File

@@ -366,8 +366,9 @@ Use `GET /api/results?limit=1000` to inspect browsable artifacts and
`GET /api/results/curves?limit=100` to inspect parsed training curves
discovered from YOLO, SegModel, MMSeg, visual-tool, and analysis output
directories.
Use `GET /api/agents/evaluate` and `GET /api/agents/validate` to surface the
same evaluation and validation feedback shown in the web dashboard Agent panel.
Use `GET /api/agents/evaluate`, `GET /api/agents/validate`, and
`GET /api/agents/user/latest` to surface the same evaluation, validation, and
operator-style user-agent feedback shown in the web dashboard Agent panel.
## Agents
@@ -393,3 +394,26 @@ 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.
The User Agent simulates a first-time operator. It creates a small CC0-style
synthetic segmentation dataset, registers it under `var/uploads/datasets`,
generates matching image/mask pairs, YOLO polygon labels and `dataset.yaml`,
runs a lightweight job through the normal job runner, writes preview
segmentation/heatmap/loss artifacts under `var/custom_yolo_runs`, then reports
checks and suggestions. Run it from the browser Agent page or from CLI:
```bash
PYTHONPATH=backend conda run -n seg_smp python scripts/run_agents.py --no-deep --user
```
The latest report is available at `GET /api/agents/user/latest`; a new run is
started with `POST /api/agents/user`.
To produce the walkthrough video after starting the backend and frontend, run:
```bash
python scripts/record_usage_video.py --base-url http://127.0.0.1:5173
```
The default output is `../使用视频录制/seg_data_server_net_usage.mp4` with
screenshots for each page stored under `../使用视频录制/frames/`.