Datasets:
Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-classification
|
| 5 |
+
tags:
|
| 6 |
+
- magic-the-gathering
|
| 7 |
+
- card-identification
|
| 8 |
+
- temporal-eval
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Sol Ring Eval Dataset
|
| 12 |
+
|
| 13 |
+
A temporal evaluation benchmark for Magic: The Gathering card identification,
|
| 14 |
+
specifically designed to measure how **multi-frame rolling-buffer** approaches
|
| 15 |
+
compare to single-frame identification.
|
| 16 |
+
|
| 17 |
+
## What's in it
|
| 18 |
+
|
| 19 |
+
- **308 frames** from 22 distinct Sol Ring printings (editions), drawn from
|
| 20 |
+
21 short phone-camera videos.
|
| 21 |
+
- Each edition is its own video; frames within a video are temporally ordered
|
| 22 |
+
by `frame_number` (spaced ~60 source frames ≈ 1–2 seconds apart at 30 fps).
|
| 23 |
+
- `corners.csv` provides per-frame homography-verified card corner coordinates
|
| 24 |
+
(normalized 0–1), a sharpness proxy (`num_good_matches`), and the ground-truth
|
| 25 |
+
`card_id` (Scryfall UUID) and `set_code`.
|
| 26 |
+
|
| 27 |
+
## File layout
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
corners.csv 308-row metadata file (see schema below)
|
| 31 |
+
data/frames/*.jpg source JPEG frames (pre-dewarped, camera perspective intact)
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
## corners.csv schema
|
| 35 |
+
|
| 36 |
+
| Column | Type | Description |
|
| 37 |
+
|---|---|---|
|
| 38 |
+
| `img_path` | str | Path relative to repo root (`data/frames/{filename}`) |
|
| 39 |
+
| `card_id` | str | Scryfall UUID — ground-truth card identity |
|
| 40 |
+
| `set_code` | str | Set abbreviation parsed from filename (e.g. `khc`) |
|
| 41 |
+
| `frame_number` | int | Frame index within the source video — establishes temporal order |
|
| 42 |
+
| `corner0_x` … `corner3_y` | float | Homography-detected card corners, normalized 0–1 |
|
| 43 |
+
| `num_good_matches` | int | SIFT inlier count — proxy for detection confidence |
|
| 44 |
+
| `matching_area_pct` | float | Fraction of reference card area matched |
|
| 45 |
+
|
| 46 |
+
## Intended use
|
| 47 |
+
|
| 48 |
+
Simulate a live-camera feed per edition:
|
| 49 |
+
|
| 50 |
+
```python
|
| 51 |
+
from collections import deque
|
| 52 |
+
from datasets import load_dataset
|
| 53 |
+
|
| 54 |
+
ds = load_dataset("HanClinto/solring-eval", split="train")
|
| 55 |
+
|
| 56 |
+
# Group by card_id, sort by frame_number to get temporal sequence
|
| 57 |
+
for card_id, frames in group_by_card(ds):
|
| 58 |
+
buffer = deque(maxlen=5)
|
| 59 |
+
for frame in sorted(frames, key=lambda r: r["frame_number"]):
|
| 60 |
+
emb = embed(dewarp(frame))
|
| 61 |
+
kept = [e for e in buffer if cosine_sim(emb, e) >= 0.7]
|
| 62 |
+
search_emb = normalize(mean([emb] + kept)) if kept else emb
|
| 63 |
+
top1 = gallery_search(search_emb)
|
| 64 |
+
buffer.append(emb)
|
| 65 |
+
record(top1 == card_id)
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## Edition list (22 printings)
|
| 69 |
+
|
| 70 |
+
All 22 are distinct Scryfall card IDs for Sol Ring across different sets.
|
| 71 |
+
See `corners.csv` `card_id` + `set_code` columns for the full list.
|
| 72 |
+
|
| 73 |
+
## License
|
| 74 |
+
|
| 75 |
+
Images are derivative of Wizards of the Coast card artwork; usage is for
|
| 76 |
+
non-commercial research only. Metadata (corners.csv) is CC BY 4.0.
|