README.md

August 6, 2026 · View on GitHub

HardMatch: Difficult Image Matching

arXiv Project Page

Chalmers University of Technology; Linköping University; University of Amsterdam; Lund University

David Nordström*, Johan Edstedt*, Georg Bökman, Jonathan Astermark, Anders Heyden, Viktor Larsson, Mårten Wadenbäck, Michael Felsberg, Fredrik Kahl

example
Categorization of the 1,000 HardMatch pairs.

Overview

HardMatch is an extremely difficult image matching benchmark featuring 1,000 hand annotated image pairs. The benchmark is released as part of the LoMa paper (ECCV 2026, Oral).

Updates

  • [August 5, 2026] PyPi package released and code made more accesible.
  • [June 27, 2026] Initial dataset release following ECCV 2026 acceptance.

Setup/Install

In your python environment (tested on Linux python 3.12):

uv add hardmatch

or

pip install hardmatch

How to Use

from hardmatch import HardMatchBenchmark
matcher = YourFancyMatcher()
result = HardMatchBenchmark().benchmark(matcher)

matcher needs to satisfy the BenchmarkMatcher protocol (hardmatch.types.BenchmarkMatcher):

class YourFancyMatcher:
    offset = 0.0  # pixel offset subtracted from returned keypoints before scoring

    def match(self, img_A_path: str, img_B_path: str) -> tuple[np.ndarray, np.ndarray]:
        """Return (kpts_A, kpts_B): corresponding (N, 2) keypoints in pixel
        coordinates of the original image files, one row per match."""
        ...
        return kpts_A, kpts_B

We additionally provide two example matchers through demo.py: SuperPoint + LightGlue (SPLG), and LoMa (LoMa). This defaults to evaluating on the 900 test pairs. There are also 100 validation pairs. To try the demo, first clone the repo, and then run:

uv sync --extra baselines
uv run demo.py --matcher loma
# Expected result: mAA_10px: 0.5061

Note, the results differs a tiny bit from the results in the paper. This is because after submission we had to change the dataset a tiny bit (around 10 pairs) for licensing issues.

Visualizing the Data

In our online viewer you can see all of the 1,000 pairs and filter by categories / groups. Highly recommended to get a sense for what type of pairs we have collected and annotated.

Download

Running the benchmark will automatically download the data (660MB). You can also manually download it here.

License

All our code is MIT license. The pairs are scraped from WikiMedia Commons. As such, each pair has its own license that you can find in the data. They are generally permissive.

Acknowledgement

Our evaluation technique builds on WxBS.

BibTeX

If you find our dataset useful, please consider citing our paper!

@inproceedings{nordstrom2026loma,
      title={LoMa: Local Feature Matching Revisited}, 
      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},
      booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
      year={2026}
}