taki0112 / SPADE-Tensorflow

Simple Tensorflow implementation of "Semantic Image Synthesis with Spatially-Adaptive Normalization" a.k.a. GauGAN, SPADE (CVPR 2019 Oral)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

guide

ak9250 opened this issue · comments

how to use guide test and how to use segmentation guide for facial attribute manipulation on your own provided image outside the dataset?
get this error for guide test
Traceback (most recent call last):
File "main.py", line 125, in
main()
File "main.py", line 120, in main
gan.guide_test()
File "/content/SPADE-Tensorflow/SPADE.py", line 584, in guide_test
style_image = load_style_image(self.guide_img, self.img_width, self.img_height, self.img_ch)
File "/content/SPADE-Tensorflow/utils.py", line 156, in load_style_image
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(3.4.3) /io/opencv/modules/imgproc/src/color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Did you put the guide image?
Guide testing requires a guide image.

python main.py --dataset spade_celebA --img_ch 3 --segmap_ch 3 --phase guide --guide_img ./guide_img.png

@taki0112 yes i put a guide image, can you post a example in repo just so I am not mistaken?

This error message looks like an error when there is no image.
How did you set the route?

I see should the guide image be a segmentation guide, can you post a example in the repo? Also, can you change segmentation image to change facial attributes like smile frown, would be good to get a example of that
Use standard file APIs to check for files with this prefix.
[] Success to read SPADE.model-1000001
[
] Load SUCCESS
0% 0/100 [00:00<?, ?it/s]2019-06-05 02:53:25.959497: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally
100% 100/100 [00:25<00:00, 4.78it/s]
[*] Guide test finished

The guide image is not a segmentation image.

@taki0112 ok would be interesting in changing segmentation image to guide facial attributes if that is possible in a example

Could you tell me where to find the guide image?Is it created by myself?