Segmentation tutorial not working

Greetings! I’m hoping to use GluonCV to extract specific objects from images. To this end, I pasted the first tutorial on Semantic Segmentation, “Getting Started with FCN Pre-trained Models,” into Jupyter Notebook and got the following two errors:

ValueError: Model fcn_resnet50_voc is not supported. Available options are…[a list of model options]

and

OSError: /home/ubuntu/.mxnet/datasets/voc is not a valid dir. Did you forget to initalize datasets described in gluon-cv/scripts/datasets? You need to initialize each dataset only once.

I suspect the problem comes from my using a form of cloud platform to run my Jupyter Notebook. The directories/libraries are not directly installed on my computer. Is there anyway to get around this? How would I “initialize the dataset” in this case? That aspect wasn’t discussed in the installation guide.

Alternatively, is there another model that would work? Is this tutorial outdated?

The object detection tutorial, “Predict with pre-trained SSD models”, worked just fine.

Thanks!

That tutorial requires you to download the PASCAL VOC dataset using this script.

In your environment, are you able to run shell commands from the notebook? If yes, you can clone the gluon-cv repo and run this script to download the dataset.

1 Like

I did get the same error on the model as you did though. Created an issue here: https://github.com/dmlc/gluon-cv/issues/145

I used a shell command to clone the GluonCV repo into my cloud directory, then browsed to the script and ran it like you said.

I’m still getting the same two errors, unfortunately.

@indu is right. It requires to install the dataset, because it call the dataset before loading the model. I am adding a patch to fix this.

I see… thanks.

In the meantime, I’m trying out some workarounds. I made a .mxnet/datasets/voc/ directory in my workspace and uploaded the four files listed here: https://gluon-cv.mxnet.io/build/examples_datasets/pascal_voc.html
(I have mxnet listed in a requirements.txt file in the directory.)

I did this because the script given above didn’t appear to do anything. It executed fine, but it didn’t change anything in my directory.

I tried running my tutorial again, and it still didn’t work. Do I need to unpack these files somehow? Can I pull out a part of the script to do this? I’m feeling a little desperate.