Views
No views yet
10H, KS, JC). Part of the Live Game Defender (LGD) card-detector family —
an on-prem AI integrity monitor for live casino table games. An empty frame yields no detection,
which doubles as an "is there a card?" gate.Gen 1 is the first, dataset-trained generation. It is superseded — for real casino/table footage uselgd-cards-gen3(current). Gen 1 scores near-perfect on its own dataset's validation split but has a real-world synthetic→real gap (see Metrics). It is published for provenance and reproducibility.
| Gen | Repo | Trained on | Frozen real-video holdout recall | Status |
|---|---|---|---|---|
| 1 | lgd-cards-gen1 (this) | Roboflow ow27d v4 dataset | — (dataset-val only) | superseded |
| 2 | lgd-cards-gen2 | + day-1 PoC table video | 0.68 | superseded |
| 3 | lgd-cards-gen3 | + day-2 PoC table video | 0.85 | ✅ current |
data.yaml order)10C 10D 10H 10S 2C 2D 2H 2S 3C 3D 3H 3S 4C 4D 4H 4S 5C 5D 5H 5S
6C 6D 6H 6S 7C 7D 7H 7S 8C 8D 8H 8S 9C 9D 9H 9S
AC AD AH AS JC JD JH JS KC KD KH KS QC QD QH QSC=Clubs, D=Diamonds, H=Hearts, S=Spades.best.pt — Ultralytics PyTorch weights.best.onnx — ONNX export (run with onnxruntime, no training framework needed).data.yaml — class list / dataset config.yolo11s.pt (COCO-pretrained), fine-tuned 25 epochs, imgsz=640.augmented-startups/playing-cards-ow27d v4
— Public Domain; 21,203 train / 2,020 val / 1,010 test.| mAP50 | mAP50-95 | precision | recall |
|---|---|---|---|
| 0.995 | ~0.80 | 0.999 | ~1.00 |
⚠️ These are dataset-distribution numbers, NOT real-world casino accuracy. On real webcam photos this generation generalizes to many cards but has a known synthetic→real gap on some black court cards (e.g. King of Spades) — where it tends to return no detection rather than a wrong guess. This is exactly why gens 2–3 were fine-tuned on real table video. Do not treat the table above as real-table accuracy.
1from ultralytics import YOLO
2model = YOLO("best.pt")
3r = model.predict("frame.jpg", conf=0.25)[0]
4for b in r.boxes:
5 print(r.names[int(b.cls)], float(b.conf))1# ONNX / onnxruntime (MIT) — no AGPL code on the inference path
2import onnxruntime as ort
3sess = ort.InferenceSession("best.onnx", providers=["CPUExecutionProvider"])
4# 640x640 letterboxed input; class order == data.yaml aboveyolo11s.pt),
which is AGPL-3.0 — so these weights inherit AGPL-3.0 and are not an original work of ours. If
you deploy them in a networked service, AGPL §13 applies: you must offer users the Corresponding
Source. Running the ONNX export via onnxruntime keeps the inference code AGPL-free, but the
AGPL still attaches to the weights themselves.