YOLO11s Playing-Card Detector — 52 classes

A YOLO11s object detector that locates playing cards in an image and names each by rank + suit (52 classes, e.g. 10H, KS, JC). Built for Live Game Defender — an on-prem AI integrity monitor for live casino table games. An empty frame yields no detection, giving a built-in "is there a card?" gate.

Classes (52, in 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 QS

Suit codes: C=Clubs, D=Diamonds, H=Hearts, S=Spades.

Training

Metrics — on the dataset's own validation split

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 the detector generalizes well to many cards but has a known synthetic→real domain gap on some black court cards (e.g. King of Spades) — where it tends to return no detection rather than a wrong guess. Real-frame fine-tuning is in progress. Do not treat the table above as real-table accuracy.

Usage

from ultralytics import YOLO
model = YOLO("best.pt")
r = model.predict("frame.jpg", conf=0.25)[0]
for b in r.boxes:
    print(r.names[int(b.cls)], float(b.conf))

A license-clean ONNX export (best.onnx) is also included — run it with onnxruntime (MIT) so inference touches no AGPL code.

License

AGPL-3.0, inherited from Ultralytics YOLO11 (code + base weights). The training dataset is Public Domain (CC0-equivalent); credit to Roboflow augmented-startups/playing-cards-ow27d. Serving this model over a network obliges you to offer the corresponding source (AGPL network-copyleft).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support