HideUnderBush / UI2I_via_StyleGAN2

Unsupervised image-to-image translation method via pre-trained StyleGAN2 network
Other
222 stars 30 forks source link

the style code of the specified reference is not used in gen_ref.py #5

Open zhangsdly opened 3 years ago

zhangsdly commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

HideUnderBush commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

emmm...did you use the option --fac_ref reference_inverse.pt? the reference_inverse.pt should be inversed code of the reference image.

zhangsdly commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

emmm...did you use the option --fac_ref reference_inverse.pt? the reference_inverse.pt should be inversed code of the reference image.

I did. The 'fact_ref' is used to calculate style_latent, but the style_latent is not used in the next process.

HideUnderBush commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

emmm...did you use the option --fac_ref reference_inverse.pt? the reference_inverse.pt should be inversed code of the reference image.

I did. The 'fact_ref' is used to calculate style_latent, but the style_latent is not used in the next process.

Just check-in a hotfix, please have a try. Not sure if it works 100% since I cannot access server to check previous code now. Let me know if it still does not work.

zhangsdly commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

emmm...did you use the option --fac_ref reference_inverse.pt? the reference_inverse.pt should be inversed code of the reference image.

I did. The 'fact_ref' is used to calculate style_latent, but the style_latent is not used in the next process.

Just check-in a hotfix, please have a try. Not sure if it works 100% since I cannot access server to check previous code now. Let me know if it still does not work.

I have tried but it still does not work. The result is not related to the source image and reference image. As stated in the paper, the output not only preserves the style of the reference images in terms of color,light condition, texture and so forth, but it also maintains semantic similarity to the source images.

HideUnderBush commented 3 years ago

hi, Appreciate for sharing the implementation! There is a question that the style code of the specified reference is not used in gen_ref.py. Noise is used to generate ref and identity. Could you please to fix it ? Thanks!

emmm...did you use the option --fac_ref reference_inverse.pt? the reference_inverse.pt should be inversed code of the reference image.

I did. The 'fact_ref' is used to calculate style_latent, but the style_latent is not used in the next process.

Just check-in a hotfix, please have a try. Not sure if it works 100% since I cannot access server to check previous code now. Let me know if it still does not work.

I have tried but it still does not work. The result is not related to the source image and reference image. As stated in the paper, the output not only preserves the style of the reference images in terms of color,light condition, texture and so forth, but it also maintains semantic similarity to the source images.

did you use correct factor base? --fact_base1 factor_from_base_model. --fact base_inverse.pt and --fact_base1 factor_from_base_model compose the inverted code for source image, same setting for ref. If you use a model A, you should first compute its factor and it will then be used in gen_ref.