Commit Graph
13 Commits
Author SHA1 Message Date
adamfandClaude Opus 5.5 36fae9cdc3 Rewrite README for the packaged pipeline
Cover the problem, the approach, how to run it and its measured
limitations, and correct what no longer matched the code (the --mode
flag, the .env file, the training directory). Update CLAUDE.md to the
new layout and commands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 12:08:54 +01:00
adamfandClaude Opus 5.5 7b19d8f3e9 Restructure scripts into the rowing_stats package
Move the five top-level scripts into src/rowing_stats, one module per
pipeline stage, behind a single 'rowing-stats' command with a subcommand
each (crop, classify, ocr, claude, tune). Add type hints throughout,
packaging metadata, pinned requirements files, and a test suite.

Failures are now typed exceptions under RowingStatsError instead of
prints, None returns and sys.exit: unreadable or missing images, photos
with no detectable screen, a missing tesseract binary, tesseract
failures, unusable Claude replies, and missing optional dependencies,
model weights or API credentials. Each command reports a bad file and
carries on, stops once on a setup problem, and returns a non-zero exit
code when something failed.

Crops, classifier labels and OCR votes are unchanged. Other changes:
- crop.find_screen takes a CropParams, so the tuner searches the real
  detection code instead of a copy of it.
- OCR validation scores only images that have a reference reading;
  images without one were counted as wrong.
- 'classify train --data-dir train/' works with the repository layout
  (it looked for train/train), and the CNN weights path defaults to the
  committed screen_classifier_model.pth instead of a missing model.pth.
- The CNN is loaded once per run rather than once per image.
- ocr and claude can write their readings with --output.
- crop no longer defaults to /mnt/user-data paths.
- Pure vote-counting moved to parsing.py; the unused 'expected' argument
  that let a caller steer the vote is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 12:08:01 +01:00
adamf c447cc41ea Optimise parameters 2026-03-16 15:20:59 +00:00
adamf ee8fa0960d Prioritize older images & make use MM:SS format 2026-03-16 14:00:35 +00:00
adamf 7383209804 Ignore api keys 2026-03-16 13:46:26 +00:00
adamf 3733f1e99f Claude cause quick 2026-03-16 13:46:18 +00:00
adamf f0184319c6 Crops to rowing machine screen - can be trained with optimize_crop.py and screen_classifier 2026-03-16 13:46:02 +00:00
adamf 2e386a4297 Uses claude to achieve extracting rowing times and distance 2026-03-16 13:44:57 +00:00
adamf 1624a7a40a Add temp files for training classifier 2026-03-16 13:44:09 +00:00
adamf 4abcb10194 Make new file for each step of processing 2026-03-16 11:54:37 +00:00
adamf ef0abd57d4 plot image 2026-01-27 11:28:15 +00:00
adamf a58c86ddee ignore pycache 2026-01-27 11:27:56 +00:00
adamf 25bb27f32a init commit 2026-01-26 19:07:38 +00:00