Skip to main content

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). The best way to visualize the data is through our online viewer.

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.

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}
}

Metadata

Release files for hardmatch 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hardmatch 1.0.0
File Size Uploaded
hardmatch-1.0.0.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hardmatch 1.0.0
File Interpreter ABI Platform
hardmatch-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.5 kB

Release files / hardmatch-1.0.0.tar.gz

Download URL hardmatch-1.0.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
07712f537e23c262f219a246389c4111a46159f5bf674575cbeb79361676230b
BLAKE2b-256 checksum
How to use checksums
2532cfac4f190ab5e1d430f0a65bc4b24024fb4b2c42e8910b16473d88e649b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hardmatch-1.0.0-py3-none-any.whl

Download URL hardmatch-1.0.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92029d7452030848231659965bd34c65a737378f24bba45a4f57e0f8950f0013
BLAKE2b-256 checksum
How to use checksums
550baf25af2161991600854bba1c242cef187d94ce3603bd28729fb4788523fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page