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

AttributeError: module 'kornia_rs' has no attribute 'read_image_rs' #43

Closed
safoex opened this issue Mar 11, 2024 · 3 comments
Closed

AttributeError: module 'kornia_rs' has no attribute 'read_image_rs' #43

safoex opened this issue Mar 11, 2024 · 3 comments

Comments

@safoex
Copy link

safoex commented Mar 11, 2024

File "/workspace/trusted-plastic/apps/tpcv/tpcv/vision/image_matcher.py", line 42, in next
img1 = K.io.load_image(image_path_1, K.io.ImageLoadType.RGB32)[None, ...]
File "/usr/local/lib/python3.8/dist-packages/kornia/io/io.py", line 77, in load_image
image: Tensor = load_image_to_tensor(path_file, device) # CxHxW
File "/usr/local/lib/python3.8/dist-packages/kornia/io/io.py", line 38, in load_image_to_tensor
cv_tensor = kornia_rs.read_image_rs(path_file)
AttributeError: module 'kornia_rs' has no attribute 'read_image_rs'

tested all combinations of kornia 0.7.0 0.7.1 and kornia_rs 0.1.0 0.1.1

@safoex
Copy link
Author

safoex commented Mar 11, 2024

read_image_rs is definitely mentioned in kornia package, while it's non-existent in kornia_rs (in src, tests, etc)

@safoex
Copy link
Author

safoex commented Mar 11, 2024

ooof, I managed to find out that kornia 0.7.1 and earlier should work with kornia_rs 0.0.8
Also from what I see in kornia repo I can deduce that people maintaining kornia realized it's time to add clear dependency on kornia_rs :) So you can close an issue, though it might be useful for others as current last versions of kornia and kornia_rs are not compatible. Hope it gonna be fixed soon!

@edgarriba
Copy link
Member

edgarriba commented Mar 12, 2024

this was part of this big refactor: #32

now the api is more mature and read_image_rs is mapped to read_image_any which will return directly a numpy array in the python version. This is i hope will stay like for a long while till we are more mature and is all encapsulated into a single read_image signature.

you can check here for new usage examples: https://github.com/kornia/kornia-rs/blob/main/py-kornia/tests/test_io.py

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

2 participants