Skip to content

LuoXubo/FastMatch

Repository files navigation

FastMatch

How fast can image matching be?

Table of Contents

1. Introduction

This repository aims to combine the fastest feature extraction and matching methods, i.e. XFeat and LightGlue, and evaluate their performance on laptop and service devices.

2. Installation

2.1. Clone the repository

git clone https://github.com/LuoXubo/FastMatch.git

2.2. Install dependencies

conda create -n fastmatch python=3.8 -y
conda activate fastmatch
pip install -r requirements.txt

3. Usage

See demo.ipynb for a quick start.

4. Results

4.1 Time Comparison

  • Test device: Ubuntu 20.04, RTX 3090 Ti
  • Test image size: 800x600
Method Feature Extraction Matching Total Time
SP + LG 0.060s 0.020s 0.0800s
Efficient LoFTR - - 0.0630s
XFeat + mnn (sparse) 0.016s 0.0007s 0.0167s
XFeat + mnn (semi-dense) 0.170s 0.007s 0.1770s
XFeat + LightGlue 0.024s 0.0202s 0.0442s

Notice: These methods are tested in a jupyter notebook, so the actual runing speed may be faster than the results.

4.2 Video Matching

  • Test device: Ubuntu 20.04, RTX 3090 Ti
  • Test video size: 1280x720, 30fps, shot by iPhone 13
  • Test video length: 12s

XFeat + mnn

video

SuperPoint + LightGlue

video

Efficient LoFTR

video

XFeat + LighterGlue video

Usage:

python video_matching.py --ref=assets/groot/groot.jpg --tgt=assets/groot/groot.mp4 --method=sp+lg --save_path=assets/groot/groot_sp+lg.mp4

5. Thanks To

6. License

This project is licensed under the MIT License - see the LICENSE.md file for details.