InterDigitalInc / latent-transformer

Official implementation for paper: A Latent Transformer for Disentangled Face Editing in Images and Videos.
https://arxiv.org/abs/2106.11895
Other
143 stars 22 forks source link

About latent classifier #2

Closed xuedue closed 3 years ago

xuedue commented 3 years ago

Hello, author, I have a question about the train data of latent classifier.

I would like to ask if these 30000 latent codes are in order using psp encoder? (i.e. 0.jpg, 1jpg, 2.jpg ... 29999.jpg)

Or could you provide the code that generate training dataset?

And in latent_classifier.py,Should the last line of code be put back into the loop ?

Xu-Yao commented 3 years ago

Hi, the training data that we shared is generated using pSp encoder. You may refer to their official implementation for more details.

xuedue commented 3 years ago

Hi, the training data that we shared is generated using pSp encoder. You may refer to their official implementation for more details.

I have used pSp, but the sorted result of the pSp data reading is (0.jpg, 1.jpg, 10.jpg, 100.jpg ....). In fact, I'd like to know the order in your labeled data file(celebahq_anno.npy). I outputted it and observed that it seems to be in the order of 0_anno, 1_anno, 2_anno .... .29999_anno)

I want to used your celebahq_anno.npy to retrain your latent classifier with different encode latent, thus the order of your ann.npy is important.

Xu-Yao commented 3 years ago

Hi, the training data that we shared is generated using pSp encoder. You may refer to their official implementation for more details.

I have used pSp, but the sorted result of the pSp data reading is (0.jpg, 1.jpg, 10.jpg, 100.jpg ....). In fact, I'd like to know the order in your labeled data file(celebahq_anno.npy). I outputted it and observed that it seems to be in the order of 0_anno, 1_anno, 2_anno .... .29999_anno)

I want to used your celebahq_anno.npy to retrain your latent classifier with different encode latent, thus the order of your ann.npy is important.

Hi, sorry to reply late. The order in celebahq_anno.npy is in the same order as in CelebA-HQ dataset. When generate latent codes using pSp, I pad the image name with zeros, which means 00000.jpg, 00001.jpg... so that they should be in a correct order.