text: # model settings
  model = dict(
      type='TTFNet',
      # pretrained='modelzoo://resnet18',
      pretrained='/disk1/feigao/gits/Pedestron/models_pretrained/resnet18-5c106cde.pth',
      backbone=dict(
          type='ResNet',
          depth=18,
          num_stages=4,
          out_indices=(0, 1, 2, 3),
          frozen_stages=1,
          norm_eval=False,
          style='pytorch'),
      neck=None,
      bbox_head=dict(
          type='TTFHead',
          inplanes=(64, 128, 256, 512),
          head_conv=128,
          wh_conv=64,
          hm_head_conv_num=2,
          wh_head_conv_num=1,
          num_classes=2,
          wh_offset_base=16,
          wh_agnostic=True,
          wh_gaussian=True,
          shortcut_cfg=(1, 2, 3),
          norm_cfg=dict(type='BN'),
          alpha=0.54,
          hm_weight=1.,
          wh_weight=5.))
  cudnn_benchmark = True
  # training and testing settings
  train_cfg = dict(
      vis_every_n_iters=100,
      debug=False)
  test_cfg = dict(
      score_thr=0.01,
      max_per_img=100)
  # dataset settings
  dataset_type = 'CocoDataset'
  data_root = '/disk1/feigao/gits/Pedestron/datasets/CityPersons'
  img_norm_cfg = dict(
      mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
  train_pipeline = [
      dict(type='LoadImageFromFile'),
      dict(type='LoadAnnotations', with_bbox=True),
      # dict(type='Resize', img_scale=[(1216, 608), (2048, 1024)], keep_ratio=False),
      dict(type='Resize', img_scale=(2048, 1024), keep_ratio=False),
      dict(type='RandomFlip', flip_ratio=0.5),
      dict(type='Normalize', **img_norm_cfg),
      dict(type='Pad', size_divisor=32),
      dict(type='DefaultFormatBundle'),
      dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
  ]
  test_pipeline = [
      dict(type='LoadImageFromFile'),
      dict(
          type='MultiScaleFlipAug',
          img_scale=(2048, 1024),
          flip=False,
          transforms=[
              dict(type='Resize', keep_ratio=False),
              dict(type='RandomFlip'),
              dict(type='Normalize', **img_norm_cfg),
              dict(type='Pad', size_divisor=32),
              dict(type='ImageToTensor', keys=['img']),
              dict(type='Collect', keys=['img']),
          ])
  ]
  data = dict(
      imgs_per_gpu=6,
      workers_per_gpu=2,
      train=dict(
          type=dataset_type,
          ann_file=data_root + '/train.json',
          img_prefix=data_root,
          pipeline=train_pipeline),
      val=dict(
          type=dataset_type,
          ann_file=data_root + '/val_gt_for_mmdetction.json',
          img_prefix=data_root + '/leftImg8bit_trainvaltest/leftImg8bit/val/', 
          pipeline=test_pipeline),
      test=dict(
          type=dataset_type,
          ann_file=data_root + '/val_gt_for_mmdetction.json',
          img_prefix=data_root + '/leftImg8bit_trainvaltest/leftImg8bit/val/', 
          pipeline=test_pipeline))
  # optimizer
  # origin lr=0.016, origin img_per_gpu=16
  # img_per_gpu->2, lr=lr/8=0.002
  # for --autoscale-lr in train.py, 
  # have 2 gpu, lr=lr*gpu_nums/8=0.0005
  optimizer = dict(type='SGD', lr=0.006, momentum=0.9, weight_decay=0.0004,
                   paramwise_options=dict(bias_lr_mult=2., bias_decay_mult=0.))
  optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
  # learning policy
  lr_config = dict(
      policy='step',
      warmup='linear',
      warmup_iters=500,
      warmup_ratio=1.0 / 5,
      step=[9, 11])
  checkpoint_config = dict(interval=1)
  log_config = dict(
      interval=20,
      hooks=[
          dict(type='TextLoggerHook'),
      ])
  # yapf:enable
  # runtime settings
  total_epochs = 24
  # device_ids = range(8)
  dist_params = dict(backend='nccl')
  log_level = 'INFO'
  work_dir = './work_dirs/citypersons/ttfnet18_1x_cls_2'
  load_from = None
  resume_from = None
  workflow = [('train', 1)]
  