LynnHo / AttGAN-Tensorflow

AttGAN: Facial Attribute Editing by Only Changing What You Want (IEEE TIP 2019)
MIT License
605 stars 135 forks source link

To Test with new custom images #40

Closed VijayRameshkumar closed 4 years ago

VijayRameshkumar commented 4 years ago

Could you help me how to do data preparation part to find out how to align the faces?

Thanks in Advance!

LynnHo commented 4 years ago

@VijayRameshkumar ./scripts/align.py, this script aligns the faces.

VijayRameshkumar commented 4 years ago

Hi,

I've noticed that align.py scripts asking for facial landmark.. How can i prepare it..?

parser.add_argument('--landmark_file', dest='landmark_file', default='./data/img_celeba/landmark.txt')

parser.add_argument('--standard_landmark_file', dest='standard_landmark_file', default='./data/img_celeba
/standard_landmark_68pts.txt')

I've noticed that test.py asking for test_label path.. how could i make it..? I've noticed there're 50 classes.. but I couldn't understand the encoding strategy that you've followed?

py.arg('--test_label_path', default='./data/img_celeba/test_label.txt')

Sorry, if my questions are looking stupid..

Thanks in advance.

LynnHo commented 4 years ago

@VijayRameshkumar Following the data preparation part of the README file, you will download the landmark file and the attribute labels. What do you mean about "50 classes"?

VijayRameshkumar commented 4 years ago

Sorry For the stupid question that i've asked.

  1. My question is how to annotate my new custom image to test with the AttnGAN pretrained model?
parser.add_argument('--landmark_file', dest='landmark_file', default='./data/img_celeba/landmark.txt')
  1. What is test label path? what it represents and how?

` py.arg('--test_label_path', default='./data/img_celeba/test_label.txt')

` sorry, If my questions still doesn't make any sense;

My objective is to test AttnGAN with new custom images. so, that what are the steps i've to do?

Thanks in advance;

LynnHo commented 4 years ago
  1. To annotate the 68 landmarks like https://ibug.doc.ic.ac.uk/resources/300-W. Or you can use DLIB API to detect these landmarks.
  2. Use these landmarks to align the faces like how ./scripts/align.py do.
  3. To annotate or detect the attributes defined by CelebA.
  4. To run the AttGAN test function.
VijayRameshkumar commented 4 years ago

Hi,

I've annotated facial landmarks for custom new images.

But, test file requires test label path.

I've seen that test_label.txt file. (-1 or 1) What it's representing!

How could i make my custom test labels?

Thanks in advance!

VijayRameshkumar commented 4 years ago

Hello,

Thanks for shared your great knowledge with me;

I've read older issues, you clearly mentioned why we've labeled attributes (-1,1).