Switch to unified view

a b/configs/gaitbase/gaitbase_hid.yaml
1
data_cfg:
2
  dataset_name: HID
3
  dataset_root: your_path
4
  dataset_partition: ./datasets/HID/HID2023.json
5
  num_workers: 1
6
  remove_no_gallery: false # Remove probe if no gallery for it
7
evaluator_cfg:
8
  enable_float16: true
9
  restore_ckpt_strict: true
10
  restore_hint: 60000
11
  save_name: GaitBase
12
  eval_func: HID_submission
13
  rerank: False
14
  sampler:
15
    batch_shuffle: false
16
    batch_size: 8
17
    sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options:   fixed_unordered
18
    frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
19
  metric: euc # cos
20
  transform:
21
    - type: BaseSilCuttingTransform
22
      img_w: 128
23
loss_cfg:
24
  - loss_term_weight: 1.0
25
    margin: 0.2
26
    type: TripletLoss
27
    log_prefix: triplet
28
  - loss_term_weight: 0.1
29
    scale: 16
30
    type: CrossEntropyLoss
31
    log_prefix: softmax
32
    log_accuracy: true
33
34
35
model_cfg:
36
  model: Baseline
37
  backbone_cfg:
38
    type: ResNet9
39
    block: BasicBlock
40
    channels: # Layers configuration for automatically model construction
41
      - 64
42
      - 128
43
      - 256
44
      - 512
45
    layers:
46
      - 1
47
      - 1
48
      - 1
49
      - 1
50
    strides:
51
      - 1
52
      - 2
53
      - 2
54
      - 1
55
    maxpool: false
56
  SeparateFCs:
57
    in_channels: 512
58
    out_channels: 256
59
    parts_num: 16
60
  SeparateBNNecks:
61
    class_num: 500 # you need to change
62
    in_channels: 256
63
    parts_num: 16
64
  bin_num:
65
    - 16
66
67
optimizer_cfg:
68
  lr: 0.1
69
  momentum: 0.9
70
  solver: SGD
71
  weight_decay: 0.0005
72
73
scheduler_cfg:
74
  gamma: 0.1
75
  milestones: # Learning Rate Reduction at each milestones
76
    - 20000
77
    - 40000
78
  scheduler: MultiStepLR
79
trainer_cfg:
80
  enable_float16: true # half_percesion float for memory reduction and speedup
81
  fix_BN: false
82
  log_iter: 100
83
  restore_ckpt_strict: true
84
  restore_hint: 0
85
  save_iter: 10000
86
  save_name: GaitBase
87
  sync_BN: true
88
  total_iter: 60000
89
  sampler:
90
    batch_shuffle: true
91
    batch_size:
92
      - 16 # TripletSampler, batch_size[0] indicates Number of Identity
93
      - 8 #                 batch_size[1] indicates Samples sequqnce for each Identity
94
    frames_num_fixed: 30 # fixed frames number for training
95
    sample_type: fixed_unordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
96
    type: TripletSampler
97
  transform:
98
    - type: BaseSilCuttingTransform
99
      img_w: 128