-
Notifications
You must be signed in to change notification settings - Fork 33
/
FaceViT_tiny_patch9_112_WebFace42M_CosFace_pfc10_droppath005_mask0_1n8c_dp_mp_fp16o1.yaml
130 lines (119 loc) · 2.61 KB
/
FaceViT_tiny_patch9_112_WebFace42M_CosFace_pfc10_droppath005_mask0_1n8c_dp_mp_fp16o1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# global configs
Global:
task_type: recognition
train_epoch_func: default_train_one_epoch
eval_func: face_verification_eval
checkpoint: null
pretrained_model: null
output_dir: ./output/
device: gpu
save_interval: 1
max_num_latest_checkpoint: 5
eval_during_train: True
eval_interval: 4000
eval_unit: "step"
accum_steps: 1
epochs: 40
print_batch_step: 200
use_visualdl: True
seed: 2022
# FP16 setting
FP16:
level: O1
GradScaler:
init_loss_scaling: 27648.0
DistributedStrategy:
data_parallel: True
# model architecture
Model:
name: FaceViT_tiny_patch9_112
mask_ratio: 0.0
drop_path_rate: 0.05
num_features : 512
class_num: 2059906
pfc_config:
sample_ratio: 1.0
model_parallel: True
sparse_update: False
# loss function config for traing/eval process
Loss:
Train:
- MarginLoss:
m1: 1.0
m2: 0.0
m3: 0.4
s: 64.0
model_parallel: True
weight: 1.0
LRScheduler:
name: Poly
learning_rate: 0.001
decay_unit: step
warmup_epochs: 4
warmup_end_lr: 0.001
Optimizer:
name: AdamW
betas: (0.9, 0.999)
epsilon: 1e-8
weight_decay: 0.1
grad_clip:
name: ClipGradByGlobalNorm
clip_norm: 5.0
no_clip_list: ['dist']
# data loader for train and eval
DataLoader:
Train:
dataset:
name: FaceIdentificationDataset
image_root: ./dataset/WebFace42M
cls_label_path: ./dataset/WebFace42M/label.txt
transform_ops:
- DecodeImage:
to_rgb: True
channel_first: False
- RandFlipImage:
flip_code: 1
- NormalizeImage:
scale: 1.0/255.0
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]
order: ''
- ToCHWImage:
sampler:
name: DistributedBatchSampler
batch_size: 256
drop_last: False
shuffle: True
loader:
num_workers: 8
use_shared_memory: True
Eval:
dataset:
name: FaceVerificationDataset
image_root: ./dataset/WebFace42M/agedb_30
cls_label_path: ./dataset/WebFace42M/agedb_30/label.txt
transform_ops:
- DecodeImage:
to_rgb: True
channel_first: False
- NormalizeImage:
scale: 1.0/255.0
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]
order: ''
- ToCHWImage:
sampler:
name: BatchSampler
batch_size: 128
drop_last: False
shuffle: False
loader:
num_workers: 0
use_shared_memory: True
Metric:
Eval:
- LFWAcc:
flip_test: True
Export:
export_type: onnx
input_shape: [None, 3, 112, 112]