Hzzone / MTLFace

When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework (CVPR 2021 oral & TPAMI 2022)
173 stars 31 forks source link

Plot generated image from generator - FAS #8

Closed ngthalogit closed 2 years ago

ngthalogit commented 2 years ago

Thanks for your great job!

After train FAS, I try to plot the image generated from generator, but it does not work. Can you tell how to plot it correctly? Thanks

Hzzone commented 2 years ago
from torchvision.transforms.functional import to_pil_image
from torchvision.utils import make_grid
to_pil_image(make_grid(g_source))