NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diffusion Model for Dense Matching

Jisu Nam, Gyuseong Lee, Sunwoo Kim, Hyeonsu Kim, Hyoungwon Cho, Seyeon Kim, Seungryong Kim

Establishing pixel-wise correspondences between two images—known as dense matching—is a cornerstone of computer vision, powering everything from 3D reconstruction (SfM) to autonomous navigation (SLAM). While deep learning has pushed the boundaries of this field, current models often stumble when faced with "ambiguous" regions: think of a blank white wall, a repetitive brick pattern, or extreme lighting changes.

Researchers recently introduced DiffMatch, a framework that successfully applies conditional diffusion models to this problem. By treating dense matching as a generative task, DiffMatch learns not just how to compare features, but what a "valid" matching field should actually look like.

TL;DR

DiffMatch is a novel conditional diffusion-based framework that explicitly models both the matching evidence (data term) and the underlying geometric constraints (prior term) for dense correspondence. By leveraging a cascaded generative pipeline, it significantly outperforms state-of-the-art discriminative methods, particularly in challenging scenarios involving textureless regions, repetitive patterns, and heavy image noise.

What Problem Does This Paper Address?

In probabilistic terms, dense matching involves two components: a data term (how well do these two pixels' features match?) and a prior term (does this overall movement of pixels make physical sense?).

Examples of challenging image pairs with repetitive patterns and ambiguous regions.

Traditional methods relied on hand-crafted priors, like assuming the motion should be smooth. Modern deep learning approaches shifted toward "discriminative" models that focus almost entirely on the data term, assuming the network will implicitly learn the prior from massive datasets. However, these models often fail in ambiguous areas because they lack an explicit "understanding" of the matching field manifold. When the data term is noisy or weak (e.g., in fog or on a blank wall), discriminative models produce erratic results.

Methods

The authors propose DiffMatch, which uses a Conditional Denoising Diffusion Probabilistic Model (DDPM) to generate the correspondence field.

1. Explicit Modeling of the Prior

Unlike previous models that just regress a flow field, DiffMatch views matching as a generative process. It starts with pure Gaussian noise and iteratively refines it into a coherent matching field. This allows the model to learn the "prior" distribution of valid correspondences—essentially learning the "grammar" of how pixels move between views.

2. Conditioning for Precision

To ensure the generated field actually matches the input images, the authors inject two key conditions into the U-Net at each denoising step:

  • Initial Correspondence ($F_{init}$): A coarse global estimate that helps the model find long-range matches.
  • Local Matching Cost ($C^l$): A cost volume that provides fine-grained, pixel-wise evidence of feature similarity.

3. Cascaded Pipeline

Diffusion models are computationally expensive at high resolutions. To solve this, DiffMatch uses a cascaded pipeline: a low-resolution model generates a base matching field, which is then refined by a super-resolution diffusion model to add fine-grained details.

Datasets

The model was trained on a combination of synthetic and real-world data, including DPED-CityScape-ADE and COCO. For evaluation, the authors used:

  • HPatches: Standard benchmark for geometric transformations.
  • ETH3D: Real-world indoor and outdoor scenes.
  • ImageNet-C: A "corrupted" version of the above datasets (adding noise, blur, weather effects) to test robustness.
  • MegaDepth: To test generalizability to extreme viewpoint changes.

Key Insights and Ideas

  • Generative > Discriminative for Ambiguity: By learning the manifold of matching fields, DiffMatch can "fill in the blanks" in textureless regions where discriminative models see only noise.
  • Uncertainty as a Feature: Because it's a stochastic generative model, you can run the inference multiple times. The variance between these runs naturally provides an uncertainty map, highlighting exactly where the model is less confident (e.g., occlusions or shadows).
  • Robustness to Corruption: The explicit prior acts as a regularizer. Even if an image is heavily blurred or noisy, the model "knows" what a plausible matching field looks like, preventing the erratic "spiky" errors common in other SOTA methods.

Key Results

DiffMatch sets new state-of-the-art records across several benchmarks.

  • HPatches & ETH3D: It consistently achieves lower Average End-Point Error (AEPE) than previous leaders like PDCNet+.
  • Robustness: On the corrupted ImageNet-C benchmarks, DiffMatch showed a massive performance gap over competitors. For example, on ETH3D with "severity 5" corruptions, it achieved an AEPE of 26.45, while the next best model (PDCNet+) trailed at 27.11.
  • Qualitative Superiority: DiffMatch produces much cleaner warps in areas with repetitive patterns or large displacements compared to baselines like GLU-Net or GOCor.
Baseline warp results (e.g., GOCor) often struggle with these ambiguous regions, a problem DiffMatch mitigates.

Limitations and Future Work

The authors note that while DiffMatch excels in challenging scenarios, it shows slightly lower performance on ETH3D during intervals with very small displacements. They attribute this to the input resolution limits of the current diffusion architecture.

Future directions include:

  • Integrating more advanced feature extractors (the current version uses a frozen VGG-16).
  • Increasing the resolution of the diffusion process.
  • Exploring faster inference techniques to reduce the computational overhead of the iterative denoising steps.

Summary updated

BibTeX
@inproceedings{nam2024diffusion,
  author = {Jisu Nam and Gyuseong Lee and Sunwoo Kim and Hyeonsu Kim and Hyoungwon Cho and Seyeon Kim and Seungryong Kim},
  title = {{Diffusion Model for Dense Matching}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=Zsfiqpft6K},
}
Figure