solring-eval / README.md
HanClinto's picture
docs: expand dataset card from original GDrive readme
11f4c7b verified
---
license: cc-by-sa-4.0
task_categories:
- image-classification
tags:
- magic-the-gathering
- card-identification
- temporal-eval
- edition-identification
pretty_name: Sol Ring Temporal Eval
size_categories:
- n<1K
---
# Sol Ring Dataset
(c) 2026, HanClinto Games, LLC
A collection of 307 reference frames for benchmarking Magic: The Gathering card
identification — specifically **edition (set) discrimination** under real-world
camera conditions.
## Purpose
To provide a meaningful, reproducible metric for measuring and comparing the
accuracy of card recognition algorithms, with particular focus on
**set / edition identification** rather than just card-name recognition.
## Theory
In Magic: The Gathering, Commander is the most popular way to play the game.
In Commander, the single most-popular card (ranked #1 on EDHREC) is Sol Ring.
The Mike Bierik artwork for Sol Ring is the most-reprinted artwork in the
entire game, appearing across dozens of Commander precon sets with nearly
identical artwork and card layout.
This makes Sol Ring uniquely valuable as a benchmark: it is simultaneously
the most-played card in the most-played format, *and* the card whose printings
are most easily confused with one another. A system that can reliably
distinguish a C17 Sol Ring from a C18 Sol Ring from a CMR Sol Ring — all
sharing the same artwork — has demonstrated meaningful edition discrimination,
not just card-name lookup.
This dataset therefore represents a practical, high-stakes standard for edition
identification accuracy across a wide swath of modern sets.
## Dataset construction
21 distinct printings of Sol Ring were acquired through TCGPlayer — each from
a different edition, each bearing the iconic Mike Bierik artwork.
Short videos were recorded of each card using a mobile phone against a plain
white background, capturing dozens of frames per card across varied lightings,
angles, and minor motion blur.
Each video filename is labeled with the Scryfall UUID of the correct card.
Keyframes were extracted with FFmpeg, and blur detection was used to filter out
unwanted frames. The remaining sharp ("good") frames are what appear in this
dataset under `data/frames/`.
Corner coordinates for each frame were then detected via a SIFT homography
pipeline matching against the known Scryfall reference image for that card.
These are stored in `corners.csv` and can be used to dewarp each frame to a
clean, perspective-corrected card crop before running an identification model.
## Temporal structure
Frames within each edition are **temporally ordered** by `frame_number`
(the source video frame index, spaced roughly every 60 source frames
≈ 1–2 seconds at 30 fps). This ordering is critical for simulating a
live-camera rolling-buffer evaluation:
```python
from collections import deque, defaultdict
import csv, cv2
from pathlib import Path
rows = list(csv.DictReader(open("corners.csv")))
by_card = defaultdict(list)
for r in rows:
by_card[r["card_id"]].append(r)
for frames in by_card.values():
frames.sort(key=lambda r: int(r["frame_number"]))
# Simulate a rolling buffer of up to 5 embeddings
for card_id, frames in by_card.items():
buffer = deque(maxlen=5)
for row in frames:
img = cv2.imread(row["img_path"])
emb = embed(dewarp(img, row)) # your model here
kept = [e for e in buffer
if cosine_sim(emb, e) >= 0.7] # filter bad grabs
search_emb = normalize(mean([emb] + kept)) if kept else emb
top1 = gallery_search(search_emb)
buffer.append(emb)
record(top1 == card_id)
```
## File layout
```
corners.csv 307-row metadata file (schema below)
data/frames/*.jpg source JPEG frames (original camera perspective, not cropped)
```
## corners.csv schema
| Column | Type | Description |
|---|---|---|
| `img_path` | str | Path relative to repo root: `data/frames/{filename}` |
| `card_id` | str | Scryfall UUID — ground-truth card identity |
| `set_code` | str | Set abbreviation parsed from filename (e.g. `khc`) |
| `frame_number` | int | Source video frame index — establishes temporal order within an edition |
| `corner0_x``corner3_y` | float | Homography-detected card corners, normalized 0–1 |
| `num_good_matches` | int | SIFT inlier count — proxy for detection confidence |
| `matching_area_pct` | float | Fraction of the Scryfall reference card area matched |
## Edition list
All 21 printings share the Mike Bierik Sol Ring artwork.
| card_id | set | frames | frame range |
|---|---|---|---|
| `2c52c96d-e20f-4025-b759-674b36cf0db3` | AFC | 14 | 0–784 |
| `1b59533a-3e38-495d-873e-2f89fbd08494` | C13 | 14 | 0–780 |
| `b79cb394-eb91-4b3b-91d4-c6a0f723feb1` | C14 | 15 | 0–840 |
| `3459b229-7c46-4f70-87d4-bb31c2c17dd9` | C15 | 13 | 0–720 |
| `0f003fde-be17-4159-a361-711ed0bee911` | C16 | 9 | 182–662 |
| `c6399a22-cebf-4c1d-a23e-4c68f784ac1b` | C17 | 16 | 1–900 |
| `83a0f2eb-2f6d-4aaa-b7a9-ea06d5de7eca` | C18 | 18 | 0–1020 |
| `e672d408-997c-4a19-810a-3da8411eecf2` | C19 | 15 | 0–842 |
| `286bea73-8ad8-4423-8a7c-8497420fdb54` | C20 | 11 | 0–663 |
| `4cbc6901-6a4a-4d0a-83ea-7eefa3b35021` | C21 | 21 | 0–1200 |
| `199cde21-5bc3-49cd-acd4-bae3af6e5881` | CLB | 17 | 0–964 |
| `f9a32f17-49c4-4654-a087-1ba474f37377` | CM2 | 15 | 1–904 |
| `f48f7190-9ee3-477f-8b25-91e8c2916624` | CMA | 14 | 0–782 |
| `71357a3d-9a9f-4ec6-8e01-1966b220206c` | CMD | 13 | 0–722 |
| `58b26011-e103-45c4-a253-900f4e6b2eeb` | CMR | 11 | 0–720 |
| `beebe533-29b9-4041-ab66-0a8233c50d56` | DMC | 17 | 0–1085 |
| `0afa0e33-4804-4b00-b625-c2d6b61090fc` | KHC | 13 | 0–787 |
| `1b3a4537-1d51-47ac-a12e-6b8d68f530e6` | MB1 | 13 | 0–780 |
| `3917f744-b876-47ae-94ad-f72b215ff1e7` | NEC | 14 | 0–786 |
| `38d347b7-dc17-417a-ab07-29fe99b9a101` | PHED | 19 | 0–1143 |
| `8a5edac3-855a-4820-b913-44de5b29b7d0` | ZNC | 15 | 0–840 |
## License
This dataset is released under the
[Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/).
You are free to share and adapt this material for any purpose, including
commercially, as long as you provide appropriate credit and distribute any
derivative datasets under the same license. You are **explicitly free to use
this dataset for commercial purposes** under those terms.
The goal is a universal, openly-accessible standard for measuring card
identification accuracy — usable for comparing closed-source and open-source
solutions alike. If the above terms don't work for your situation, reach out
and we can discuss alternative licensing.
Contributions are welcome. Additions or corrections to the dataset are
appreciated but not required.