NVlabs / imaginaire

NVIDIA's Deep Imagination Team's PyTorch Library
Other
3.99k stars 444 forks source link

Interfere (test) using VAE? #100

Closed Kitty-sunray closed 2 years ago

Kitty-sunray commented 2 years ago

Hello! I've trained model using --use_vae switch, but cant find in the source code/docs how to test model using style image. It looks like there is no testing capabilities in the source code, am I wrong? How I can use segment map + style image to perform test using netE?

Closest I found is function "guide_test(self):" in the tf implementation of spade: line 575 of https://github.com/taki0112/SPADE-Tensorflow/blob/4517824ea3e9428d5ab5413847ed2af9891b5830/SPADE.py

mingyuliutw commented 2 years ago

The SPADE model in imaginaire always comes with a style encoder. To use it, please provide style images through the yaml file in a similar fashion as the segmentation image. https://github.com/NVlabs/imaginaire/blob/c4b3f2a89e70c0867ad888f96fc015c033c78a1c/configs/projects/spade/cocostuff/base128_bs4.yaml#L145 You might need to modify the code a bit in https://github.com/NVlabs/imaginaire/blob/c4b3f2a89e70c0867ad888f96fc015c033c78a1c/imaginaire/generators/spade.py#L164