/ Модель

Характеристики

Лицензия
AGPL 3.0
Библиотека
onnx
Опубликована
2 авг 2026

diecamera-models

Поиск объектовИзображение → bounding_boxes

Набор ONNX-моделей dieCamera определяет тип физических многогранных кубиков и распознаёт значение верхней грани по кадру веб-камеры.

0скачиваний за 30 дней1лайквеса обновлены27 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Набор из четырёх ONNX-моделей, разработанных участниками проекта dieCamera: Triveni Gandhi создала модели трёхэтапного чтения значений, а @eschatus — детектор типа кубика и классификатор для двухэтапного чтения. Модели предназначены для локального распознавания физических многогранных игровых кубиков в кадре веб-камеры: определения их типа и значения верхней грани. Конвейер использует YOLOv8 для обнаружения кубиков и цифр и ConvNeXt для классификации значения; модели работают офлайн на CPU или GPU с DirectML. Репозиторий распространяется под лицензией AGPL-3.0.

Это специализированные модели для рига с лотком и веб-камерами, обученные на наборе G-G-Games/diecamera-dice. Качество зависит от освещения, фона, набора кубиков и размера объекта в кадре; авторы сообщают о хороших результатах примерно при ширине кубика 270 пикселей и низких при 140 пикселях. Известная неоднозначность — различение 6 и 9 на d10. Оценки получены на данных авторов, для двух схем чтения значений нет чистого общего тестового набора; README рекомендует показывать распознанное значение человеку перед использованием.

Сценарии применения

  • определение типов многогранных кубиков на игровом столе
  • распознавание значения верхней грани кубика по кадру веб-камеры
  • локальное чтение результатов броска кубиков в настольной ролевой игре
  • автоматизация ввода результатов броска в приложении dieCamera

Ограничения

Модели обучены на ограниченном наборе веб-камер, лотке и кубиках; качество заметно падает при незнакомых условиях съёмки, освещении, фоне и малом размере кубика. Различение 6 и 9 на d10 неоднозначно, а README рекомендует подтверждать распознанное значение человеком.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

dieCamera dice readers

Four ONNX models that read physical polyhedral dice from a webcam frame: which dice are on the table, and what each one landed on. They run offline on CPU or any DX12 GPU (DirectML) in ~50–100 ms a frame, and are the local reader inside dieCamera.

Trained on G-G-Games/diecamera-dice.

filejobsize
dice-shape.onnxYOLOv8 detector — finds each die, classifies its type43MB
dice-value-glyph.onnxYOLOv8 detector — finds the up-face numeral on each die43MB
dice-value.onnxConvNeXt classifier — reads that numeral, 21-way "0".."20"106MB
dice-value-cls.onnxYOLOv8-cls — reads a whole-die crop directly, 60-way20MB

Each ships with a .classes.json giving its output order. The class list is not optional — the indices mean nothing without it.

Two ways to read a face

dice-shape finds and types the dice in both pipelines. What differs is how the numeral is read:

Three-pass (dice-shape → dice-value-glyph → dice-value) localises the numeral on the full frame and classifies a tight crop of it. Argmax is gated to the die type's legal range, so a "15" can never come back for a d8, and the returned confidence is a softmax over the in-range classes only.

Two-pass (dice-shape → dice-value-cls) skips localisation and classifies the die crop whole, as one of 60 (type, face) classes. A fifth the size and one less model call.

Both are shipped. Which is better is genuinely unsettled — see below.

Accuracy, honestly

Reported by their authors, on their own held-out splits:

  • dice-shape — mAP50 0.886 on a shared three-domain validation set (v2). Its predecessor scored 0.995 on a single-domain split and 0.752 here; the higher number was an easier test set, not a better model.
  • dice-value (three-pass) — cross-validated per type: d8 0.88 · d10 0.72 · d12 0.75 · d20 0.55.
  • dice-value-cls (two-pass) — face top-1 0.411 on held-out crops. Most of that came from training at 224px instead of downscaling crops to 128, which was worth +0.12 by itself.

Measured head-to-head on identical frames from the training corpus:

framesthree-passtwo-pass
whole corpus (563 dice)0.4900.480
30 newest, sharp 5MP (113 dice)0.5750.699

Do not read that table as a verdict. Both models were trained on this corpus with splits that were not recorded, and the two-pass model was retrained after most of those newest frames existed — so its 0.699 is partly recall. Only five frames in the corpus postdate its training. There is no clean shared holdout yet, and the per-author numbers above are better evidence than anything measured after the fact.

Die-type detection is identical either way (0.961 on the same frames) because both start from dice-shape.

What they are not

These are rig specialists, not a general dice reader. They were trained on a handful of webcams over a small tray, and accuracy falls off sharply on unfamiliar lighting, backgrounds, or dice sets. The best single predictor of whether they will work for you is how many pixels land on a die face: the reference rig reads well at ~270px across a die and poorly at ~140px.

The known failure is 6 vs 9 on a d10, which is ambiguous on plenty of real dice sets and is not fully solvable from pixels alone.

Consuming application note: dieCamera never posts a face without showing it to a human first. A fast, correctable guess is more useful there than a slow accurate one — these models are tuned for that trade, not for autonomous use.

Usage

import json, onnxruntime as ort
sess = ort.InferenceSession("dice-shape.onnx")
classes = json.load(open("dice-shape.classes.json"))["classes"]
# 640x640 letterboxed RGB, NCHW, 0-1 -> standard YOLOv8 output; NMS, then classes[class_id]

The full pipeline — letterboxing, NMS, glyph-to-die matching, the range gate, and the ImageNet normalisation the classifier expects — is implemented in TypeScript in src/readers/local/. The crop recipe must match training exactly (detector box + 0.1 margin, stretch-resized to 224×224, ImageNet-normalised); drifting from it reintroduced a domain-shift bug that once took a value model from 97% on web images to 17.5% on the real rig.

Credits

License

AGPL-3.0. Use, modify, or redistribute these weights — including as part of a hosted or network-accessible service — under AGPL-3.0, which requires releasing corresponding source for your derivative under the same terms. A separate commercial license, without the AGPL's copyleft/source-disclosure obligations, is available from G-G-Games for closed commercial use; contact us for terms. The dieCamera application itself is licensed separately (see its own repo). The training data is CC BY-SA 4.0 and published separately.

(Provisional — this replaces an earlier MIT license on this card. Not yet cleared by counsel; do not rely on the enforceability of the commercial-license carve-out until a lawyer has reviewed it.)

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnx

Нельзя запустить

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
35480b8

0 моделей