Skip to content

chore: release v0.3.4 - #17

Merged
tkgstrator merged 1 commit into
masterfrom
develop
Jul 13, 2026
Merged

chore: release v0.3.4#17
tkgstrator merged 1 commit into
masterfrom
develop

Conversation

@tkgstrator

Copy link
Copy Markdown
Contributor

Release v0.3.4

developmaster に promote してプロダクション反映。

What's shipping

Detector 学習パイプライン

  • mito_train/training/train_detector.py / HFDetectorDataset / 強 augmentation
  • runs/board-detector-v1 が 100ep で val iou_mean 0.99+ 到達

Realistic 評価

  • scripts/eval/eval_realistic.py (OCR 単体、GT bbox で crop)
  • scripts/eval/eval_realistic_e2e.py (end-to-end: detector 予測 bbox で crop)
  • 5 backbone × 4 device × 1000 SFEN 実測、wandb project mito-train-board-ocr-w384-v0.3.1-eval-realistic{,-e2e} に同期
  • end-to-end SFEN exact-match: mnv3l 97.92% / effb1 99.67% / cvnano 99.92%

ONNX export + release パイプライン

  • mito_train/export/{to_onnx,to_fp16,quantize}.py
  • scripts/export/{export_all,verify_onnx,build_release,write_manifest,write_release_notes}
  • .github/workflows/deployment.yml (workflow_dispatch or tag models-v* で発火)
  • shipping 対応: fp32 全対応 / fp16 detector+mnv3l+effb1 / int8 detector 参考のみ

Doc 拡充

  • docs/w384-sweep-analysis.md (収束・train↔val gap + realistic 評価)
  • docs/resolution-tradeoff.md (w224 vs w384)
  • docs/browser-inference-outlook.md (iGPU/iOS/Android 端末別推論見積)
  • docs/model-export.md (export パイプライン)
  • DETECTOR_STATUS.md (仕様書との差分)

Version

0.3.3 → 0.3.4 (pre-1.0 rule: feat = patch)

🤖 Generated with Claude Code

* docs(training-plan): refresh for w384 sweep, prune implemented items

- add 2026-07-13 w384 backbone sweep results
  (5 backbones, val sfen 0.976-0.999)
- collapse A/B/C/D/E design discussions to a single 実装済み summary
  since regression head, class weight, hand_weight=1.0, cosine+warmup,
  and resume have all landed
- drop v3 修正結果/内訳/config tables that referenced data/ocr_v3/
  files never generated
- keep v3 as a compact fallback plan for the case realistic captures
  reveal hand-tail gaps
- rewrite the next-iteration priorities around realistic evaluation
  and backbone selection

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add w384 sweep analysis with convergence metrics

New document w384-sweep-analysis.md records convergence speed, epoch
efficiency, and train/val gap analysis from the 384-resolution backbone
sweep. Updates TRAINING_PLAN.md and docs/README.md with references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(datasets): add HFDetectorDataset and resolution docs

Add HFDetectorDataset to load detector datasets from Hugging Face Hub with
per-sample bboxes. Add --hf-repo-id/--hf-config to train_detector.py. Document
w224 vs w384 resolution tradeoffs with measured baselines and operational
guidance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(train): add detector training script with HF dataset support

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(datasets): enhance detector augmentation pipeline

- Add asymmetric letterboxing (CropAndPad) for board context preservation
- Introduce anisotropic Affine scaling (x/y independent) with adjusted transform ranges
- Replace single blur with OneOf mix (GaussNoise, MotionBlur, GaussianBlur)
- Increase min_visibility to 0.999 for stricter bbox inclusion in crops
- Strengthen image degradation (compression, downscale) and color jitter parameters

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(eval): add realistic eval script for boardocr checkpoints

Evaluate BoardOCR against ultemica/piyoshogi-eval (1k SFEN × 4 real
devices). Isolates domain gap between training-set tight crops and
actual device screenshots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(detector): track best checkpoint by configurable evaluation metric

Allow --best-metric argument to specify which metric selects best.pt.
Checkpoints now store best_metric and best_metric_name for resume.
Best model is saved to best.pt when a new best is found.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(eval): add error handling and skip counter to eval_realistic

Handle missing/corrupt images gracefully with skip tracking, extract batch flush logic
into a helper function, and support .env configuration loading.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(eval): add W&B integration to eval_realistic

Adds W&B logging for per-(backbone, device) metrics and summary statistics.
Introduces --wandb, --wandb-project, and --wandb-run-name arguments to
control logging behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(eval): inject wandb cf access headers via environment variable

wandb-core only reads WANDB__EXTRA_HTTP_HEADERS from the environment, not from
wandb.Settings, so inject CF Access credentials early before wandb imports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(eval): require per-backbone wandb runs for 1:1 training pairing

- Enforce one backbone per invocation to map eval runs 1:1 to training runs
- Use backbone name as default run identifier for seamless label pairing
- Add --wandb-group for clustering parallel per-backbone eval runs
- Remove backbone prefix from metric keys (simplified per-run structure)
- Fix summary handling for single-backbone scalar values

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(detector): add status document for board detector implementation

Reference material documenting differences between the specification
(docs/ocr-model-interface.md §2) and the current BoardDetector implementation
in mito_train, including input/output interface, model architecture, training
results, and extension costs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(eval): add end-to-end realistic eval with detector-predicted crops

Removes crop-convention mismatch between piyoshogi-eval's bboxes and OCR
training data by using detector-predicted crops. Logs per-device metrics
to W&B (one run per backbone).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: document w384 realistic evaluation and finalize backbone selection

Completed piyoshogi-eval across 5 backbones × 4 devices: convnext_nano/tiny reach 99.92%
(exceed val baseline), efficientnet_b1 at 99.67% (Pareto-efficient), mobilenet_v3_large at
97.92% (edge lower bound). iPad board=0% was GT bbox annotation mismatch; resolved with
detector bbox preprocessing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(export): add board_ocr export and checkpoint-aware factories

MODEL_SPECS now uses factory functions that extract backbone, image_size,
and hand_mode from the loaded checkpoint, preserving these settings in the
exported ONNX model without requiring additional CLI arguments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add browser WebGPU inference time outlook

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(export): add ONNX export and GitHub Release pipeline

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(release): bump version to 0.3.4

Detector training pipeline, realistic eval (OCR-only + end-to-end), ONNX
export/release pipeline, browser inference outlook doc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(lint): remove unused imports and empty f-string

F401 in hf_detector_dataset and verify_onnx, F541 in write_release_notes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tkgstrator
tkgstrator merged commit 90626c2 into master Jul 13, 2026
3 checks passed
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