Tool

Web Labeler

The corner-labeling web GUI — the labeling-party tool. Part of Step 2 of the plan.

Run it

cd /home/ubuntu/spar
source venv/bin/activate
python web_labeler/labeler_server.py --images data/raw/ --labels data/labels/ --port 5050

Everyone on the same network opens http://<host-ip>:5050 in their phone browser. Each person enters their name; images auto-assign so nobody labels the same plate twice. Click the 4 plate corners, type the plate text, save. Labels land as JSON in data/labels/.

Controls — Web GUI

InputAction
Click / tapPlace corner (in order)
u or Undo buttonUndo last corner
Reset buttonClear all corners
n / Enter or Save buttonSave + next image
Skip buttonSkip to next image

Controls — Desktop tool

KeyAction
Left-clickPlace corner (in order)
uUndo last corner
rReset all corners on current image
n / EnterSave + next image
qQuit (saves progress)
+ / -Zoom in/out

Verify labels

python check_labels.py -i data/raw/ -l data/labels/

Output: JSON files in data/labels/ — one per image. Run the checker to validate and produce a verification collage.

Improvement roadmap

From LABELER_PLAN.md — the labeler's future, in priority order:

  1. ✓ Plate text entry — after 4 corners are placed, show a text input for the plate text before saving. Corner flow → text input slides up → confirm → single save with corners + plate_text. Done.
  2. Corner editing (drag to adjust) — after all 4 corners are placed, tap-drag individual corner dots to fine-tune. Eliminates undo-reset-retry.
  3. Winding order validation — warn if corners aren't in proper TL→TR→BR→BL order; flag self-intersecting quadrilaterals with a ⚠️ badge.
  4. Live rectified preview — small rectified view of the plate in the corner of the screen once 4 corners are down. "That doesn't look like WGE7330" → fix it immediately.
  5. Review mode — browse finished labels with polygon overlays. Edit or reject bad ones. Filter by labeler.
  6. Team presence (WebSocket) — replace 5-second polling with WebSocket for live progress and team visibility.
  7. PWA / offline — service worker + manifest. "Add to Home Screen" → standalone app. Queue labels offline, sync on reconnect.
  8. Multi-plate support — some images have multiple plates (front + back, two cars in frame). Allow labeling 1–N plates per image.
  9. Production server — swap the Flask dev server for waitress or gunicorn. One-line change.