Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing attributes #29

Closed
petergerten opened this issue Feb 27, 2018 · 2 comments
Closed

Changing attributes #29

petergerten opened this issue Feb 27, 2018 · 2 comments

Comments

@petergerten
Copy link

Hi,

great project!
Is there any easy way to change the attributes. It seems some part are hardcoded in solver.py but it is not clear to me what to change if I want to use different CelebA attributes.

Peter

@petergerten
Copy link
Author

It seems I can change the selection of 5 attributes in data_loader.py.
What changes would be required if I want to add more than 5?

@yunjey
Copy link
Owner

yunjey commented Feb 28, 2018

@petergerten If you want to add more than 5 attributes, you should change c_dim=5 to c_dim=(# of attributes you choose) when running the command python main.py --mode='train' ....

As you mentioned, some part of the code was hardcoded to cover the case of hair color (black/blond/brown). The code ensures that the target label does not have more than one hair color at the same time.

If the attribute you added change the indices of Black_Hair/Blond_Hair/Brown_Hair attributes (the original indices are 1th, 2nd, and 3rd), you need to modify the code here. For example, if you add the Bangs attribute, the indices of Black_Hair/Blond_Hair/Brown_Hair are changed to 2nd, 3rd, 4th. You can check the order (or index) of each attribute below.

FYI, these are all available attributes:

'5_o_Clock_Shadow', 'Arched_Eyebrows', 'Attractive', 'Bags_Under_Eyes', 'Bald', 'Bangs', 'Big_Lips',
'Big_Nose', 'Black_Hair', 'Blond_Hair', 'Blurry', 'Brown_Hair', 'Bushy_Eyebrows', 'Chubby',
'Double_Chin', 'Eyeglasses', 'Goatee', 'Gray_Hair', 'Heavy_Makeup', 'High_Cheekbones', 'Male',
'Mouth_Slightly_Open', 'Mustache', 'Narrow_Eyes', 'No_Beard', 'Oval_Face', 'Pale_Skin', 'Pointy_Nose',
'Receding_Hairline', 'Rosy_Cheeks', 'Sideburns', 'Smiling', 'Straight_Hair', 'Wavy_Hair', 'Wearing_Earrings',
'Wearing_Hat', 'Wearing_Lipstick', 'Wearing_Necklace', 'Wearing_Necktie', 'Young'

@yunjey yunjey closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants