Open fellipeassuncao opened 2 years ago
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).
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!
I tried to execute the command:
!pip install pySNIC
and the instalation seems to be effective, but when I call the lib withfrom asnic import generate_seeds
the 'ModuleNotFoundError ' appear. How can I fix it?