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

# model architecture
Arch:
  name: "RecModel"
  infer_output_key: "features"
  infer_add_softmax: False
H
HydrogenSulfate 已提交
25
  Backbone:
H
HydrogenSulfate 已提交
26
    name: "ResNet50_last_stage_stride1"
W
weishengyu 已提交
27
    pretrained: True
W
dbg  
weishengyu 已提交
28
    stem_act: null
W
weishengyu 已提交
29
  BackboneStopLayer:
W
dbg  
weishengyu 已提交
30
    name: "flatten"
W
weishengyu 已提交
31
  Head:
H
HydrogenSulfate 已提交
32
    name: "FC"
W
weishengyu 已提交
33
    embedding_size: 2048
W
dbg  
weishengyu 已提交
34
    class_num: 751
W
weishengyu 已提交
35 36 37 38 39
# loss function config for traing/eval process
Loss:
  Train:
    - CELoss:
        weight: 1.0
W
weishengyu 已提交
40
        epsilon: 0.1
W
dbg  
weishengyu 已提交
41
    - TripletLossV2:
W
weishengyu 已提交
42
        weight: 1.0
W
weishengyu 已提交
43 44
        margin: 0.3
        normalize_feature: false
W
weishengyu 已提交
45 46 47 48 49
  Eval:
    - CELoss:
        weight: 1.0

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

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

    Gallery:
      dataset:
        name: "VeriWild"
W
weishengyu 已提交
118 119
        image_root: "./dataset/market1501"
        cls_label_path: "./dataset/market1501/bounding_box_test.txt"
W
weishengyu 已提交
120 121
        transform_ops:
          - ResizeImage:
W
dbg  
weishengyu 已提交
122
              size: [128, 256]
W
weishengyu 已提交
123 124 125 126 127 128
          - NormalizeImage:
              mean: [0.485, 0.456, 0.406]
              std: [0.229, 0.224, 0.225]
              order: ''
      sampler:
        name: DistributedBatchSampler
W
dbg  
weishengyu 已提交
129
        batch_size: 128
W
weishengyu 已提交
130 131 132 133 134 135 136 137 138 139 140
        drop_last: False
        shuffle: False
      loader:
        num_workers: 6
        use_shared_memory: True

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