Realcat commited on
Commit
ace2466
·
verified ·
1 Parent(s): 7f15268

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +193 -0
README.md ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: mixed-wikimedia-commons
4
+ license_link: https://commons.wikimedia.org/wiki/Commons:Licensing
5
+ pretty_name: HardMatch
6
+ tags:
7
+ - image-matching
8
+ - local-features
9
+ - correspondences
10
+ - benchmark
11
+ - wikimedia-commons
12
+ size_categories:
13
+ - 1K<n<10K
14
+ ---
15
+
16
+ # HardMatch (unofficial mirror)
17
+
18
+ > **This repository is an unofficial mirror.** It redistributes the HardMatch benchmark
19
+ > exactly as published by its authors (David Nordström, Johan Edstedt, and co-authors).
20
+ > It is **not** affiliated with, endorsed by, or maintained by the HardMatch/LoMa authors.
21
+ > The authoritative source is the official GitHub repository:
22
+ > <https://github.com/davnords/HardMatch>. If you are an author or a rights holder and
23
+ > would like content changed or removed, please open a discussion on this repository or
24
+ > an issue on the official GitHub repository, and it will be handled promptly.
25
+
26
+ ## Dataset summary
27
+
28
+ HardMatch is an extremely difficult image matching benchmark with **1,000 hand-annotated
29
+ image pairs**, organized into **100 object/scene categories** and tagged with 15
30
+ scene-attribute labels. It was released as part of the
31
+ [LoMa](https://arxiv.org/abs/2604.04931) paper (ECCV 2026, Oral).
32
+
33
+ | | |
34
+ |---|---|
35
+ | Image pairs | 1,000 |
36
+ | Categories | 100 (10 pairs each) |
37
+ | Scene-attribute labels | `aerial`, `building`, `celestial`, `doppelgänger`, `drawing`, `dynamic`, `illumination`, `indoor`, `nature`, `object`, `outdoor`, `season`, `texture`, `time`, `viewpoint` |
38
+ | Images | 2,000 JPEGs, longer side 1024 px |
39
+ | Size | ~685 MB |
40
+ | Sources | Images scraped from [Wikimedia Commons](https://commons.wikimedia.org/) |
41
+ | Image licenses | Mixed permissive Commons licenses — see each pair's `metadata.json` |
42
+ | Annotation license | Released by the HardMatch/LoMa authors; code is MIT |
43
+
44
+ ## Repository layout
45
+
46
+ Each pair is stored in its own directory:
47
+
48
+ ```
49
+ <category>/<object>/pair_XXXXX/
50
+ ├── A_lr.jpg # low-resolution image A (longer side 1024 px)
51
+ ├── B_lr.jpg # low-resolution image B
52
+ ├── A_metadata.json # Wikimedia Commons metadata for A (author, license, URL, ...)
53
+ ├── B_metadata.json # Wikimedia Commons metadata for B
54
+ ├── categories.txt # scene-attribute labels, one per line
55
+ ├── corresp.txt # ground-truth correspondences in ORIGINAL image coordinates
56
+ └── corresp_lr.txt # ground-truth correspondences in the distributed (1024 px) images
57
+ ```
58
+
59
+ `corresp*.txt` contains one correspondence per line with four space-separated floats:
60
+ `x_A y_A x_B y_B` (pixel coordinates, 0-indexed top-left origin). Use
61
+ `corresp_lr.txt` together with `A_lr.jpg` / `B_lr.jpg`; `corresp.txt` is provided for
62
+ reference only because the full-resolution originals are not redistributed.
63
+
64
+ <details>
65
+ <summary>All 100 categories</summary>
66
+
67
+ `airplane`, `amphitheater`, `amphora`, `anchor`, `aquatic`, `aqueduct`, `atrium`,
68
+ `bell_tower`, `bridge`, `cannon`, `canyon`, `cargo_ship`, `cassiopeia`, `castle`,
69
+ `cathedral`, `cave`, `cave_interior`, `chapel`, `château`, `chimney`, `church`,
70
+ `citadel`, `city_gate`, `clock_tower`, `corridor`, `crane`, `dam`, `doll`, `drone`,
71
+ `earth`, `famous_animals`, `fjord`, `football`, `fortress`, `fountain`, `garden`,
72
+ `geyser`, `glacier`, `gymnastics`, `harbor`, `hot_spring`, `island`,
73
+ `isolated_monastery`, `library_interior`, `lighthouse`, `marina`, `mausoleum`, `moon`,
74
+ `moons_of_jupiter`, `mosque`, `obelisk`, `oil_refinery`, `old_town`, `opera_houses`,
75
+ `orchard`, `orion`, `pagoda`, `palace`, `park`, `pedestrian_street`, `pier`,
76
+ `planetarium`, `power_lines`, `power_plant`, `pyramid`, `railway_station`,
77
+ `relief_sculpture`, `ruins`, `rune_stones`, `sailboat`, `sarcophagus`, `satellite_dish`,
78
+ `sculpture`, `sea_cliff`, `skyscraper`, `stairwell`, `statue`, `summit`,
79
+ `suspension_bridge`, `synagogue`, `tank`, `telephone_booth`, `temple`, `tennis`, `tower`,
80
+ `town_square`, `trees`, `triumphal_arch`, `tunnel`, `ursa_major`, `vase`, `volcano`,
81
+ `water_tower`, `water_well`, `waterfall`, `waterfront`, `weapon`, `wind_farm`,
82
+ `windmill`, `zeppelin`
83
+
84
+ </details>
85
+
86
+ ## How to download and use
87
+
88
+ Download the full dataset:
89
+
90
+ ```python
91
+ from huggingface_hub import snapshot_download
92
+
93
+ root = snapshot_download(repo_id="Realcat/hardmatch", repo_type="dataset")
94
+ # root/airplane/.../pair_00010/A_lr.jpg, etc.
95
+ ```
96
+
97
+ Use it with the official benchmark code:
98
+
99
+ ```bash
100
+ pip install hardmatch
101
+ ```
102
+
103
+ ```python
104
+ from hardmatch.dataset import HardMatch
105
+
106
+ dataset = HardMatch(HardMatch.Cfg(data_root=root, download=False))
107
+ ```
108
+
109
+ This repository uses the original directory layout, so it is a drop-in replacement for
110
+ the zip file downloaded automatically by `hardmatch` (the only difference is that the
111
+ data is already extracted). It is intentionally **not** converted to Parquet: the
112
+ ground-truth correspondences are per-pair free-form text files, and preserving the
113
+ original file paths keeps existing tooling compatible.
114
+
115
+ To use only some pairs, pass `allow_patterns` / `ignore_patterns` to
116
+ `snapshot_download`, e.g. `allow_patterns=["cathedral/**"]` (categories are top-level
117
+ directories).
118
+
119
+ ## Licensing, attribution, and compliance
120
+
121
+ **You are responsible for complying with the license of each image you use or
122
+ redistribute.** The images were scraped from Wikimedia Commons and retain their original
123
+ licenses; this mirror grants no additional rights.
124
+
125
+ Every pair ships its own license information. Check the `metadata.json` files before
126
+ using or redistributing an image:
127
+
128
+ ```python
129
+ import json
130
+
131
+ meta = json.load(open(f"{pair_dir}/A_metadata.json"))
132
+ print(meta["license"], meta["license_url"])
133
+ print(meta["author"], meta["original_url"])
134
+ print(meta["attribution_required"])
135
+ ```
136
+
137
+ Relevant fields: `license`, `license_url`, `author`, `attribution_required`,
138
+ `original_url`, `file_title`, and the full `extmetadata_raw` block returned by the
139
+ Commons API. Across the 2,000 images:
140
+
141
+ - Roughly **84% (1,672)** have `attribution_required == "true"`.
142
+ - The most common licenses are CC BY-SA 4.0 (755), CC BY-SA 3.0 (291), Public domain
143
+ (201), CC BY-SA 2.0 (181), CC BY 2.0 (158), CC0 (111), CC BY 4.0 (105), and CC BY 3.0
144
+ (98), plus ~25 other Commons licenses.
145
+ - 6 images have no `attribution_required` value and 1 has no `license` field; inspect
146
+ their `metadata.json` / `original_url` and treat them as requiring attribution unless
147
+ the source page says otherwise.
148
+
149
+ If you redistribute or publish results based on these images:
150
+
151
+ 1. **Attribution-required licenses (CC BY, CC BY-SA, and similar):** credit the author,
152
+ name the license, link to the license, and indicate if changes were made.
153
+ `author` may contain HTML from Commons; strip the tags for a plain-text credit.
154
+ 2. **Share-alike licenses (CC BY-SA):** derivative works and redistributed datasets
155
+ containing these images must be released under the same license.
156
+ 3. **Public domain / CC0 / "No restrictions":** no conditions, but crediting the source
157
+ is good practice.
158
+ 4. **Do not remove or alter the `A_metadata.json` / `B_metadata.json` files** when
159
+ redistributing the data; they carry the attribution information.
160
+ 5. **Cite the paper** (below) when using the benchmark — this is a scientific
161
+ attribution requirement, independent of the image licenses.
162
+
163
+ ## Known issues in this snapshot
164
+
165
+ The files are uploaded without modification. This snapshot contains two anomalies:
166
+
167
+ - `bell_tower/Zvonnitsa_in_Prokhorovka_Battlefield/pair_0001/` contains metadata and
168
+ correspondences but no images or `corresp_lr.txt` (likely removed upstream for
169
+ licensing reasons). The official loader skips it, yielding 999 loadable pairs.
170
+ - `tower/Q118464737/pair_00692/` is missing `categories.txt`; all other files are
171
+ present.
172
+ - The official archive also contains two empty category directories, `gargoyle/` and
173
+ `wild_animals/`, which are not tracked by Git and therefore do not appear here.
174
+
175
+ ## Citation
176
+
177
+ ```bibtex
178
+ @inproceedings{nordstrom2026loma,
179
+ title={LoMa: Local Feature Matching Revisited},
180
+ author={David Nordström and Johan Edstedt and Georg Bökman and Jonathan Astermark and Anders Heyden and Viktor Larsson and Mårten Wadenbäck and Michael Felsberg and Fredrik Kahl},
181
+ booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
182
+ year={2026}
183
+ }
184
+ ```
185
+
186
+ ## Links
187
+
188
+ - Official code: <https://github.com/davnords/HardMatch>
189
+ - Paper: <https://arxiv.org/abs/2604.04931>
190
+ - Project page: <https://www.davnords.com/loma>
191
+ - Dataset viewer: <https://www.davnords.com/loma/hardmatch>
192
+ - Official download: <https://github.com/davnords/storage/releases/download/hardmatch/hardmatch.zip>
193
+ - PyPI package: <https://pypi.org/project/hardmatch/>