jhoffman / cycada_release

Code to accompany ICML 2018 paper
BSD 2-Clause "Simplified" License
561 stars 126 forks source link

Size mismatch when running cyclegan to adapt SYNTHIA2Cityscapes #19

Closed Luodian closed 5 years ago

Luodian commented 5 years ago

Did you implement Synthia->Cityscapes procedure? I use one based on svhn->mnist, but it seems didn't work well. Do I miss something or I misunderstand the adaption procedure? image My other settings are:

--name
cycada_synthia2cityscapes_noIdentity
--resize_or_crop
resize_and_crop
--loadSize=768
--fineSize=768
--which_model_netD
n_layers
--n_layers_D
3
--model
cycle_gan_semantic
--lambda_A
1
--lambda_B
1
--lambda_identity
0
--no_flip
--batchSize
1
--dataset_mode
synthia_cityscapes
--dataroot
/nfs/project/libo_i/cycada/data
--which_direction
BtoA
--display_id
0
Luodian commented 5 years ago

I found that if I set batchsize = 100, problem solved. But I am wondering whether I can use this setting to translate SYHTHIA dataset into CityScapes dataset. Can you show us your setting when translating GTA to CityScapes?

jihanyang commented 5 years ago

@Luodian Have you reproduced the GTA to CityScapes images? The cyclegan released by judy is different to the code released by @junyanz. I am confused about the settings of reproducing the GTA to CityScapes images.

Luodian commented 5 years ago

Actually, you can directly use the original cyclegan to transfer GTAV to CityScapes. In this paper, it addressed they didn't use semantic consistency loss during semantic segmentation. I removed CLS network and related operators in cyclegan_semantic_model.py and trained a cyclegan model. Generated images are not so bad, but I haven't inferred all images yet. 可以加个微信继续交流下~ luodianup

beerboaa commented 5 years ago

@Luodian Hello, I cannot use batch_size of 100 when the load_size and crop_size are big, any other solution to this problem?