lgd-chips-gen2 / README.md
sroot's picture
Publish chip gen2 (current, dual-felt)
9417497 verified
|
Raw
History Blame Contribute Delete
4.14 kB
---
license: agpl-3.0
library_name: ultralytics
pipeline_tag: object-detection
base_model: Ultralytics/YOLO11
tags:
- object-detection
- ultralytics
- yolo11
- onnx
- onnxruntime
- casino-chips
- chip-detection
- casino
- live-game-defender
model-index:
- name: lgd-chips-gen2
results:
- task:
type: object-detection
dataset:
type: lgd-chip-gate-uth
name: LGD chip_test_v2 UTH gate (private, never trained on)
metrics:
- type: recall
value: 0.80
name: Chip recall @50
- type: precision
value: 0.85
name: Precision
- type: accuracy
value: 0.97
name: Colour accuracy
---
# LGD Chips — Gen 2 · YOLO11s casino chip-colour detector (5 colours, dual-felt) ✅ CURRENT
The **current** generation of the **Live Game Defender (LGD)** casino-chip detector, and the model
LGD serves in production. A **YOLO11s** object detector that finds gaming chips on the felt and
classifies each by **colour**. Gen 2 is a **dual-felt** model — trained on a blend of Ultimate Texas
Hold'em and blackjack footage so it works on both table types — and uses a **venue-matched palette**.
Colours only; colour→denomination is per-casino configuration downstream.
The palette is the actual venue's chips: `chip_black` `chip_green` `chip_pink` `chip_purple`
`chip_yellow` — no white, no red (the light "100" chip is the black denomination; felt red is only
printed markers and card suit-pips).
## Generations
| Gen | Repo | Palette | Frozen-gate verdict | Status |
|---|---|---|---|---|
| 1 | [lgd-chips-gen1](https://huggingface.co/sroot/lgd-chips-gen1) | black / white / green / red / pink | blackjack gate: 0.91 / 0.77 | superseded |
| 2 | **lgd-chips-gen2** (this) | black / green / pink / purple / yellow | UTH gate: **0.80 / 0.85 / colour 0.97** | ✅ current |
Card detectors: [lgd-cards-gen1](https://huggingface.co/sroot/lgd-cards-gen1) · [lgd-cards-gen2](https://huggingface.co/sroot/lgd-cards-gen2) · [lgd-cards-gen3](https://huggingface.co/sroot/lgd-cards-gen3).
## Classes (5, in `model.classes.json` order)
```
chip_black chip_green chip_pink chip_purple chip_yellow
```
## Files
- `model.onnx` — ONNX export (run with `onnxruntime`); this is the exact file LGD serves.
- `model.classes.json` — ordered class-name sidecar (index → colour).
- `metrics.json` — training config + evaluation.
## Training
- **Base:** Ultralytics `yolo11s.pt` (COCO-pretrained), 60 epochs, `imgsz=640`.
- **Data:** a blend of the UTH chip corpus and the gen-1 blackjack data (point-labeled by vision
agents), making it a dual-felt model.
- **Hardware:** NVIDIA RTX 3060 (12 GB).
## Metrics — frozen gates (never trained on)
| Gate | Recall | Precision | Colour accuracy | Printed-board false positives |
|---|---|---|---|---|
| `chip_test_v2` (UTH) | 0.80 | 0.85 | 0.97 | 0 / 6 empty-board negatives |
| `chip_test` (blackjack) | 0.92 | 0.95 | — | — |
The gen-1 printed-board false positive (spurious `chip_black` on the UTH "Play/Ante/Blind" ovals) is
**fixed** here — gen 2 puts zero boxes on an empty printed board.
> ⚠️ **Not casino accuracy (rule of the project).** Gates are our own PoC recordings, never trained
> on. Colours only — mapping colour→denomination is per-casino configuration. Dataset-internal
> `mAP@50` (0.70) in `metrics.json` is not a real-world accuracy claim.
## Usage
```python
import json, onnxruntime as ort
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
colours = json.load(open("model.classes.json")) # index -> "chip_black", ...
# Detect boxes per colour, then count per class for stack/bet estimation.
```
## License & provenance
**AGPL-3.0**, a fine-tune of **Ultralytics YOLO11** (`yolo11s.pt`, AGPL-3.0) — these weights inherit
AGPL-3.0 and **are not an original work of ours**. Networked deployment triggers AGPL §13 (offer the
Corresponding Source). `onnxruntime` (MIT) keeps the inference code AGPL-free; the weights stay AGPL.
Built for **Live Game Defender (LGD)** — an on-prem AI integrity monitor for live casino table
games. © 2026 TechTools s.r.o.