# parking-trainer The phase-B **body-type classifier** job. Reads the wash collector's volume (`collector.sqlite` + `crops/`), trains a classifier on the reviewer's labels, and writes a versioned model folder the vision image bakes in — or refuses when validation is below the floor. Design and decisions: `wiki/decisions/bodytype-classifier-training.md`. ``` parking-trainer inspect --data /data # what a run would train on parking-trainer train --data /data --out /out # features mode (minutes) parking-trainer train --mode finetune --epochs 12 ... # full fine-tune (about an hour on 4 cores) parking-trainer evaluate --model /out//bodytype.onnx --data /data parking-trainer publish /out/ --url https://git.infra.msai.al/api/packages/mca/generic/parking-bodytype ``` Exit codes: `0` model written · `2` not enough labels · `3` below the floor (report written, no model) · `1` other. A passing run writes `//`: | file | what | | --- | --- | | `bodytype.onnx` | the classifier; input `image` = RGB float32 0–255 `[N,3,S,S]`, output `logits` `[N,K]`; normalisation is inside the graph | | `bodytype.json` | sidecar: version, class list (in vocabulary order), input size, crop margin, backbone, mode, label counts, validation metrics | | `report.md` | the human report: accuracy, per-class recall/precision, confusion matrix, dropped classes, loss weights | | `metrics.json` | the same numbers, machine-readable | On the reviewer's host (the `wash-collector` stack): ``` docker compose -f docker-compose.collector.yml --profile train run --rm trainer inspect docker compose -f docker-compose.collector.yml --profile train run --rm trainer train --min-accuracy 0.85 ``` Local dev: `uv sync --extra train` (CPU torch, ~200 MB), `uv run pytest -q`. The test suite runs without the extra (torch tests skip), matching CI.