general:
  exp_name: meta_portrait_base
  random_seed: 365

dataset:
  frame_shape: [256, 256, 3]
  eye_enhance: True
  mouth_enhance: True
  ldmkimg: True
  ldmk_idx: [521, 505, 338, 398, 347, 35, 191, 30, 32, 207, 630, 629, 319, 4, 541, 61, 637, 660, 638, 587, 273, 590, 269, 432, 118,327, 12, 373, 58, 619, 466, 469, 464, 308, 152, 305, 150, 411, 635, 634, 564, 250, 443, 129, 364, 322, 49, 7, 361, 105, 434, 120, 500, 186, 575, 261, 636, 74]
  
  train_data: [personalized]
  train_data_weight: [1]

  personalized:
    root: ../data/   
    crop_expand: 1.3
    crop_offset_y: 0.2
    static_bbox: True
  
model:
  arch: 'SPADEID'
  warp_ckpt: results/ckpt/meta_portrait_base/ckpt_60_2023-10-09-10-50-59.pth.tar
  common:
    num_channels: 3

  kp_detector:
    temperature: 0.1
    block_expansion: 32
    max_features: 1024
    scale_factor: 0.25
    num_blocks: 5
  generator:
    block_expansion: 64
    max_features: 512
    with_gaze_htmap: True
    with_mouth_line: True
    with_ldmk_line: True
    use_IN: True
    ladder: 
      need_feat: False
      use_mask: False
      label_nc: 0
      z_dim: 512
    dense_motion_params:
      label_nc: 0
      ldmkimg: True
      occlusion: True
      block_expansion: 64
      max_features: 1024
      num_blocks: 5
      dec_lease: 2
      Lwarp: True
      AdaINc: 512
  discriminator:
    scales: [1]
    block_expansion: 32
    max_features: 512
    num_blocks: 4
    use_kp: False

train:
  epochs: 60
  batch_size: 2
  dataset_repeats: 1

  epoch_milestones: [45]
  lr_generator: 2.0e-4
  lr_discriminator: 2.0e-4
  warplr_tune: 0.1

  scales: [1, 0.5, 0.25, 0.125]

  loss_weights:
    generator_gan: 1
    discriminator_gan: 1
    feature_matching: [10, 10, 10, 10]
    perceptual: [10, 10, 10, 10, 10]
    id: 20
    eye_enhance: 50
    mouth_enhance: 50

  tensorboard: True
  event_save_path: ./results/events/
  event_save_freq: 500

  ckpt_save_path: ./results/ckpt/
  ckpt_save_iter_freq: 5000
  ckpt_save_freq: 10
  print_freq: 1000
