HanClinto commited on
Commit
11f4c7b
·
verified ·
1 Parent(s): 1d5c74d

docs: expand dataset card from original GDrive readme

Browse files
Files changed (1) hide show
  1. README.md +133 -44
README.md CHANGED
@@ -1,76 +1,165 @@
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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-sa-4.0
3
  task_categories:
4
  - image-classification
5
  tags:
6
  - magic-the-gathering
7
  - card-identification
8
  - temporal-eval
9
+ - edition-identification
10
+ pretty_name: Sol Ring Temporal Eval
11
+ size_categories:
12
+ - n<1K
13
  ---
14
 
15
+ # Sol Ring Dataset
16
 
17
+ (c) 2026, HanClinto Games, LLC
 
 
18
 
19
+ A collection of 307 reference frames for benchmarking Magic: The Gathering card
20
+ identification — specifically **edition (set) discrimination** under real-world
21
+ camera conditions.
22
 
23
+ ## Purpose
 
 
 
 
 
 
24
 
25
+ To provide a meaningful, reproducible metric for measuring and comparing the
26
+ accuracy of card recognition algorithms, with particular focus on
27
+ **set / edition identification** rather than just card-name recognition.
28
 
29
+ ## Theory
 
 
 
30
 
31
+ In Magic: The Gathering, Commander is the most popular way to play the game.
32
 
