Skip to content

How can I use SIFT with LightGlue? #2891

Answered by ducha-aiki
RoyAmoyal asked this question in Questions
Discussion options

You must be logged in to vote

@RoyAmoyal

Hi, here is a slightly modified DISK-LightGlue example to use with SIFT:

import io

import requests


def download_image(url: str, filename: str = "") -> str:
    filename = url.split("/")[-1] if len(filename) == 0 else filename
    # Download
    bytesio = io.BytesIO(requests.get(url).content)
    # Save file
    with open(filename, "wb") as outfile:
        outfile.write(bytesio.getbuffer())

    return filename


url_a = "https://github.com/kornia/data/raw/main/matching/kn_church-2.jpg"
url_b = "https://github.com/kornia/data/raw/main/matching/kn_church-8.jpg"
download_image(url_a)
download_image(url_b)


import kornia as K
import kornia.feature as KF
import cv2
from kornia_…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by edgarriba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants