cyclegan_cityscapes.yaml 1.6 KB
Newer Older
L
LielinJiang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
epochs: 200
isTrain: True
output_dir: output_dir
lambda_A: 10.0
lambda_B: 10.0
lambda_identity: 0.5

model:
  name: CycleGANModel
  defaults: &defaults
    norm_type: instance
    input_nc: 3
  generator:
    name: ResnetGenerator
    output_nc: 3
    n_blocks: 9
    ngf: 64
    use_dropout: False
    <<: *defaults
  discriminator:
    name: NLayerDiscriminator
    ndf: 64
    n_layers: 3
    <<: *defaults
  gan_mode: lsgan

dataset:
  train:
L
LielinJiang 已提交
29
    name: UnpairedDataset
L
LielinJiang 已提交
30
    dataroot: data/cityscapes
L
LielinJiang 已提交
31
    num_workers: 0
L
LielinJiang 已提交
32 33 34 35 36 37 38
    phase: train
    max_dataset_size: inf
    direction: AtoB
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 50
L
LielinJiang 已提交
39 40 41
    transforms:
      - name: Resize
        size: [286, 286]
L
LielinJiang 已提交
42
        interpolation: 2 #cv2.INTER_CUBIC
L
LielinJiang 已提交
43 44 45 46 47 48 49 50
      - name: RandomCrop
        output_size: [256, 256]
      - name: RandomHorizontalFlip
        prob: 0.5
      - name: Permute
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
L
LielinJiang 已提交
51 52 53 54 55 56 57 58 59
  test:
    name: SingleDataset
    dataroot: data/cityscapes/testB
    max_dataset_size: inf
    direction: BtoA
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 50
L
LielinJiang 已提交
60 61 62
    transforms:
      - name: Resize
        size: [256, 256]
L
LielinJiang 已提交
63
        interpolation: 2 #cv2.INTER_CUBIC
L
LielinJiang 已提交
64 65 66 67
      - name: Permute
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
L
LielinJiang 已提交
68 69 70 71

optimizer:
  name: Adam
  beta1: 0.5
L
LielinJiang 已提交
72 73 74 75 76 77

lr_scheduler:
  name: linear
  learning_rate: 0.0002
  start_epoch: 100
  decay_epochs: 100
L
LielinJiang 已提交
78 79 80 81 82 83 84

log_config:
  interval: 100
  visiual_interval: 500

snapshot_config:
  interval: 5