CVPR 2024 TPAMI 2026 Pattern Recognition 2026

Area to Point Matching
Match areas first, then points.

A training-free, plug-and-play framework that makes any point matcher more accurate on high-resolution images and large viewpoint changes — by first finding matched semantic areas, then matching points inside them.

Yesheng Zhang1,  Shuhan Shen2,  Xu Zhao1
1Shanghai Jiao Tong University  ·  2Institute of Automation, Chinese Academy of Sciences
A2PM overview: resizing the whole image loses detail, while area matching crops matched regions so the point matcher sees less distortion and more detail.

Why A2PM? Feeding a resized full image to a point matcher (top) causes aspect-ratio distortion and loses local detail. A2PM first establishes area matches (bottom), runs the point matcher on each cropped pair, and fuses the results — fewer outliers, more precise matches.

TL;DR

One repository, a family of three methods, and a Hydra-configurable pipeline that wraps the matcher you already use.

+11.2

Pose AUC@5 gained on MegaDepth-1500 when DMESA is wrapped around MASt3R (46.34 → 57.58), with no retraining.

Any matcher

Any matcher plugs in through a thin adapter. The repo ships seven, sparse to dense: SP+SG, LoFTR, ASpanFormer, ELoFTR, DKM, DUSt3R, MASt3R.

≈5× faster

DMESA replaces MESA’s graph-cut area matching with dense distributions (GMM + EM), running nearly 5× faster with competitive accuracy.

The A2PM family

All three methods share the same idea: reduce matching redundancy by searching from area to point. They differ in how areas are matched.

Pattern Recognition 2026

SGAM

Semantic & Geometry Area Matching

Introduces the A2PM framework. Matches semantic areas using a semantic prior, then enforces geometric consistency (GAM) to filter and fuse inside-area point matches.

CVPR 2024

MESA

Matching Everything by Segmenting Anything

Uses SAM to build a multi-relational Area Graph and formulates area matching as graph energy minimization solved by graph cut. This repo ships a training-free variant, MESA-free.

TPAMI 2026

DMESA

Dense MESA

The dense counterpart of MESA. Generates dense area-matching distributions from off-the-shelf patch matching, modeled with a GMM and refined by EM. It is about 5× faster and more flexible.

How it works

Each method finds area matches in its own way, then hands every matched pair to a point matcher. Switch between the pipelines below.

Segment

SAM (or SAM2) proposes candidate areas, which are organized into an Area Graph that records inclusion and adjacency relations.

Match areas

SGAM uses a semantic prior. MESA uses graph energy minimization and graph cut. DMESA uses dense distributions with GMM + EM.

Match points & fuse

Any point matcher runs on each area pair at full detail. GAM / EGAM then fuses the results with geometric consistency.

See the difference

Drag the slider to compare the DKM baseline with DKM inside our framework. Green = correct, red = wrong matches.

Baseline matches
Our matches
DKM MESA+DKM
① SAM segmentation
SAM segmentation of both images
② Area matching
Matched areas between both images

ΔR / Δt are rotation and translation errors of the relative pose estimated from the matches (lower is better).

Consistent gains on every matcher

Relative pose estimation AUC (%) produced by the scripts in this repo. Pick a point matcher and a dataset.

Matcher
Dataset

Results come from the provided scripts with a fixed random seed and default parameters, so they can differ slightly from the paper. MESA-free is the training-free variant of MESA. SN1500 = ScanNet-1500, MD1500 = MegaDepth-1500.

Show all numbers as a table

A modular framework

Every component is a Python class paired with a YAML config via Hydra. Mix and match with one line: +experiment=a2pm_dmesa_egam_dkm_megadepth.

Area matcher

SGAMMESA-freeDMESA

Point matcher

SP+SGLoFTRASpanFormerELoFTRDKMDUSt3RMASt3R

Match fusion

GAMEGAM

Data & eval

ScanNet-1500MegaDepth-1500Pose AUCMMAArea Acc.

The point-matcher row is not a closed list. Every integration is a thin adapter (AbstractPointMatcher) plus a YAML in point_matchers/, so any matcher that outputs 2D correspondences can be dropped into the pipeline unchanged — the seven above are simply the ones that ship in this repo.

Quick start

Run area-to-point matching on the bundled ETH3D pair in a few minutes. See the README for full setup, SAM preprocessing and benchmarks.

1 · Install

git clone --recursive https://github.com/Easonyesheng/A2PM-MESA
cd A2PM-MESA
conda create -n A2PM python=3.8 -y && conda activate A2PM
pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 \
  --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt

2 · Run the demo

cd scripts
# DMESA + SuperPoint/SuperGlue on the bundled ETH3D pair
python demo.py +experiment=demo out_path=/tmp/a2pm_demo

# other ready-made pipelines: conf/experiment/demo_*.yaml
python demo.py +experiment=demo_eloftr

# DMESA with MASt3R (needs the MASt3R env)
python demo.py +experiment=demo_dmesa_mast3r

Video & continuous matching

A talk on MESA (Bilibili, in Chinese), and SGAM running on a continuous sequence.

Play on this page
Loads the Bilibili player
Top to bottom: SGAM, SGAM + ASpanFormer, ASpanFormer.

News

 

Citation

If you find this work useful, please consider citing: