set-solver-dataset / README.md
wangtianthu's picture
Add files using upload-large-folder tool
515116b verified
metadata
license: mit
tags:
  - object-detection
  - image-classification
  - set-game
  - card-game
  - computer-vision
  - synthetic-data
size_categories:
  - 1K<n<10K

Set Solver Dataset

Training data for the Set card game solver.

Live demo | Models | Source code

Dataset Structure

Classifier — Card Attribute Classification

classifier/{number}/{color}/{shape}/{fill}/

1943 cropped card images organized into 81 classes (3 numbers x 3 colors x 3 shapes x 3 fills).

Attribute Values
Number one, two, three
Color red, green, blue (purple)
Shape diamond, oval, squiggle
Fill empty, full (solid), partial (striped)

Detector — Card Detection (YOLO format)

detector/images/ and detector/labels/

5000 synthetic board images (1280x960) with YOLO-format bounding box annotations.

  • Train: 4000 images (detector/images/train/)
  • Val: 1000 images (detector/images/val/)
  • Labels: YOLO .txt files + rich .json metadata per image
  • Class: single class (card)

The synthetic boards feature:

  • Grid, random, overlap, and pile card layouts
  • Varied background textures (wood, marble, gradients)
  • Perspective transforms simulating camera angles
  • Noise objects (buttons, coins, paper clips)
  • 9-12 cards per board

Usage

Detector training with Ultralytics

from ultralytics import YOLO

model = YOLO("yolo11n.pt")
model.train(data="detector/dataset.yaml", epochs=10, imgsz=640)

Classifier training

from torchvision.datasets import ImageFolder
from torchvision import transforms

dataset = ImageFolder("classifier/", transform=transforms.Compose([
    transforms.Resize((224, 224)),
    transforms.ToTensor(),
]))