Skip to content

feat(auto-scorer): allow proceeding past aiming without calibration#714

Merged
mathrb merged 2 commits into
mainfrom
feat/uncalibrated-capture
Jun 26, 2026
Merged

feat(auto-scorer): allow proceeding past aiming without calibration#714
mathrb merged 2 commits into
mainfrom
feat/uncalibrated-capture

Conversation

@mathrb

@mathrb mathrb commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Context

Today the camera auto-scorer can only collect training frames once calibration succeeds — the model finds all 4 calibration markers. Users with an unsupported configuration (different mounting angle, different board/target) can never get past the aim step: the confirm button is disabled until the 4 cals are detected and held steady. Those are exactly the configs we most want data from, yet they produce nothing.

Change

  • Aim-confirm button is always clickable. Calibrated (4 cals present) → unchanged "Done aiming". Uncalibrated → "Continue without auto-scoring", which shows a one-time note (auto-scoring off → score by hand → throws help training, BETA) and then proceeds.
  • Captures without cals already work via captureManualEntry ([Feature]: capture the frame on manual segment entry in auto-scoring #537, wired into every board page, gated only on dataCollectionEnabledProvider). Without a homography nothing auto-emits, so the player scores manually and each manual entry saves a labelled frame — the data path for unsupported configs.
  • New uncalibrated flag on the capture sidecar, derived once in _recordFor as !frame.hasCalibration, so every capture path is stamped and the probe can single out unsupported-config frames. Backward-compatible (defaults false; legacy sidecars read false).
  • New AutoScorerUncalibratedNoticeSeen provider persists the one-time note acknowledgement (mirrors AutoScorerSetupTipsSeen).
  • 2 new i18n keys across all 7 locales.

Trade-off

The label/fast-path now discriminates on calibrated (4 cals present) instead of ready (4 cals stable for 3 frames), dropping the aim-time stability wait for the green path. Low-stakes: per #687 the running preview re-derives the transform live every frame; the "Hold steady…" hint still nudges users to wait.

Tests

  • CaptureRecord JSON round-trip + key-contract + legacy-default for uncalibrated.
  • Session: a frame without 4 cals → uncalibrated: true; full cals → false.
  • Full suite green (2196), flutter analyze --no-fatal-infos clean.

Verification (device — uncalibrated path is mobile-only)

Build debug APK, enable data collection, point at an unsupported setup so cals never resolve → button reads "Continue without auto-scoring", one-time note appears, lands in the running preview ("needs calibration" chip). Enter darts manually → sidecars written with "uncalibrated": true and the segment in corrected_darts. Re-entering uncalibrated should NOT re-show the note. Regression: a normal calibrated setup still auto-scores and writes "uncalibrated": false.

🤖 Generated with Claude Code

mathrb and others added 2 commits June 26, 2026 22:19
Unsupported setups (different angle/board) never resolve the 4 calibration
markers, so the aim-confirm button stayed disabled and those configs — the
ones we most want training data from — could never contribute frames.

Keep the aim button always clickable: calibrated → "Done aiming" (unchanged);
uncalibrated → "Continue without auto-scoring" after a one-time note. Without a
homography no darts auto-emit, so the player scores by hand and each manual
entry captures a labelled frame via the existing captureManualEntry path
(#537), still gated on the data-collection opt-in.

Every capture is stamped `uncalibrated` (derived once in _recordFor from
frame.hasCalibration) so the probe can single out these frames. New
AutoScorerUncalibratedNoticeSeen provider persists the one-time note ack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Notice no longer claims throws are saved unconditionally: capture writes
  gate on dataCollectionEnabledProvider, so the text is now conditional
  ("if data collection is on") — honest for opted-out users.
- Aim hint no longer contradicts the button: with 4 cals present the button
  is enabled "Done aiming", so the calibrated-but-not-stable hint is now an
  advisory "tap Done aiming when steady" instead of "Hold steady…" (restores
  hint↔button agreement, #411).
- Refresh the stale AutoScorerYoloAimView doc comment (button is always
  clickable now, not gated on stable calibration).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mathrb mathrb merged commit 48a5a42 into main Jun 26, 2026
2 checks passed
@mathrb mathrb deleted the feat/uncalibrated-capture branch June 26, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant