Files
parking_solution/poc/zone-anpr/run-local.sh
T
julian ce10c741fc poc(zone-anpr): passage-confirmation prototype run on park-lab
A standalone prototype of passage confirmation, tried on park-lab against the
real lane, relays and barrier (wiki: concepts/zone-anpr-poc.md).

- zone_anpr.py: vehicle detection on the camera stream, a drawn zone and
  crossing line, and the zone flow: nothing is decided while the zone is busy;
  when it is free the last crossing decides (A -> B passed, otherwise
  abandoned -> close relay). Relays follow read-then-fire with an online probe
  and a check before every datagram; disarmed by default. Plates are read from
  hi-res stills and stream frames into one consensus.
- test_flow.py: 65 offline checks of the flow, the relay rules against a mock
  board, and the plate reads. No camera, model or relay needed.
- recordings/ + replay_recordings.py: the followed car's boxes for 48 real
  entry visits of 2026-11-21/22, replayed through the judging code.
- trial_report.py: per-visit report of a drive, run on park-lab.

The detector model, local config and outputs are not committed (.gitignore).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oZdzvo92Eouc9eRv5
2026-11-22 18:24:48 +01:00

13 lines
616 B
Bash

#!/usr/bin/env bash
# Local dev only: (re)start the PoC here, camera credentials read from the park-lab DB copy.
set -euo pipefail
cd "$(dirname "$0")"
[ -f pid ] && kill "$(cat pid)" 2>/dev/null && sleep 2 || true
eval "$(python3 -c "
import sqlite3,json
db=sqlite3.connect('file:../../.local-parklab/parking.sqlite?mode=ro',uri=True)
c=json.loads(db.execute(\"select config from devices where config like '%10.0.10.6%'\").fetchone()[0])
print(f\"export CAM_USER='{c['username']}' CAM_PASS='{c['password']}'\")")"
nohup ../../apps/vision/.venv/bin/python -u zone_anpr.py config.json >> out.log 2>&1 &
echo $! > pid