Instructions to use kaya-go/moku-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaya-go/moku-v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="kaya-go/moku-v4")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("kaya-go/moku-v4") model = AutoModelForObjectDetection.from_pretrained("kaya-go/moku-v4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
moku-v4
Go board detector used by Kaya to turn a photo of a goban into a position (SGF). Trained with moku.
It detects three classes: black_stone (0), white_stone (1) and board_corner (2).
Kaya computes a homography from the 4 corners and snaps every stone onto the grid.
Files
model.safetensors,config.json,preprocessor_config.json: 🤗 transformers checkpoint.model.onnx: what Kaya runs (ONNX Runtime Web). Inputpixel_values(batch, 3, 640, 640), RGB scaled to [0, 1] with no mean/std normalization; outputslogits(batch, 300, 3)(apply a sigmoid) andpred_boxes(batch, 300, 4), normalized(cx, cy, w, h). With the corner head, a third outputcorner_points(batch, 8, 3)holds the 8 best board-corner peaks(x, y, score), x and y normalized to [0, 1] (class-agnostic). The stone-threshold calibration is baked intologits(offset +0.35 on every class logit), so Kaya's fixed 0.035 threshold needs no per-model setting.
Evaluation
| split | mAP@50 | stone cdAP | corner R@4 | perfect boards | errors / board |
|---|---|---|---|---|---|
| validation | 0.544 | 0.773 | 0.642 | 42% [31%, 54%] | 20.8 [12.8, 29.5] |
| test | 0.585 | 0.794 | 0.664 | 44% [35%, 53%] | 18.6 [10.6, 28.6] |
Board metrics run Kaya's own post-processing (stone threshold 0.035, corners from head) and compare the
resulting position with the one read from the annotations: perfect is the share of boards
without a single wrong intersection and no corner more than half a cell off. Intervals are 90%
bootstrap CIs over photos.
- Downloads last month
- 42
Model tree for kaya-go/moku-v4
Base model
kaya-go/moku-v2