yuval-alaluf / SAM

Official Implementation for "Only a Matter of Style: Age Transformation Using a Style-Based Regression Model" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02754
https://yuval-alaluf.github.io/SAM/
MIT License
632 stars 151 forks source link

Latent vector #17

Closed MetiCodePrivateLimited closed 3 years ago

MetiCodePrivateLimited commented 3 years ago

I am trying to execute style_mixing.py but I am getting zero response. Following is the command,

python scripts/style_mixing.py \ --exp_dir=to \ --checkpoint_path=trained/sam_ffhq_aging.pt \ --data_path=from \ --test_batch_size=4 \ --test_workers=4 \ --latent_mask=8,9 \ --target_age=50

What does it means i.e. (--latent_mask=8,9)? What is 8,9 in the latent mask as in the directory there are no files of these name? How can I get latent mask files from cloud?

yuval-alaluf commented 3 years ago

The latent mask refers to which layers of StyleGAN we will perform the style mixing over. We perform mixing over layers 8 and 9 in the above example. There are no files you need need to pass to this script. This is just a comma-separated list of numbers.

MetiCodePrivateLimited commented 3 years ago

The problem is still there i.e. in the reference_guided_inference.py, we gave a parameter (--ref_images_paths_file=/path/to/ref_list.txt) to follow the style. But in style_mixing.py there is no parameter to follow the style and I got a blank response. How can I resolve it?

yuval-alaluf commented 3 years ago

The style mixing script performs style mixing with randomly samples latents rather than using reference images. Can you please clarify what you mean by a blank response?

MetiCodePrivateLimited commented 3 years ago

Could you please send me complete command of style_mixing? Actually, I am little confuse that in this command, we are not giving any path of samples to follow in style mixing due to which we are not getting any results. I am using following command, python scripts/style_mixing.py --exp_dir=to --checkpoint_path=trained/sam_ffhq_aging.pt --data_path=from --test_batch_size=4 --test_workers=4 --latent_mask=8,9 --target_age=50