File size: 4,135 Bytes
9417497
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
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.