Inspiration

Car workshops still do vehicle check-in with pen and paper. When a customer later asks "was this scratch already there?", nobody has an answer. RODI Motor Services brought this to HackEPS: build a mobile app that lets an untrained receptionist, in under 3 minutes per vehicle, photograph the four tyres and walk around the car — and get back honest, measured, photographed tyre data, tread depth, and a damage intake sheet.

What it does

InterTractor is a workshop check-in app plus a Python backend that reads a vehicle from phone photos and a short walk-around video:

  • Level 1 — Decode tyre codes. Parses transcribed sidewall codes (size, load/speed, DOT/TIN, XL/RF/ZR/LT/C/M+S/3PMSF).
  • Level 2 — Read the sidewall. Vision model (OpenAI gpt-5.5) reads a real photo, runs it through L1 for validation, votes across multiple shots when they disagree. Per-photo held-out: width 92 %, rim 92 %, load 67 %, speed 67 %, DOT 2/2, 0 % confident-wrong.
  • Level 3 — Measure tread depth (the tie-breaker). One face-on €2 coin per groove photo; the backend measures each zone with depth_mm = coin_diameter_mm - visible_band_mm, locates the rib top from the edge density of the shoulder columns, and aggregates multi-photo reads by best confidence. MAE 0.91 mm on 2 tyres / 6 zones (bias +0.12, 50 % within 0.5 mm, 66.7 % within 1.0 mm, 100 % in the correct traffic-light bucket).
  • Level 4 — Customer report. Backend-rendered PDF/HTML/JSON in Spanish/Catalan, honest wording, downloadable from the app.
  • Level 5 — 360° walk-around. Phone video → frame selection → VLM survey/detect/verify → cross-frame voting → damage intake sheet with evidence crops and a top-down diagram. Check-in vs check-out diff.
  • Every result carries confidence, quality flags, and a status (ok / low_confidence / unmeasurable / error). Unusable input falls back to manual entry — the app keeps moving.

How we built it

  • Backend: Python 3.11+, FastAPI, Pydantic v2 contracts at every module boundary (rodi/contracts.py), OpenCV + NumPy for the tread pipeline, structured-output vision calls to Gemini and OpenAI (automatic fallback), background jobs + stable JSON schema v1.0.
  • Mobile: Flutter app with guided capture (car map, framing guides, on-phone quality check), persistent upload queue, Spanish UI, Android + Windows targets.
  • Three parallel workstreams, one git repo. Slot A owns L1/L2 + contracts + CLI + the L5 engine; slot B owns L3 tread depth; slot C owns the FastAPI backend, the Flutter app, the L4 report and the L5 UI/PDF. docs/PLAN.md + docs/DECISIONS.md (append-only, D-NNN entries) are the shared source of truth.
  • Claude Code as team process. Each slot drives its own Claude session; a roster of specialised subagents (tread-depth-expert, tyre-domain-expert, damage-detection-expert, reviewer, test-engineer, implementer...) runs plan → implement → review → verify loops. .claude/hooks/ blocks secrets and RODI data in commits.
  • Honesty as a non-negotiable. No fabricated values anywhere; every measurement carries confidence + flags; unusable input returns None with a reason, never a guess.

Challenges we ran into

  • L3 tread depth, the tie-breaker. First working baseline was MAE 8.32 mm — the depth formula silently clamped every real groove to zero. Switching the coin model from face-flush (rim band) to face-on (diameter − visible band), then fixing the rib-top detector (edge density on the shoulder columns, scaled by coin radius so the rim shadow stops bleeding into the profile), brought it down to 0.91 mm — 9× better, within partial-points target.
  • Collecting labelled data in-room. No tyre dataset is provided for L1–L3; we labelled our own with a vernier caliper, varying phones, lighting and wear, and kept it in data/ which never enters git.
  • Vision-model quotas. Gemini free tier ran out mid-hack; the OpenAI fallback (gpt-5.4-mini → gpt-5.5 for L2) carried the rest of the demo and the eval.
  • Three humans + three Claudes editing the same repo. Merge conflicts and silent contract drift are easy; we kept it under control with per-slot path ownership, rodi/contracts.py as the only interface, DECISIONS.md for anything hard to undo, and a /contract-change command that forces a cross-team conversation.
  • Honesty is harder than accuracy. Catching the subtle case where the multi-photo combiner re-derived a zone's status back to OK after we had marked it "zone guessed" — so the flag was visible but the per-zone status was misleading — came up in review, not in the tests, and it got fixed before the merge landed.

Accomplishments that we're proud of

  • L3 at 0.91 mm MAE — within RODI's partial-points target (≤ 1.0 mm) and half of the zones already within the full-points threshold (≤ 0.5 mm). 100 % of zones in the correct traffic-light bucket (illegal / change / plan / correct).
  • L2 reads nothing wrong when confident — 0 % confident-wrong on the held-out set with gpt-5.5, the DOT parser finally reads 3-digit-week stickers and ignores plant codes.
  • A real check-in experience, not a slide deck. The receptionist's flow is a guided car-map capture, not a raw camera button; the report is a downloadable PDF; the walk-around actually produces a top-down damage diagram with evidence crops.
  • Clean engineering. Pydantic contracts, deterministic JSON, mypy --strict on rodi/, 349+ tests (synthetic degraded-image cases, contract tests, golden JSON), secrets/data hooks on every commit.
  • A team process that scaled to three Claudes. No one blocked on anyone; main always ran; every non-trivial decision ended up in DECISIONS.md.

What we learned

  • A hardcoded confidence is a bug. Confidence must come from evidence (agreement between photos, fit residuals, quality flags), or it misleads the receptionist.
  • Fix the formula before tuning the parameters. The 8.32 → 2.48 → 0.91 mm jumps all came from a single root cause each (wrong coin geometry; wrong rib-top cue; wrong shoulder sampling margin), not from grid-searching thresholds.
  • Image text is data, not instructions. Stickers, plates and posters inside tyre photos can contain prompt-injection attempts; the vision prompts say so explicitly.
  • Honest unmeasurable beats a fabricated number every time. The spec rewards partial completion: one level done well beats five half-done. Flags and needs_verification are features, not noise.
  • Short feedback loops. Every change to L3 was logged as an experiment in docs/experiments/l3.md with the MAE delta; anything that didn't improve CV MAE was rolled back the same hour.

What's next for InterTractor

  • More L3 labels. 20+ tyres across phones / light / wear, with leave-one-tyre-out cross-validation, to turn today's 0.91 mm MAE into a validated 0.5 mm MAE on the full partial-points target.
  • Finish the zone-tag round-trip. The CLI already reads _inner / _centre / _outer from the filename; the API contract kwarg (A) and the Flutter 3-shot tread step (C) are the remaining pieces of D-043.
  • Adversarial L3 tests. Blur, glare, rotation, EXIF-wrong, corrupted bytes — every entry point must return a flagged result, never a crash.
  • Check-in vs check-out with real pairs. The diff route and the weights are in; what's missing is real paired walk-around videos (today the weights are calibrated on reversed re-analyses).
  • On-device fallback. A smaller local model for the sidewall and the tread when the backend is unreachable, so the receptionist can still check in a car with no internet.
  • Beyond HackEPS. A real workshop pilot, with compliance-grade audit trail (immutable JSON + evidence) so the "was this scratch already there?" question finally has a photographed, timestamped, honest answer.

Built With

Share this project:

Updates

Submission history