Skip to main content

No project description provided

Project description

easy-local-features-baselines

Just some scripts to make things easier for the local features baselines.

WARNING: PLEASE check the license of your desired baseline before using this code.

Installation

# make sure you have torch installed
# pip install torch torchvision
pip install easy-local-features

Installing from source

You may want to install from source if you want to modify the code or if you want to use the latest version. To do so, you can clone this repository and install the requirements.

I suggest using a conda environment to install the requirements. You can create one using the following command.

conda create -n elf python=3.9 # the python version is not so critical, but I used 3.9.
conda activate elf

Now we can install everything.

pip install -r requirements.txt
pip install -e .

How to use

# Choose you extractor
from easy_local_features.feature.baseline_aliked import ALIKED_baseline
# from easy_local_features.feature.baseline_alike import ALIKE_baseline
# from easy_local_features.feature.baseline_deal import DEAL_baseline
# from easy_local_features.feature.baseline_dalf import DALF_baseline
# from easy_local_features.feature.baseline_disk import DISK_baseline
# from easy_local_features.feature.baseline_dedode import DeDoDe_baseline
# from easy_local_features.feature.baseline_d2net import D2Net_baseline
# from easy_local_features.feature.baseline_delf import DELF_baseline
# from easy_local_features.feature.baseline_superpoint import SuperPoint_baseline
# from easy_local_features.feature.baseline_r2d2 import R2D2_baseline
# from easy_local_features.feature.baseline_sosnet import SOSNet_baseline
# from easy_local_features.feature.baseline_tfeat import TFeat_baseline

from easy_local_features.utils import vis, io

# Load an image
image0 = io.fromPath("assets/v_vitro/1.ppm")
image1 = io.fromPath("assets/v_vitro/2.ppm")

# Load the extractor
extractor = ALIKED_baseline({'top_k': 128})

# Macth directly
matches = extractor.match(image0, image1)

# OR

# Extract
# keypoints0, descriptors0 = extractor.detectAndCompute(image0)
# keypoints1, descriptors1 = extractor.detectAndCompute(image1)
# matches = extractor.matcher({
#     'descriptors0': descriptors0,
#     'descriptors1': descriptors1,
#})

# Visualize
vis.plot_pair(image0, image1)
vis.plot_matches(matches['mkpts0'], matches['mkpts1'])
vis.show(f"test/results/{extractor.__name__}.png")

TODO REFACTOR

  • ALIKE
  • ALIKED
  • DEAL
  • DALF
  • DISK
  • DeDoDe
  • D2Net
  • DELF
  • SuperPoint
  • R2D2
  • LogPolar
  • SOSNet
  • TFeat
  • DKM
  • ASLFeat
  • SuperGlue
  • LightGlue
  • LoFTR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_local_features-0.4.21.tar.gz (198.4 kB view details)

Uploaded Source

File details

Details for the file easy_local_features-0.4.21.tar.gz.

File metadata

  • Download URL: easy_local_features-0.4.21.tar.gz
  • Upload date:
  • Size: 198.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for easy_local_features-0.4.21.tar.gz
Algorithm Hash digest
SHA256 c9b5e8b5ee15e982f6d74cd7c7e337260390e9fb867713e4cfd259237b50fac8
MD5 e9b57fc33f04a42501a0efafb7c26ba4
BLAKE2b-256 6b2c5864d2d87788d12727987d4e6dfe35a79cd3f21304289b2b0cca85cfe89a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page