Learning Semantic Correspondence Exploiting an Object-level Prior

Junghyup Lee, Dohyung Kim, Wonkyung Lee, Jean Ponce, Bumsub HamIEEE TPAMI 2019 · DOI · OpenReview

Abstract

We address the problem of semantic correspondence, that is, establishing a dense flow field between images depicting different instances of the same object or scene category. We propose to use images annotated with binary foreground masks and subjected to synthetic geometric deformations to train a convolutional neural network (CNN) for this task. Using these masks as part of the supervisory signal provides an object-level prior for the semantic correspondence task and offers a good compromise between semantic flow methods, where the amount of training data is limited by the cost of manually selecting point correspondences, and semantic alignment ones, where the regression of a single global geometric transformation between images may be sensitive to image-specific details such as background clutter. We propose a new CNN architecture, dubbed SFNet, which implements this idea. It leverages a new and differentiable version of the argmax function for end-to-end training, with a loss that combines mask and flow consistency with smoothness terms. Experimental results demonstrate the effectiveness of our approach, which significantly outperforms the state of the art on standard benchmarks.

Introduction

Establishing dense correspondences between images is a fundamental challenge in computer vision, essential for tasks like object recognition and image editing. While optical flow handles matching the same object across video frames, semantic correspondence is significantly more complex: it requires matching different instances of a category, such as two different breeds of dogs in entirely different environments.

Existing methods generally fall into two categories:

  1. Semantic Flow: These attempt pixel-level matching but require massive amounts of manually annotated point-to-point correspondences, which are expensive and subjective to create.
  2. Semantic Alignment: These regress a global geometric transformation (like an affine warp). While they require less supervision, they are easily distracted by background clutter and struggle with non-rigid deformations.

SFNet (Semantic Flow Network) offers a "best of both worlds" approach: a method that produces dense, non-parametric flow using easier-to-obtain binary foreground masks as an object-level prior to guide the learning process.

Training pairs are generated using binary masks and synthetic geometric deformations to provide an object-level prior.

Methodology

The SFNet architecture is a Siamese network that extracts features using a ResNet-101 backbone followed by specialized adaptation layers.

Kernel Soft Argmax

Standard "soft argmax" functions are differentiable but often fail when an image has multiple similar-looking parts (multi-modal distributions), averaging coordinates and landing in incorrect locations. SFNet introduces a Kernel Soft Argmax: it places a Gaussian kernel over the highest discrete match to "window" the soft argmax. This keeps the operation differentiable for training while ensuring the model ignores distant, ambiguous matches.

Mask-Based Loss Functions

Since the model lacks pixel-level ground truth, it utilizes three proxy losses:

  • Mask Consistency: Penalizes the model if warping the target mask to the source (using the estimated flow) does not match the source mask.
  • Flow Consistency: Ensures that the forward flow (source to target) and backward flow (target to source) are consistent, encouraging one-to-one mappings.
  • Smoothness: A standard regularizer that ensures the flow field does not have erratic, noisy jumps within the object boundaries.

Experiments and Results

The model was trained primarily on the PASCAL VOC 2012 segmentation dataset using synthetic warping to create training pairs. It was evaluated on several major benchmarks including PF-WILLOW, PF-PASCAL, and SPair-71k.

SFNet produces dense, object-aware semantic flow between different instances of the same category, such as these two bicycles.

SFNet established a new state-of-the-art (SOTA) across almost all tested benchmarks:

  • Accuracy: On PF-PASCAL, it achieved a PCK (Percentage of Correct Keypoints) of 81.9%, significantly outperforming the previous SOTA of 75.9%.
  • Speed: SFNet is highly efficient, processing an image pair in just 24.9 ms on a modern GPU, making it significantly faster than competing flow methods.
  • Generalization: The model outperformed existing methods on mask transfer and keypoint propagation tasks (e.g., on Caltech-101 and JHMDB), proving the "object-level prior" generalizes well to unseen categories.

Conclusion

SFNet demonstrates that binary masks provide a "Goldilocks" level of supervision—easier to annotate than points but more powerful than global labels. By combining this object-level prior with the robust Kernel Soft Argmax, SFNet achieves superior accuracy and efficiency in dense semantic correspondence. While the model currently struggles with extreme viewpoint changes, future work may explore joint learning frameworks where semantic correspondence and object co-segmentation reinforce each other.

Summary updated

Abstract

We address the problem of semantic correspondence, that is, establishing a dense flow field between images depicting different instances of the same object or scene category. We propose to use images annotated with binary foreground masks and subjected to synthetic geometric deformations to train a convolutional neural network (CNN) for this task. Using these masks as part of the supervisory signal provides an object-level prior for the semantic correspondence task and offers a good compromise between semantic flow methods, where the amount of training data is limited by the cost of manually selecting point correspondences, and semantic alignment ones, where the regression of a single global geometric transformation between images may be sensitive to image-specific details such as background clutter. We propose a new CNN architecture, dubbed SFNet, which implements this idea. It leverages a new and differentiable version of the argmax function for end-to-end training, with a loss that combines mask and flow consistency with smoothness terms. Experimental results demonstrate the effectiveness of our approach, which significantly outperforms the state of the art on standard benchmarks.
BibTeX
@article{lee2019learning,
  author = {Junghyup Lee and Dohyung Kim and Wonkyung Lee and Jean Ponce and Bumsub Ham},
  title = {{Learning Semantic Correspondence Exploiting an Object-level Prior}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2019},
  doi = {10.1109/tpami.2020.3013620},
}
Figure