When Lines Meet Textures: Spatial-Frequency Aligned Diffusion Features for Cross-Sparsity Correspondence

Mingrui Zhu, Fengzhi Wang, Xin Wei, Jun Wang, Nannan Wang, Xinbo GaoCVPR 2026

TL;DR

Matching abstract line drawings to texture-rich photographs is a notoriously difficult computer vision task because deep features are heavily biased toward visual appearance. This paper introduces SFA-DIFT, a novel framework that achieves dual-domain (spatial and frequency) alignment using parameter-efficient fine-tuning and wavelet-based feature aggregation. SFA-DIFT sets a new state-of-the-art for cross-sparsity correspondence and introduces a challenging multi-style benchmark dataset to validate texture robustness.

What Problem Does This Paper Address?

Establishing semantic correspondence—finding matching keypoints between two different images—is foundational for tasks like image retrieval, editing, and creative design. While humans can effortlessly match a sparse, abstract sketch of an object to a highly detailed photograph, computer vision algorithms struggle deeply with this "visual sparsity gap."

The authors identify two core disparities that cause standard deep features (even powerful ones from foundation models like Stable Diffusion) to fail:

  1. Spatial Domain Misalignment: Sketches are abstract; their lines omit surface details and often shift away from the true geometric boundaries of the object.
  2. Frequency Domain Inconsistencies: Photographs distribute energy across a broad spectrum of frequencies (macro shapes, surface patterns, fine details). Sketches, conversely, exhibit massive "mid-frequency voids," showing only low-frequency structural plateaus and sharp high-frequency spikes from clean edges.

When standard diffusion models process a sketch, they search for non-existent textures, leading to "feature voids," noisy artifacts, and a total collapse of spatial correspondence.

Methods

To bridge both the spatial and frequency gaps, the authors propose SFA-DIFT (Spatial-Frequency Aligned Diffusion Features), which operates in two main stages:

SFA-DIFT Framework Pipeline
  1. Unified Clean Diffusion Feature Learning (Spatial Alignment): The framework builds upon CleanDIFT, a method that extracts diffusion features directly from clean images without adding forward noise. To make these features robust to sketches, the authors apply Low-Rank Adaptation (LoRA) to fine-tune the pre-trained model on sketch data. Using an unsupervised teacher-student framework, this step forces both modalities into a shared semantic subspace while suppressing modality-specific noise.

  2. Low-Frequency Feature Aggregation (LoFFA) (Frequency Alignment): To resolve the frequency mismatch, the LoFFA module ingests multi-scale features and decomposes them using a hierarchical two-level Discrete Wavelet Transform (DWT). It isolates the lowest-frequency components (the LL sub-band) and applies a sigmoid-gated modulation mechanism called Low-Frequency Enhancement (LoFE). This process, combined with Adaptive Instance Normalization (AdaIN), forces the model to ignore distracting high-frequency texture variations and focus entirely on shared structural topologies.

The entire pipeline is trained using a dual objective: a CLIP-style symmetric contrastive loss on keypoint features and a soft-argmax dense matching loss.

Datasets

The authors evaluate their approach using three primary datasets:

  • PSC6K: An existing benchmark providing 1,250 photos across 125 categories, each paired with five sketches and manually annotated keypoints.
  • MS-PSC6K (New): To rigorously test robustness against texture variations, the authors extended PSC6K by generating five distinct artistic style variations (Abstract, Baroque, Realism, Post-Impressionism, and Neo-Impressionism) for each photo, resulting in a new dataset of 7,500 texture-rich images.
  • Sketchy: A large-scale dataset containing 62,500 sketches, utilized specifically for the unsupervised LoRA fine-tuning phase.

Key Insights and Ideas

  • Clustering by Semantics, Not Modality: Standard Stable Diffusion features naturally cluster images by their visual style (grouping sketches with sketches, and photos with photos). SFA-DIFT successfully flips this behavior, clustering representations by their semantic class regardless of whether the input is a line drawing or a heavily stylized painting (see Figure 1(b)).
  • The Power of the LL Sub-band: By explicitly isolating the lowest-frequency components via wavelets, the model effectively uncovers the shared "geometric skeleton" hidden beneath dense photometric details.
  • Denoising Trade-offs: While denoising mechanisms (like CleanDIFT) smooth out feature maps and infer missing structures, they can over-smooth and attenuate semantic expressiveness. SFA-DIFT's dual-domain approach counteracts this by sharpening spatial boundaries while preserving low-to-mid frequency consistency.

Key Results

SFA-DIFT achieves a substantial breakthrough over previous zero-shot and supervised methods on the Percentage of Correct Keypoints (PCK) metric:

  • PSC6K Benchmark: SFA-DIFT achieves 9.81% PCK@1, 72.94% PCK@5, and 92.70% PCK@10, outperforming the previous best supervised method (SketchFusion) by notable margins (+0.37%, +2.63%, and +1.71% respectively).
  • MS-PSC6K (Multi-Style) Benchmark: Across all five challenging artistic styles, SFA-DIFT maintains high performance, averaging 8.70% PCK@1, 69.21% PCK@5, and 91.02% PCK@10.
Qualitative Cross-Sparsity Correspondence Comparison

The authors also introduced a Robustness Ratio (RR) metric to evaluate performance stability under texture perturbations. SFA-DIFT maintains a stable RR near 1.0, demonstrating genuine invariance to extreme stylistic shifts where baseline models overfit and degrade.

Limitations and Future Work

The primary limitation of SFA-DIFT is its inference efficiency. Because the framework relies on heavy diffusion feature extraction, it requires an average processing time of 0.8 seconds per correspondence estimation. This computational footprint makes it challenging to deploy in real-time applications.

For future work, the authors plan to explore more computationally efficient yet semantically effective diffusion feature representations to accelerate the pipeline.

Summary updated

BibTeX
@inproceedings{zhu2026when,
  author = {Mingrui Zhu and Fengzhi Wang and Xin Wei and Jun Wang and Nannan Wang and Xinbo Gao},
  title = {{When Lines Meet Textures: Spatial-Frequency Aligned Diffusion Features for Cross-Sparsity Correspondence}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=yDnj1bzgL3},
}
Figure