Scale-Free Image Keypoints Using Differentiable Persistent Homology

Giovanni Barbarani, Francesco Vaccarino, Gabriele Trivigno, Marco Guerra, Gabriele Berton, Carlo Masone

Abstract

Traditional keypoint detection in computer vision often relies on local heuristics, such as finding maxima within fixed-size pixel windows. These methods frequently struggle with scale variations and lack mathematical guarantees regarding the structural significance of detected points. This paper introduces MorseDet, a novel keypoint detector that leverages Morse theory and persistent homology to identify features. By treating image feature maps as continuous topological landscapes, MorseDet employs a differentiable topological loss to learn scale-free, highly repeatable keypoints. Experimental results on the HPatches benchmark demonstrate that MorseDet achieves state-of-the-art performance, particularly in maintaining repeatability across significant image scaling.

Introduction

Keypoint detection is a fundamental task in computer vision, essential for applications ranging from SLAM (Simultaneous Localization and Mapping) to image stitching. While deep learning has significantly advanced the field, most modern "learnable" detectors—such as R2D2 or DISK—still inherit a fundamental limitation from classical methods: they rely on local maxima searches within fixed-size patches (e.g., 7x7 pixels).

This heuristic approach introduces several challenges. First, it creates a rigid scale dependency; a feature that is distinct at one resolution may be subsumed or ignored when the image is resized. Second, it imposes an artificial density constraint, as two keypoints cannot be detected closer than the window size allows. Finally, these methods lack a rigorous mathematical foundation for what constitutes a "salient" point. Presented at ICML 2024, MorseDet addresses these issues by replacing patch-based heuristics with the principles of Algebraic Topology.

Methodology: Topology as a Learning Objective

Morse Theory and Persistent Homology

MorseDet conceptualizes a grayscale image or a CNN-generated feature map as a topographical "height map." In this landscape, keypoints are identified as local maxima (peaks). To distinguish significant features from noise, the authors utilize Persistent Homology (PH).

In PH, the landscape is analyzed by tracking the birth and death of topological features—specifically peaks and the "saddles" that connect them—as a threshold level is varied. The "persistence" of a peak is the difference in height between its appearance and its eventual merger into a higher peak at a saddle point. High persistence indicates a structurally significant feature, while low persistence suggests localized noise.

The MorseDet Pipeline

The MorseDet architecture consists of a standard CNN backbone that outputs a single-channel height map. The training process is governed by two primary components:

  1. Topological Detector Loss: This is a differentiable loss function that allows the network to backpropagate through the persistent homology calculation. It encourages the network to "push" important features higher in the height map, increasing their persistence and making them more distinct.
  2. Boundary Similarity: To ensure repeatability, this term enforces consistency between the topological structures of an image and its transformed (e.g., warped or scaled) counterpart.

By using the subgradient of persistent homology, the framework integrates complex topological computations directly into standard deep learning optimization workflows.

Experimental Evaluation

Datasets and Training

The model was trained on the WASF dataset, which contains image pairs with known homographic relationships. Hyperparameter tuning was conducted using MegaDepth, and the final evaluation was performed on HPatches, the industry standard for measuring keypoint repeatability under varying illumination and viewpoints.

Performance and Scale Robustness

MorseDet demonstrated superior performance against established baselines including SIFT, SuperPoint, and DISK.

  • Repeatability: At a standard count of 1,000 keypoints, MorseDet achieved a repeatability score of 44.6%, outperforming SuperPoint (43.6%) and DISK (39.3%).
  • Scale Invariance: The model's most significant advantage appeared during scaling tests. When images were reduced to 75% of their original area, MorseDet maintained 82.2% repeatability. In contrast, SuperPoint—the next best learnable method—dropped to 73.3%.

Qualitative analysis suggests that MorseDet produces cleaner height maps that capture the underlying geometry of the scene, avoiding the redundant clusters of points often seen in window-based detectors.

Discussion and Future Work

While MorseDet offers a mathematically grounded alternative to heuristic detectors, it faces practical challenges. The calculation of persistent homology is computationally intensive; currently, training is primarily CPU-bound due to a lack of GPU-optimized TDA (Topological Data Analysis) libraries, leading to training times of approximately 10 hours.

Furthermore, MorseDet currently functions strictly as a detector. For practical deployment in matching pipelines, it must be paired with a descriptor. Future research aims to integrate topological descriptors and optimize the underlying software to leverage GPU acceleration.

Conclusion

MorseDet represents a significant step toward bridging the gap between deep learning and algebraic topology. By treating keypoint detection as a global topological problem rather than a local patch-matching exercise, it provides a robust, scale-free framework that outperforms traditional and modern heuristic-based methods.

Summary updated

BibTeX
@inproceedings{barbarani2024scale,
  author = {Giovanni Barbarani and Francesco Vaccarino and Gabriele Trivigno and Marco Guerra and Gabriele Berton and Carlo Masone},
  title = {{Scale-Free Image Keypoints Using Differentiable Persistent Homology}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=fNJbcxhxRj},
}
Figure