[Paper Review] OpenGlue: Open Source Graph Neural Net Based Pipeline for Image Matching
OpenGlue is an open-source, PyTorch-based framework for image matching that enhances SuperGlue using graph neural networks with improved keypoint geometry encoding, non-maximum suppression, and efficient attention mechanisms. It achieves superior performance on SIFT features—boosting matching scores by up to 18%—while reducing inference time and memory usage by 4× compared to SuperGlue with SuperPoint.
We present OpenGlue: a free open-source framework for image matching, that uses a Graph Neural Network-based matcher inspired by SuperGlue \cite{sarlin20superglue}. We show that including additional geometrical information, such as local feature scale, orientation, and affine geometry, when available (e.g. for SIFT features), significantly improves the performance of the OpenGlue matcher. We study the influence of the various attention mechanisms on accuracy and speed. We also present a simple architectural improvement by combining local descriptors with context-aware descriptors. The code and pretrained OpenGlue models for the different local features are publicly available.
Motivation & Objective
- To develop an open-source, modular framework for image matching that supports flexible integration of local feature extractors and customizable pipeline components.
- To improve matching accuracy for non-learnable and partially learnable local features (e.g., SIFT) by incorporating geometric keypoint attributes such as scale and orientation.
- To evaluate the impact of non-maximum suppression (NMS) on keypoint filtering during training and inference for better matching performance.
- To benchmark and optimize efficient attention mechanisms (linear, FAVOR+) for faster inference and reduced memory usage without significant accuracy loss.
- To enhance matching performance by combining local descriptors with context-aware descriptors through residual connections.
Proposed method
- The framework implements a four-stage pipeline: local feature detection and description, NMS-based keypoint filtering, geometric and positional encoding of keypoints (including scale, orientation, and affine shape), and graph neural network (GNN)-based matching via attention mechanisms.
- Geometric information (scale, rotation, affine shape) is encoded into the positional embeddings of the GNN to improve feature matching, especially for SIFT and DoG-AffNet-HardNet features.
- Non-maximum suppression (NMS) is applied both at training and inference to suppress redundant keypoints, improving matching precision and downstream task performance.
- The GNN employs an attention-based message passing mechanism; the paper evaluates softmax, linear, and FAVOR+ attention variants for efficiency and accuracy trade-offs.
- A residual connection is introduced between the local descriptor and the context-aware GNN output to preserve local information and improve matching robustness.
- The framework is built on PyTorch Lightning and Kornia, enabling modular design, extensibility, and support for multiple feature extractors (SIFT, DoG-AffNet-HardNet, SuperPoint).
Experimental results
Research questions
- RQ1How does incorporating geometric keypoint attributes (scale, orientation, affine shape) into positional encoding affect matching accuracy in a GNN-based matcher?
- RQ2What is the impact of applying non-maximum suppression (NMS) on keypoint filtering during training and inference for image matching performance?
- RQ3How do efficient attention mechanisms (linear, FAVOR+) compare to standard softmax attention in terms of accuracy, inference speed, and memory consumption?
- RQ4To what extent does combining local descriptors with context-aware GNN outputs improve matching performance?
- RQ5Can OpenGlue achieve state-of-the-art performance with non-learnable local features like SIFT while maintaining low inference cost?
Key findings
- Including keypoint orientation in positional encoding increased the matching score (MS) from 0.1819 (no geometry) to 0.2089, a 14.8% relative improvement on the MegaDepth validation set with SIFT features.
- Adding both scale and orientation to positional encoding further improved MS to 0.2154, a 18.8% relative gain over the baseline, demonstrating the value of multi-geometric encoding.
- Applying NMS at both training and inference stages improved the matching score by 1.5–2.5% across benchmarks, with the highest gains observed on SIFT and DoG-AffNet-HardNet features.
- Using linear or FAVOR+ attention mechanisms reduced memory usage to 66.12% and 70.98% of the softmax baseline, respectively, while maintaining 75% of the matching score, enabling faster training with larger batch sizes.
- The residual connection between local and context-aware descriptors increased the matching score by 2.16% (from 0.1896 to 0.2112), with faster convergence during training.
- OpenGlue with SIFT features achieved 4× faster inference and 4× lower memory usage than SuperGlue with SuperPoint, while improving matching accuracy by 18% on SIFT-based benchmarks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.