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

image extension .jpeg hardcoded #17

Open
zubairahmed-ai opened this issue Oct 16, 2020 · 3 comments
Open

image extension .jpeg hardcoded #17

zubairahmed-ai opened this issue Oct 16, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@zubairahmed-ai
Copy link

Hi

You have hardcoded extension .jpeg which makes it harder to try other images

<ipython-input-42-a444c2d0177a> in <module>
      1 p=1
      2 print(id_to_name[p])
----> 3 image_embeddings.knn.display_picture(path_images, id_to_name[p])
      4 results = image_embeddings.knn.search(index, id_to_name, embeddings[p])
      5 image_embeddings.knn.display_results(path_images, results)

~/miniconda3/envs/tracker/lib/python3.8/site-packages/image_embeddings/knn/knn.py in display_picture(image_path, image_name)
     54 
     55 def display_picture(image_path, image_name):
---> 56     display(Image(filename=f"{image_path}/{image_name}.jpeg"))
     57 
     58 
@rom1504
Copy link
Owner

rom1504 commented Oct 16, 2020 via email

@zubairahmed-ai
Copy link
Author

Thanks for replying, already changed the extension to jpg and using the new module after change

@zubairahmed-ai
Copy link
Author

Must also include a function to loop through all available images and display, the ordering on the file system isn't the same as index

@rom1504 rom1504 added the enhancement New feature or request label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants