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

How to test the texture transfer model? #26

Closed
confifu opened this issue Jun 16, 2021 · 9 comments
Closed

How to test the texture transfer model? #26

confifu opened this issue Jun 16, 2021 · 9 comments

Comments

@confifu
Copy link

confifu commented Jun 16, 2021

I want to test only the texture transfer model. It is mentioned that the model needs to be changed. How should I change it? What inputs are needed to test the texture transfer model?

@Zhangjinso
Copy link
Owner

As far as I can remember, you can do it with some steps.

  1. You need to change this line to 'model_file_name = "model." + model_name + "_model_transfer" ' to import the texture transfer model.
  2. You also need to change this line to ' filename = 'generator_texture_transfer' if filename is None else filename ' to import generator.
  3. You need to change the dataloader and your test_pair.csv to input two reference images according to this line.
  4. You need to uncomment this line and modified the region index and 'alpha' (maybe change it to 1).
  5. Then you can test it.

@happyday521
Copy link

happyday521 commented Jun 17, 2021

@Zhangjinso Hi, in line 223 of generator_texture_transfer.py, what is the meaning of "if False"? Don't we need to execute indented codes under if?(line 223-265)Thanks!

@Zhangjinso
Copy link
Owner

Yes. The texture transfer model does not used spatio-aware normalization module for the convenience of training. If you want to get better results, you can retrain the model with this.

@confifu
Copy link
Author

confifu commented Jun 17, 2021

Pose transfer results using the pre-trained checkpoint are not as good as shown in the paper. Were different checkpoints used to get the results shown in the paper?
fashionWOMENDressesid0000713204_4full_fashionWOMENDressesid0000713204_3back_all
fashionWOMENDressesid0000715402_4full_fashionWOMENDressesid0000715402_2side_all
fashionWOMENJackets_Coatsid0000450202_1front_fashionWOMENJackets_Coatsid0000450202_7additional_all
fashionWOMENShortsid0000513803_4full_fashionWOMENShortsid0000513803_1front_all

@Zhangjinso
Copy link
Owner

Zhangjinso commented Jun 17, 2021

You can refer to this issue.

@confifu
Copy link
Author

confifu commented Jun 17, 2021

What should be self.input_SPL3 ? SPL2_onehot has shape [8, 256, 256]. Do we also need to input one hot vector in input_SPL3 as well? Do we only have to leave the region for which we want the texture transfer?

@confifu
Copy link
Author

confifu commented Jun 17, 2021

If anyone wants to do this,
To keep the pose same and only transfer texture, I did the following:

  • Change the following line

    return {'P1': P1, 'BP1': BP1, 'P2': P2, 'BP2': BP2,'SPL1': SPL1_onehot, 'SPL2':SPL2_onehot, 'label_P2': SPL2,

    to return {'P1': P1, 'BP1': BP1, 'P2': P1, 'BP2': BP1,'SPL1': SPL1_onehot, 'SPL2':SPL1_onehot, 'label_P2': SPL1, 'P1_path': P1_name, 'P2_path': P1_name, 'P3' : P2, 'SPL3' : SPL2_onehot}

  • To change the part for which you want to transfer texture, edit the following line

    #codes_vector[0,2,:] = (1-alpha)*codes_vector[0,2,:]+alpha*_codes_vector[0,2,:]

    to codes_vector[0,part,:] = (1-alpha)*codes_vector[0,part,:]+alpha*_codes_vector[0,part,:]
    set alpha = 1 and part = 0 to 8

@confifu confifu closed this as completed Jun 17, 2021
@mlyarthur
Copy link

image
After following your instruction for texture transfer model testing, I cannot get the desired result in the paper @eternitjl @Zhangjinso Do you know what step I miss or make a mistake

@ghost
Copy link

ghost commented Apr 29, 2022

image After following your instruction for texture transfer model testing, I cannot get the desired result in the paper @eternitjl @Zhangjinso Do you know what step I miss or make a mistake

@mlyarthur Hi,have you solved it? I have a similar problem
image

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

4 participants