33
+ In Commander, the single most-popular card (ranked #1 on EDHREC) is Sol Ring.
 
 
 
 
 
 
 
 
34
 
35
+ The Mike Bierik artwork for Sol Ring is the most-reprinted artwork in the
36
+ entire game, appearing across dozens of Commander precon sets with nearly
37
+ identical artwork and card layout.
38
 
39
+ This makes Sol Ring uniquely valuable as a benchmark: it is simultaneously
40
+ the most-played card in the most-played format, *and* the card whose printings
41
+ are most easily confused with one another. A system that can reliably
42
+ distinguish a C17 Sol Ring from a C18 Sol Ring from a CMR Sol Ring — all
43
+ sharing the same artwork — has demonstrated meaningful edition discrimination,
44
+ not just card-name lookup.
45
 
46
+ This dataset therefore represents a practical, high-stakes standard for edition
47
+ identification accuracy across a wide swath of modern sets.
48
+
49
+ ## Dataset construction
50
+
51
+ 21 distinct printings of Sol Ring were acquired through TCGPlayer — each from
52
+ a different edition, each bearing the iconic Mike Bierik artwork.
53
+
54
+ Short videos were recorded of each card using a mobile phone against a plain
55
+ white background, capturing dozens of frames per card across varied lightings,
56
+ angles, and minor motion blur.
57
+
58
+ Each video filename is labeled with the Scryfall UUID of the correct card.
59
+
60
+ Keyframes were extracted with FFmpeg, and blur detection was used to filter out
61
+ unwanted frames. The remaining sharp ("good") frames are what appear in this
62
+ dataset under `data/frames/`.
63
+
64
+ Corner coordinates for each frame were then detected via a SIFT homography
65
+ pipeline matching against the known Scryfall reference image for that card.
66
+ These are stored in `corners.csv` and can be used to dewarp each frame to a
67
+ clean, perspective-corrected card crop before running an identification model.
68
 
69
+ ## Temporal structure
70
 
71
+ Frames within each edition are **temporally ordered** by `frame_number`
72
+ (the source video frame index, spaced roughly every 60 source frames
73
+ ≈ 1–2 seconds at 30 fps). This ordering is critical for simulating a
74
+ live-camera rolling-buffer evaluation:
75
+
76
+ ```python
77
+ from collections import deque, defaultdict
78
+ import csv, cv2
79
+ from pathlib import Path
80
+
81
+ rows = list(csv.DictReader(open("corners.csv")))
82
+ by_card = defaultdict(list)
83
+ for r in rows:
84
+ by_card[r["card_id"]].append(r)
85
+ for frames in by_card.values():
86
+ frames.sort(key=lambda r: int(r["frame_number"]))
87
+
88
+ # Simulate a rolling buffer of up to 5 embeddings
89
+ for card_id, frames in by_card.items():
90
  buffer = deque(maxlen=5)
91
+ for row in frames:
92
+ img = cv2.imread(row["img_path"])
93
+ emb = embed(dewarp(img, row)) # your model here
94
+ kept = [e for e in buffer
95
+ if cosine_sim(emb, e) >= 0.7] # filter bad grabs
96
  search_emb = normalize(mean([emb] + kept)) if kept else emb
97
  top1 = gallery_search(search_emb)
98
  buffer.append(emb)
99
  record(top1 == card_id)
100
  ```
101
 
102
+ ## File layout
103
 
104
+ ```
105
+ corners.csv 307-row metadata file (schema below)
106
+ data/frames/*.jpg source JPEG frames (original camera perspective, not cropped)
107
+ ```
108
+
109
+ ## corners.csv schema
110
+
111
+ | Column | Type | Description |
112
+ |---|---|---|
113
+ | `img_path` | str | Path relative to repo root: `data/frames/{filename}` |
114
+ | `card_id` | str | Scryfall UUID — ground-truth card identity |
115
+ | `set_code` | str | Set abbreviation parsed from filename (e.g. `khc`) |
116
+ | `frame_number` | int | Source video frame index — establishes temporal order within an edition |
117
+ | `corner0_x` … `corner3_y` | float | Homography-detected card corners, normalized 0–1 |
118
+ | `num_good_matches` | int | SIFT inlier count — proxy for detection confidence |
119
+ | `matching_area_pct` | float | Fraction of the Scryfall reference card area matched |
120
+
121
+ ## Edition list
122
+
123
+ All 21 printings share the Mike Bierik Sol Ring artwork.
124
+
125
+ | card_id | set | frames | frame range |
126
+ |---|---|---|---|
127
+ | `2c52c96d-e20f-4025-b759-674b36cf0db3` | AFC | 14 | 0–784 |
128
+ | `1b59533a-3e38-495d-873e-2f89fbd08494` | C13 | 14 | 0–780 |
129
+ | `b79cb394-eb91-4b3b-91d4-c6a0f723feb1` | C14 | 15 | 0–840 |
130
+ | `3459b229-7c46-4f70-87d4-bb31c2c17dd9` | C15 | 13 | 0–720 |
131
+ | `0f003fde-be17-4159-a361-711ed0bee911` | C16 | 9 | 182–662 |
132
+ | `c6399a22-cebf-4c1d-a23e-4c68f784ac1b` | C17 | 16 | 1–900 |
133
+ | `83a0f2eb-2f6d-4aaa-b7a9-ea06d5de7eca` | C18 | 18 | 0–1020 |
134
+ | `e672d408-997c-4a19-810a-3da8411eecf2` | C19 | 15 | 0–842 |
135
+ | `286bea73-8ad8-4423-8a7c-8497420fdb54` | C20 | 11 | 0–663 |
136
+ | `4cbc6901-6a4a-4d0a-83ea-7eefa3b35021` | C21 | 21 | 0–1200 |
137
+ | `199cde21-5bc3-49cd-acd4-bae3af6e5881` | CLB | 17 | 0–964 |
138
+ | `f9a32f17-49c4-4654-a087-1ba474f37377` | CM2 | 15 | 1–904 |
139
+ | `f48f7190-9ee3-477f-8b25-91e8c2916624` | CMA | 14 | 0–782 |
140
+ | `71357a3d-9a9f-4ec6-8e01-1966b220206c` | CMD | 13 | 0–722 |
141
+ | `58b26011-e103-45c4-a253-900f4e6b2eeb` | CMR | 11 | 0–720 |
142
+ | `beebe533-29b9-4041-ab66-0a8233c50d56` | DMC | 17 | 0–1085 |
143
+ | `0afa0e33-4804-4b00-b625-c2d6b61090fc` | KHC | 13 | 0–787 |
144
+ | `1b3a4537-1d51-47ac-a12e-6b8d68f530e6` | MB1 | 13 | 0–780 |
145
+ | `3917f744-b876-47ae-94ad-f72b215ff1e7` | NEC | 14 | 0–786 |
146
+ | `38d347b7-dc17-417a-ab07-29fe99b9a101` | PHED | 19 | 0–1143 |
147
+ | `8a5edac3-855a-4820-b913-44de5b29b7d0` | ZNC | 15 | 0–840 |
148
 
149
  ## License
150
 
151
+ This dataset is released under the
152
+ [Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/).
153
+
154
+ You are free to share and adapt this material for any purpose, including
155
+ commercially, as long as you provide appropriate credit and distribute any
156
+ derivative datasets under the same license. You are **explicitly free to use
157
+ this dataset for commercial purposes** under those terms.
158
+
159
+ The goal is a universal, openly-accessible standard for measuring card
160
+ identification accuracy — usable for comparing closed-source and open-source
161
+ solutions alike. If the above terms don't work for your situation, reach out
162
+ and we can discuss alternative licensing.
163
+
164
+ Contributions are welcome. Additions or corrections to the dataset are
165
+ appreciated but not required.