mahmoudnafifi / HistoGAN

Reference code for the paper HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms (CVPR 2021).
MIT License
267 stars 27 forks source link

Regarding Training on own Dataset #9

Closed kuruvilla2087 closed 2 years ago

kuruvilla2087 commented 2 years ago

Hi Mahmoud ,

i was trying to train this own cloths dataset as my requirements was to change color of the clothes and produce random output which should be conditional on my input image and preserve my original image structure .

Can you please let me know if the above can be achieved using your model , also where can i check the generate samples ,I could check it only give histogram output

mahmoudnafifi commented 2 years ago

Yes, you can train on your own dataset. Please check readme to learn more about the training parameters. The current code is provided for the histoGAN part which is to generate new samples from the training domain with the control of colors via input histogram features. To recolor real input images, you need to project the input image into the latent space of the trained histoGAN model (that should be trained on the same domain of the input image). Here you can either do this projection through a per-example optimization or use an encoder and train it to learn this projection. The latter option is the rehistoGAN part in the paper. The code of both per-example optimization and rehistoGAN network will be released in August.

kuruvilla2087 commented 2 years ago

Thanks mahamoud for the Quick turnaround from your busy Schedule Sure i will check the parameters

A few Asks -

1) Do we have control over which colors(i have attached a tshirt sample for which i need to change colors to green,blue and pink) to generate as well in HistoGAN, Can this be contrast colors.I had tried using bicycle GAN architecture but i was not able to judge how to produce and control the color generation

2)I had trained just 5-6 images(i know this would be too immature just 6 images) just to check the output but could see only histogram output being generated but the generated samples do not contain clothes in my case (as the Faces generated in your case shown in the figure).

3)Just one ask more do we have any sample code for the below "To recolor real input images, you need to project the input image into the latent space of the trained histoGAN model (that should be trained on the same domain of the input image"

Thanks once again , Hoping to hear from your soon .

5_AB