strong_baseline_baseline.yaml 3.5 KB
Newer Older
W
weishengyu 已提交
1 2 3 4 5 6
# global configs
Global:
  checkpoints: null
  pretrained_model: null
  output_dir: "./output/"
  device: "gpu"
W
weishengyu 已提交
7
  save_interval: 10
W
weishengyu 已提交
8
  eval_during_train: True
W
dbg  
weishengyu 已提交
9
  eval_interval: 10
W
weishengyu 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  epochs: 120
  print_batch_step: 10
  use_visualdl: False
  # used for static mode and model export
  image_shape: [3, 256, 128]
  save_inference_dir: "./inference"
  eval_mode: "retrieval"

# model architecture
Arch:
  name: "RecModel"
  infer_output_key: "features"
  infer_add_softmax: False
  Backbone:
    name: "ResNet50"
    pretrained: True
W
dbg  
weishengyu 已提交
26
    stem_act: null
W
weishengyu 已提交
27
  BackboneStopLayer:
W
dbg  
weishengyu 已提交
28
    name: "flatten"
W
weishengyu 已提交
29 30 31
  Head:
    name: "FC"
    embedding_size: 2048
W
dbg  
weishengyu 已提交
32
    class_num: 751
W
weishengyu 已提交
33 34 35 36 37 38

# loss function config for traing/eval process
Loss:
  Train:
    - CELoss:
        weight: 1.0
W
weishengyu 已提交
39
        epsilon: 0.1
W
dbg  
weishengyu 已提交
40
    - TripletLossV2:
W
weishengyu 已提交
41
        weight: 1.0
W
weishengyu 已提交
42 43
        margin: 0.3
        normalize_feature: false
W
weishengyu 已提交
44 45 46 47 48 49 50 51
  Eval:
    - CELoss:
        weight: 1.0

Optimizer:
  name: Adam
  lr:
    name: Piecewise
W
weishengyu 已提交
52
    decay_epochs: [30, 60]
W
dbg  
weishengyu 已提交
53
    values: [0.00035, 0.000035, 0.0000035]
W
weishengyu 已提交
54 55
    warmup_epoch: 10
    warmup_start_lr: 0.0000035
W
weishengyu 已提交
56 57 58 59 60 61 62 63 64
  regularizer:
    name: 'L2'
    coeff: 0.0005

# data loader for train and eval
DataLoader:
  Train:
    dataset:
        name: "VeriWild"
W
weishengyu 已提交
65 66
        image_root: "./dataset/market1501"
        cls_label_path: "./dataset/market1501/bounding_box_train.txt"
W
weishengyu 已提交
67 68 69 70 71
        transform_ops:
          - DecodeImage:
              to_rgb: True
              channel_first: False
          - ResizeImage:
W
dbg  
weishengyu 已提交
72
              size: [128, 256]
W
weishengyu 已提交
73 74
          - RandFlipImage:
              flip_code: 1
W
dbg  
weishengyu 已提交
75 76
          - Pad:
              padding: 10
W
weishengyu 已提交
77
          - RandCropImage:
W
dbg  
weishengyu 已提交
78
              size: [128, 256]
W
weishengyu 已提交
79 80
              scale: [0.8022, 0.8022]
              ratio: [0.5, 0.5]
W
weishengyu 已提交
81 82 83 84 85 86
          - NormalizeImage:
              scale: 0.00392157
              mean: [0.485, 0.456, 0.406]
              std: [0.229, 0.224, 0.225]
              order: ''
    sampler:
W
weishengyu 已提交
87
        name: DistributedRandomIdentitySampler
W
dbg  
weishengyu 已提交
88
        batch_size: 64
W
weishengyu 已提交
89
        num_instances: 4
W
weishengyu 已提交
90 91 92 93 94 95 96 97 98
        drop_last: True
        shuffle: True
    loader:
        num_workers: 6
        use_shared_memory: True
  Eval:
    Query:
      dataset:
        name: "VeriWild"
W
weishengyu 已提交
99 100
        image_root: "./dataset/market1501"
        cls_label_path: "./dataset/market1501/query.txt"
W
weishengyu 已提交
101 102 103 104 105
        transform_ops:
          - DecodeImage:
              to_rgb: True
              channel_first: False
          - ResizeImage:
W
dbg  
weishengyu 已提交
106
              size: [128, 256]
W
weishengyu 已提交
107 108 109 110 111 112 113
          - NormalizeImage:
              scale: 0.00392157
              mean: [0.485, 0.456, 0.406]
              std: [0.229, 0.224, 0.225]
              order: ''
      sampler:
        name: DistributedBatchSampler
W
dbg  
weishengyu 已提交
114
        batch_size: 128
W
weishengyu 已提交
115 116 117 118 119 120 121 122 123
        drop_last: False
        shuffle: False
      loader:
        num_workers: 6
        use_shared_memory: True

    Gallery:
      dataset:
        name: "VeriWild"
W
weishengyu 已提交
124 125
        image_root: "./dataset/market1501"
        cls_label_path: "./dataset/market1501/bounding_box_test.txt"
W
weishengyu 已提交
126 127 128 129 130
        transform_ops:
          - DecodeImage:
              to_rgb: True
              channel_first: False
          - ResizeImage:
W
dbg  
weishengyu 已提交
131
              size: [128, 256]
W
weishengyu 已提交
132 133 134 135 136 137 138
          - NormalizeImage:
              scale: 0.00392157
              mean: [0.485, 0.456, 0.406]
              std: [0.229, 0.224, 0.225]
              order: ''
      sampler:
        name: DistributedBatchSampler
W
dbg  
weishengyu 已提交
139
        batch_size: 128
W
weishengyu 已提交
140 141 142 143 144 145 146 147 148 149 150 151
        drop_last: False
        shuffle: False
      loader:
        num_workers: 6
        use_shared_memory: True

Metric:
  Eval:
    - Recallk:
        topk: [1, 5]
    - mAP: {}