CompVis / adaptive-style-transfer

source code for the ECCV18 paper A Style-Aware Content Loss for Real-time HD Style Transfer
https://compvis.github.io/adaptive-style-transfer/
GNU General Public License v3.0
723 stars 139 forks source link

Receiving blue-colored mess as result from example #32

Closed mtpython closed 4 years ago

mtpython commented 4 years ago

Feels very weird, as the process runs without errors (almost), and the result goes as expected, except that the resulting images look like this (regardless of selected style):

Places365_val_00010478_stylized

This is what the terminal shows:

(env-Adaptive) deep2@deep2:~/Desktop/style-adaptive$ CUDA_VISIBLE_DEVICES=0 python main.py --model_name=model_van-gogh --phase=inference --image_size=200 --ii_dir=./images/ --save_dir=./images_results/
2019-10-30 17:18:26.154269: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-30 17:18:26.154290: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-30 17:18:26.154294: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2019-10-30 17:18:26.154298: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-30 17:18:26.154301: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Inference.
Start inference.
 [*] Reading latest checkpoint from folder ./models/model_van-gogh/checkpoint.
 [*] Reading latest checkpoint from folder ./models/model_van-gogh/checkpoint_long.
 [!] Load failed...
100%|██████████| 32/32 [00:10<00:00,  2.97it/s]
Inference is finished.

I'm on: Ubuntu 18.04, python 2.7, tensorflow 1.2.

rickdotta commented 4 years ago

@MtPython the [!] Load failed... error means that the trained model was not loaded and so you will not be able to stylize.

Have you downloaded the Van Gogh model? There are some instructions on how to do the "inference" to stylize the images here

https://github.com/CompVis/adaptive-style-transfer#inference

btw, a successful load will show messages like the ones below:

Start inference.
 [*] Reading latest checkpoint from folder ./models/model_monet/checkpoint.
 [*] Reading latest checkpoint from folder ./models/model_monet/checkpoint_long.
Load checkpoint model4_monet_bks10_flw100_150000.ckpt-150000. Initial step: 150000.
Load checkpoint model4_monet_bks10_flw100_150000.ckpt-150000. Initial step: 150000.
INFO:tensorflow:Restoring parameters from ./models/model_monet/checkpoint_long/model4_monet_bks10_flw100_150000.ckpt-150000
I1025 02:57:19.321783 140255895340928 saver.py:1284] Restoring parameters from ./models/model_monet/checkpoint_long/model4_monet_bks10_flw100_150000.ckpt-150000
 [*] Load SUCCESS
mtpython commented 4 years ago

@rickdotta Okay, thank you, my bad, I places the packaged models into the folder, but didn't recognize I need to unarchive them afterwards, and the process kept creating all the folders named as the archives, so I assumed it got unpacked dynamically.

Everything functions as expected now, though the GPU's don't seem to respond to CUDA_VISIBLE_DEVICES=0,1 (or "0" or "1") at all right now, but I guess this is not a problem related to this repo.