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

fbrs_interactive_segmentation.ipynb #10

Closed
AlexRMU opened this issue Jun 7, 2020 · 4 comments
Closed

fbrs_interactive_segmentation.ipynb #10

AlexRMU opened this issue Jun 7, 2020 · 4 comments

Comments

@AlexRMU
Copy link

AlexRMU commented Jun 7, 2020

Your colab doesn't work on its own and I changed it.
https://colab.research.google.com/gist/AlexRMU/1cedcc342e8cdec7bc8881007db77f4a/fbrs_interactive_segmentation.ipynb#scrollTo=7jDwxuLkHkRy
And received
float division by zero

@AlexRMU
Copy link
Author

AlexRMU commented Jun 7, 2020

"work on its" own means that the user does not have to download or transfer anything, but just click and everything will work

@ptrvilya
Copy link
Contributor

The error is caused by the incorrect path to datasets, you are trying to evaluate the model on GrabCut dataset and download it to ./datasets/InteractiveSegmentation/GrabCut (relative to folder with cloned repository), but the default path in config.yml is absolute, starting from root: /datasets/InteractiveSegmentation/GrabCut. You just have to change the default path and everything will work.

@AlexRMU
Copy link
Author

AlexRMU commented Aug 12, 2020

Launched your colab. An error appears at the very beginning:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-0bc6b562c85d> in <module>()
     11 
     12 sys.path.insert(0, '..')
---> 13 from isegm.utils import vis, exp
     14 
     15 from isegm.inference import utils

ModuleNotFoundError: No module named 'isegm'

And: cfg = exp.load_config_file('../config.yml', return_edict=True)
You refer to config.yml, but it is not downloaded! Why? Then I added to the beginning:

!git clone https://github.com/saic-vul/fbrs_interactive_segmentation
%cd fbrs_interactive_segmentation
!pip install -r requirements.txt

It work. Further
In Init model:

AssertionError                            Traceback (most recent call last)
<ipython-input-10-95614765a096> in <module>()
      4 MODEL_THRESH = 0.49
      5 
----> 6 checkpoint_path = utils.find_checkpoint(cfg.INTERACTIVE_MODELS_PATH, 'resnet34_dh128_sbd')
      7 model = utils.load_is_model(checkpoint_path, device)
      8 

/content/fbrs_interactive_segmentation/isegm/inference/utils.py in find_checkpoint(weights_folder, checkpoint_name)
    171     else:
    172         model_checkpoints = list(model_folder.rglob(f'{checkpoint_name}*.pth'))
--> 173         assert len(model_checkpoints) == 1
    174         checkpoint_path = model_checkpoints[0]
    175 

AssertionError: 

Where /weights? Where /experiments? After all, how are you going to do Interactive Segmentation on the command line? (Mb https://github.com/davidbau/rewriting)

@ksofiyuk
Copy link
Contributor

ksofiyuk commented Aug 12, 2020

Launched your colab.

We didn't provide any colab. We provided only a Jupyter notebook, which we ran on a local machine with Jupyter server.

Where /weights? Where /experiments? After all, how are you going to do Interactive Segmentation on the command line? (Mb https://github.com/davidbau/rewriting)

You can find information about how to set up paths in the Evaluation and Training sections of our readme. Please read README carefully before asking questions.

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