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

How can I install PySNIC in Google Colab? #10

Open
fellipeassuncao opened this issue Feb 10, 2022 · 2 comments
Open

How can I install PySNIC in Google Colab? #10

fellipeassuncao opened this issue Feb 10, 2022 · 2 comments

Comments

@fellipeassuncao
Copy link

fellipeassuncao commented Feb 10, 2022

I tried to execute the command: !pip install pySNIC and the instalation seems to be effective, but when I call the lib with from asnic import generate_seeds the 'ModuleNotFoundError ' appear. How can I fix it?

@fellipeassuncao fellipeassuncao changed the title How can I install PyIFT in Google Colab? How can I install PySNIC in Google Colab? Feb 10, 2022
@MoritzWillig
Copy link
Owner

MoritzWillig commented Feb 10, 2022

In your example you import asnic instead of pysnic. Also the function to generate an equidistant grid of seeds is called compute_grid in this repository and has to be imported from the helpers:

from pysnic.helpers.grid import compute_grid
from itertools import chain

num_seeds = 100
grid = compute_grid(my_image.shape, num_seeds)
seeds = list(chain.from_iterable(grid))

Please let me know if the problem persists! Otherwise I have just tested it to work with python 3.9.7 and pip 21.2.4 (not on Google Colab though).

@fellipeassuncao
Copy link
Author

fellipeassuncao commented Feb 11, 2022

Perfect! You were fast and precise! I'd want to generate seeds from an image and you understood it fastly! It's worked! Now I want understand I if I'm able to use these seeds as input in my segmenation algorithm that use seeds. I will think about it... Thanks!

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