Skip to content

Vincentqyw/image-matching-webui

Repository files navigation

Contributors Forks Stargazers Issues


Image Matching WebUI
Matching Keypoints between two images

PyPI Release PyPI - Version Docker Image Version PyPI Downloads

Description

Image Matching WebUI (IMCUI) efficiently matches image pairs using multiple famous image matching algorithms. The tool features a Graphical User Interface (GUI) designed using gradio. You can effortlessly select two images and a matching algorithm and obtain a precise matching result. Note: the images source can be either local images or webcam images.

Try it on Open In Studio

Here is a demo of the tool:

imw.mp4

The tool currently supports various popular image matching algorithms, namely:

Algorithm Supported Conference/Journal Year GitHub Link
MINIMA βœ… ARXIV 2024 Link
XoFTR βœ… CVPR 2024 Link
EfficientLoFTR βœ… CVPR 2024 Link
MASt3R βœ… CVPR 2024 Link
DUSt3R βœ… CVPR 2024 Link
OmniGlue βœ… CVPR 2024 Link
XFeat βœ… CVPR 2024 Link
RoMa βœ… CVPR 2024 Link
DeDoDe βœ… 3DV 2024 Link
Mickey ❌ CVPR 2024 Link
GIM βœ… ICLR 2024 Link
ALIKED βœ… ICCV 2023 Link
LightGlue βœ… ICCV 2023 Link
DarkFeat βœ… AAAI 2023 Link
SFD2 βœ… CVPR 2023 Link
IMP βœ… CVPR 2023 Link
ASTR ❌ CVPR 2023 Link
SEM ❌ CVPR 2023 Link
DeepLSD ❌ CVPR 2023 Link
GlueStick βœ… ICCV 2023 Link
ConvMatch ❌ AAAI 2023 Link
LoFTR βœ… CVPR 2021 Link
SOLD2 βœ… CVPR 2021 Link
LineTR ❌ RA-L 2021 Link
DKM βœ… CVPR 2023 Link
NCMNet ❌ CVPR 2023 Link
TopicFM βœ… AAAI 2023 Link
AspanFormer βœ… ECCV 2022 Link
LANet βœ… ACCV 2022 Link
LISRD ❌ ECCV 2022 Link
REKD ❌ CVPR 2022 Link
CoTR βœ… ICCV 2021 Link
ALIKE βœ… TMM 2022 Link
RoRD βœ… IROS 2021 Link
SGMNet βœ… ICCV 2021 Link
SuperPoint βœ… CVPRW 2018 Link
SuperGlue βœ… CVPR 2020 Link
D2Net βœ… CVPR 2019 Link
R2D2 βœ… NeurIPS 2019 Link
DISK βœ… NeurIPS 2020 Link
Key.Net ❌ ICCV 2019 Link
OANet ❌ ICCV 2019 Link
SOSNet βœ… CVPR 2019 Link
HardNet βœ… NeurIPS 2017 Link
SIFT βœ… IJCV 2004 Link

How to use

HuggingFace / Lightning AI

Just try it on Open In Studio

or deploy it locally following the instructions below.

Requirements

Install from pip [NEW]

Update: now support install from pip, just run:

pip install imcui

Install from source

git clone --recursive https://github.com/Vincentqyw/image-matching-webui.git
cd image-matching-webui
conda env create -f environment.yaml
conda activate imw
pip install -e .

or using docker:

docker pull vincentqin/image-matching-webui:latest
docker run -it -p 7860:7860 vincentqin/image-matching-webui:latest python app.py --server_name "0.0.0.0" --server_port=7860

Deploy to Railway

Deploy to Railway, setting up a Custom Start Command in Deploy section:

python -m imcui.api.server

Run demo

python app.py --config ./config/config.yaml

then open http://localhost:7860 in your browser.

Add your own feature / matcher

I provide an example to add local feature in imcui/hloc/extractors/example.py. Then add feature settings in confs in file imcui/hloc/extract_features.py. Last step is adding some settings to matcher_zoo in file imcui/ui/config.yaml.

Upload models

IMCUI hosts all models on Huggingface. You can upload your model to Huggingface and add it to the Realcat/imcui_checkpoints repository.

Contributions welcome!

External contributions are very much welcome. Please follow the PEP8 style guidelines using a linter like flake8. This is a non-exhaustive list of features that might be valuable additions:

  • support pip install command
  • add CPU CI
  • add webcam support
  • add line feature matching algorithms
  • example to add a new feature extractor / matcher
  • ransac to filter outliers
  • add rotation images options before matching
  • support export matches to colmap (#issue 6)
  • add config file to set default parameters
  • dynamically load models and reduce GPU overload

Adding local features / matchers as submodules is very easy. For example, to add the GlueStick:

git submodule add https://github.com/cvg/GlueStick.git imcui/third_party/GlueStick

If remote submodule repositories are updated, don't forget to pull submodules with:

git submodule update --init --recursive  # init and download
git submodule update --remote  # update

if you only want to update one submodule, use git submodule update --remote imcui/third_party/GlueStick.

To format code before committing, run:

pre-commit run -a  # Auto-checks and fixes

Contributors

Resources

Acknowledgement

This code is built based on Hierarchical-Localization. We express our gratitude to the authors for their valuable source code.