junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.37k stars 6.21k forks source link

Generate customize pre-trained #423

Open sigmagod opened 5 years ago

sigmagod commented 5 years ago

Hi, Can I create my own customize pre-trained result for my train result dataset ?

junyanz commented 5 years ago

What does "customize pre-trained result“ refer to?

sigmagod commented 5 years ago

Sorry, I follow the step from this repo and try to train a module from my datasets, its look like trainA blender_008 and trainB test to compression 256*256 So far, after trained complete how can I generate my customized pre-training(airplane2Eva.pb) to let the module transfer all the image what I want Or I need to follow this command below python test.py --dataroot datasets/horse2zebra/testA --name horse2zebra_pretrained --model test --name can change my dataset and names what I want? And I also follow the repo below, but the result is not very well, so I want to compare what the difference between https://github.com/vanhuyz/CycleGAN-TensorFlow By the way, for the dataset, the airplane position will be the key to determine the result? Or what should I notice?

junyanz commented 5 years ago

Yes, you can use test.py. Please see the instruction It might be challenging to translate a CAD model to an entire image directly as it's hard to synthesize a background from a white background. You might need to segment the airplane and only run CycleGAN between segmented CAD model and segmented real images.

sigmagod commented 5 years ago

Hi, can you explain why a white background its hard to synthesize, so if I can synthesis CAD model below with some different picture, does it possibly will working? plane_0006 plane_0020

junyanz commented 5 years ago

CycleGAN assumes that images in different domains share similar content but with different styles. The white background has zero information and does not share content with the target domain.

sudharavali commented 5 years ago

@sigmagod Hi, how did you deal with this issue ? Did changing the backgrounds help you in the case ?

sigmagod commented 5 years ago

@sigmagod Hi, how did you deal with this issue ? Did changing the backgrounds help you in the case ?

@sudharavali Finally, I use style transfer and texturegan to rebuild CAD model texture, then synthesis with background.