menyifang / ADGAN

The Implementation of paper "Controllable Person Image Synthesis with Attribute-Decomposed GAN" CVPR 2020 (Oral); Pose and Appearance Attributes Transfer;
476 stars 90 forks source link

component attribute transfer #5

Open iij0 opened 4 years ago

iij0 commented 4 years ago

How should I work on component attribute transfer? The test.py only evaluates the pose transfer. Could you please provide the code for component attribute transfer?

menyifang commented 4 years ago

Hi @iij0, for component attribute transfer, you can give two source person images for style encoding and combine their style codes to get the mixed style code. The style code (len:512) consists of 8 components(len:64): 0Background, 1Pants, 2Hair, 3Skirt, 4Face, 5UpperClothes, 6arm, 7leg.

JiamingFB commented 4 years ago

Hi @menyifang ,

For the list "0Background, 1Pants, 2Hair, 3Skirt, 4Face, 5UpperClothes, 6arm, 7leg", is it defined in the code (VggStyleEncoder) or is it a result specific to the pretrained model?

EDIT: I think now I understand. These are corresponding to the semantic segmentation labels. (Please correct me if I'm wrong.)

menyifang commented 4 years ago

Hi @JiamingFB, yes, the component list is defined by the segmentation labels. With such training data, the model will try to learn a specific attribute in the fixed position, according to the segmentation labels.

newExplore-hash commented 4 years ago

How should I work on component attribute transfer? The test.py only evaluates the pose transfer. Could you please provide the code for component attribute transfer?

yes, i not find any code about this part and i have tried to implement this function( component attribute transfer), But it doesn't seem to work very well,Have you implemented this part of code? @JiamingFB, @iij0

artemkurylev commented 3 years ago

Hi @JiamingFB, yes, the component list is defined by the segmentation labels. With such training data, the model will try to learn a specific attribute in the fixed position, according to the segmentation labels.

Thanks for your explanation. So if I want to do component transfer I will need to retrain the model with changed segmentation labels? @menyifang

Update: I understood how to mix styles, results are actually not the best:( (With the weights given) However I will try to create some repo with code for launch with attribute transfer

NatsumeTetsuya commented 3 years ago

Same as you. Just mix them up can't get suitable result. So does retrain the model work? @artemkurylev Are there some of details of style-code mix? @menyifang

fengbuck commented 3 years ago

Hi @iij0, for component attribute transfer, you can give two source person images for style encoding and combine their style codes to get the mixed style code. The style code (len:512) consists of 8 components(len:64): 0Background, 1Pants, 2Hair, 3Skirt, 4Face, 5UpperClothes, 6arm, 7leg.

I have compeleted to mix the style code. In my way, if I want to exchange upperclothes, I exchange the two images' stylecode[320:383]. Then use decode to generate a new image. But the result is not very well. Is my method correct? image

abhigoku10 commented 2 years ago

@fengbuck @artemkurylev can you please share the code for attribute transfer ?? THanks in adavance

bill20th commented 2 years ago

Nice to meet you @menyifang ,@abhigoku10!

I also need the code for component attribute transfer. Also, where can I find the keypoint_mix in custom_dataset_data_loader.py? I would appreciate your answer.