docker-neuraltalk2 icon indicating copy to clipboard operation
docker-neuraltalk2 copied to clipboard

vis file is not created

Open Akito82 opened this issue 8 years ago • 2 comments

Hi, I'm not sure what to do with the path description "docker run -it -d -v /path/to/images:/data/images -v /path/to/model:/data/model samnco/neuraltalk2:latest" Why the : ? I did: sudo docker run -it -d -v /home/user/Downloads -v /home/user/Downloads/ samnco/neuraltalk2:lates

I get a long string with letters and numbers like 4ff4a59e44ce2e5fa247d28195ee611b256b1503b74aa117d07d26e8d7d97515 but there is no vis file created. What am I doing wrong? Thank you

Akito82 avatar Apr 08 '17 22:04 Akito82

Same problem.

beyondguo avatar Mar 01 '20 15:03 beyondguo

Hi, guys, I managed to get it working. So, let's first understand the mentioned command:

I'm not sure what to do with the path description "docker run -it -d -v /path/to/images:/data/images -v /path/to/model:/data/model samnco/neuraltalk2:latest" Why the : ?

With the arguments -v /path/to/images:/data/images and -v /path/to/model:/data/model, you are binding two directories in your local machine (the ones before the :) to two directories in the container (the ones after the :). For instance, if in your local machine the images to be captioned are in the directory ~/Pictures, you should do: -v ~/Pictures:/data/images. As of the model, I'm not sure if you need to download it manually, or if the container already does it for you if you don't specify it. But, since I've already downloaded the CPU version of the model before to ~/Downloads/neuraltalk2-model in my local machine, I used it like so: -v ~/Downloads/neuraltalk2-model/:/data/model. You can download it from the original neuraltalk2 repo. (You'll find the CPU only version on the section "I only have CPU" in the README.)

So, your command should look like this (of course, your local directories possibly won't be the same):

sudo docker run -it -d -v ~/Pictures:/data/images -v ~/Downloads/neuraltalk2-model/:/data/model -p 8000:8000 samnco/neuraltalk2:latest

Notice that I've used also -p 8000:8000 so that the container's 8000 port is available in my local machine. This way I can see the results in the URL localhost:8000/vis/:

screenshot containing the images and its captions

Edit

I just checked, and the install.sh command (/opt/neural-networks/install.sh) will download the model if you don't provide it.

estevaog3 avatar Mar 29 '20 18:03 estevaog3