jhoffman / cycada_release

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

How do we train cycada feature &pixel #11

Closed xiaoqianjia closed 5 years ago

xiaoqianjia commented 5 years ago

Hi Can you explain how do we train cycada pixel only, feature only, pixel & feature with GTA5 to CityScapes? I am confused the results from ./train_fcn.sh ./train_fcn_adda.sh, what's the different between them?

Thanks

jhoffman commented 5 years ago

train_fcn.sh trains a semantic segmentation model using the ground truth labels (standard supervised learning). You should use this to pre-train your source model with known labels.

train_fcn_adda.sh uses the feature adaptation to update the source initialized model output from previous step according to optimizing with the unlabeled target data.

For GTA->CityScapes the procedure is:

  1. Train CycleGAN based pixel adaptation to translate GTA images to resemble CityScapes images (or download the translated images directly from the provided link)
  2. Run standard fcn training on the translated GTA images with the known GTA labels
  3. Train feature space adaptation taking as input the translated GTA images, CityScapes images and the output weights from step 2
JamesChenChina commented 5 years ago

Do you know how to "Train CycleGAN based pixel adaptation to translate GTA images to resemble CityScapes images"? @xiaoqianjia Many thanks

JamesChenChina commented 5 years ago

@jhoffman Do you have the pre-trained model for "Train CycleGAN based pixel adaptation to translate GTA images to resemble CityScapes images"? Many thanks!

Luodian commented 5 years ago

@jhoffman Same question, how to translate GTA images to CityScapes images by our own? I find it's different from Cyclegan's original code, especially in cycle_gan_semantic_models.py.

I set my dataset properly using 'unaligned_datasets.py', but when I run train.py in cyclegan module.

It raises an error about no self.input_A_label found.