leongatys / DeepTextures

Code to synthesise textures using convolutional neural networks as described in Gatys et al. 2015 (http://arxiv.org/abs/1505.07376)
273 stars 82 forks source link

Seems to be inoperable? #7

Closed rennis250 closed 7 years ago

rennis250 commented 8 years ago

Thanks for creating this!

I'm trying this both on an Ubuntu system with an Nvidia CUDA setup (Nvidia Quadro K5000) and a Mac with the CPU Atlas-accelerated framework. All of the CUDA tests pass on the Ubuntu system and the caffe tests pass on both the Ubuntu system and the Macbook system. I can successfully import caffe into python on both systems. Basically, all of the code you have provided runs successfully (with the addition of a few numpy identifiers), except for the very last line, or so it seems. When I run the ImageSyn() function, a matplotlib window appears with the initial random noise pattern. However, after that I see no changes. From reading the paper, it seems like I should see some update to the texture within about 10 minutes or so on the Ubuntu machine. For testing, I ran this on the Mac and the CPU shows no activity related to the python process after the initial presentation of the matplotlib window, indicating that the process has become functionally dead. Has something changed in caffe that needs to be accounted for?

I am using Python 2.7.6, CUDA 7.5, and caffe commits from yesterday on the Ubuntu (14.04) machine (8c66fa5) and Python 2.7.11 and caffe commits from today on the Mac (10.11.4) (289dfe6).

For further testing, I will leave it running overnight on the Ubuntu machine to see if anything happens.

Best, Rob

leongatys commented 8 years ago

Hi sorry for the late response, to run the texture synthesis on a cpu you can actually use a docker container that I prepared for teaching a course. Please see the instructions below for how to get it to run.

Best Leon

Instructions 1.) You need to install Docker, for that go to this page https://docs.docker.com/engine/installation/ and read and follow the installation instructions for your Operating System (Windows/Mac/Linux). You should get the ‘Hello World’ example to run that is given to the end of the installation instructions.

2.) In the docker quickstart terminal, where you ran the ‘docker run hello-world’ command for the ‘Hello World’ example, now run the command:

docker pull leongatys/caffe-cpu

This will download the docker container with a caffe installation onto your computer.

3.) To get something going you can now download my code for Texture Synthesis by typing this into your command line: git clone https://github.com/leongatys/DeepTextures.git

4.) Then download the fully trained VGG network file from: http://bethgelab.org/media/uploads/deeptextures/vgg_normalised.caffemodel and save it in the DeepTextures/Models/ folder.

5.) Then you can start running a Notebook Server in the Docker container with: docker run -v $HOME:/home -p 8888:8888 -d leongatys/caffe-cpu jupyter-notebook

6.) Finally check which IP the docker virtual box has by typing: docker-machine ls and looking at the ‘URL’ field (for me it is for example: 192.168.99.100:2376).

7.) Go to your browser and type the IP with the port 8888 into the url bar (so for me 192.168.99.100:8888). The browser should now show the Jupyter Notebook Server.

8.) Now you are ready to go, you can create your own notebook or look at the example notebook for my texture synthesis under DeepTextures/Example.ipynb