places365 icon indicating copy to clipboard operation
places365 copied to clipboard

Problems with usage in DeepDream

Open ad48hp opened this issue 6 years ago • 10 comments

I tried to use the model in the consistently zooming-up script, and while the original MIT Places seemed to work quite well, the one on this didn't yet..

Does anyone have some suggestive ideas ?

ad48hp avatar Feb 13 '20 00:02 ad48hp

It's the layer, channels, and input that are affecting it, I think. Changing any of those should help.

ProGamerGov avatar Feb 18 '20 22:02 ProGamerGov

I've got Places205 working with DeepDream in PyTorch, so I'll see if Places365 works just as well once I convert it.

ProGamerGov avatar Feb 19 '20 23:02 ProGamerGov

@ad48hp

Here's a random Places205 layer: inception4c_out

And a random Places365 layer:

inception4c_out

It seems to work just as well for me.

ProGamerGov avatar Feb 20 '20 02:02 ProGamerGov

Can you try the videoify.py script and post the results ?

Try with the StepSize settled to 1.5 and then -1.5..

ad48hp avatar Feb 23 '20 23:02 ad48hp

@ad48hp I don't have a working Caffe setup for running the script.

You can try running my WIP project here, with the following parameters:

python3 neural_dream.py -backend cudnn -octave_scale 0.25 -num_octaves 4 -octave_mode advanced -octave_iter 10 -tv_weight 0 -print_octave_iter 5 -loss_mode l2 -seed 876 -model_file models/googlenet_places365.pth -init image -dream_layers inception_4c_pool_proj -content_image test_image.png -learning_rate 5 -image_size 1140 -num_iterations 10 -zoom 95

ProGamerGov avatar Feb 24 '20 00:02 ProGamerGov

Code seems to be bugged..

img.data = adjust_contrast(img, r=clamp_val, params.adjust_contrast) The r parameter is unnecessary, and throws me an error "positional argument follows keyword argument"

ModuleNotFoundError: No module named 'dream (in dream_model.py)'

ad48hp avatar Feb 28 '20 19:02 ad48hp

@ad48hp If you change the neural_dream.py script to dream.py, then it should work I think.

ProGamerGov avatar Feb 28 '20 19:02 ProGamerGov

That breaks the statements.. from neural_dream.CaffeLoader import loadCaffemodel, ModelParallel, Flatten import neural_dream.dream_utils as dream_utils import neural_dream.dream_model as dream_model from neural_dream.dream_auto import auto_model_mode, auto_mean from neural_dream.dream_experimental import ChannelMod

Do you try to run the code before uploading to Github ? Sometimes some code worked on my computer well, and others marked it sorta as broken..

Also, there are more bugs, like AttributeError: module 'neural_dream' has no attribute 'DreamLossHook', which is why i recommend trying the code (i run it with P3.6)

ad48hp avatar Feb 28 '20 20:02 ad48hp

@ad48hp Put all the files in a folder/directory called neural_dream except for dream.py. I haven't worked a ton with multiple files like this before, so I'm still learning how things work. The import statements will import the file from the neural_dream folder.

I also just successfully ran the code on PC, so it doesn't seem like there are any bugs stopping it from working right now.

ProGamerGov avatar Feb 28 '20 20:02 ProGamerGov

@ad48hp I've published the project as it's own GitHub project now: https://github.com/ProGamerGov/neural-dream

ProGamerGov avatar Mar 16 '20 18:03 ProGamerGov