Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial request for image stitching, and error for kornia.feature #98

Open
fatbringer opened this issue Oct 16, 2024 · 5 comments
Open

Comments

@fatbringer
Copy link

fatbringer commented Oct 16, 2024

Hello! I found this link on your webpage
https://kornia.readthedocs.io/en/latest/applications/image_stitching.html
and i was very excited to try the image stitching, however i am unable to find an example tutorial for the image stitching

Here is a short code i wrote wanting to try your demo

import kornia as K
import kornia.feature as KF
from kornia.contrib import ImageStitcher
import torch
import cv2

device = K.utils.get_cuda_or_mps_device_if_available()

imgs = r"photos"

matcher = KF.LoFTR(pretrained='outdoor')
IS = ImageStitcher(matcher, estimator='ransac').cuda()
# NOTE: it would require a large CPU memory if many images.
with torch.no_grad():
    out = IS(*imgs)

cv2.imshow('output window', out) 

it also gave me an error

    import kornia.feature as KF
ModuleNotFoundError: No module named 'kornia.feature'; 'kornia' is not a package

Questions

  1. may i know which tutorial is the one for image stitching? (the warp image one is not what i need)
  2. How to fix the import kornia.feature error?

谢谢您的协助

@edgarriba
Copy link
Member

@fatbringer are you using the latest version of kornia ? check also https://kornia.github.io/tutorials/nbs/image_stitching.html

(the warp image one is not what i need)

what do you need ?

@fatbringer
Copy link
Author

@edgarriba yeah I'm using the latest version
I have just run pip install. On python 3.12

I'm looking for the one for image stitching. In fact, I want to stitch multiple images
https://kornia.readthedocs.io/en/latest/applications/image_stitching.html

This was the link I found but it is not a complete tutorials

@edgarriba
Copy link
Member

i believe @shijianjian implemented this tutorial

@fatbringer
Copy link
Author

@shijianjian Hello! I notice that you have a fork of the kornia repo on your profile. May i know which one is the corrrect tutorial for image stitching?

@shijianjian
Copy link
Member

I think it is the environment issue. At least the "import kornia.feature" should be okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants