-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathade20k.yaml
51 lines (41 loc) · 2.84 KB
/
ade20k.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
DEVICE : cuda # device used for training and evaluation (cpu, cuda, cuda0, cuda1, ...)
SAVE_DIR : 'output' # output folder name used for saving the model, logs and inference results
MODEL:
NAME : SegFormer # name of the model you are using
BACKBONE : MiT-B2 # model variant
PRETRAINED : 'checkpoints/backbones/mit/mit_b2.pth' # backbone model's weight
DATASET:
NAME : ADE20K # dataset name to be trained with (camvid, cityscapes, ade20k)
ROOT : 'data/ADEChallengeData2016' # dataset root path
IGNORE_LABEL : -1
TRAIN:
IMAGE_SIZE : [512, 512] # training image size in (h, w)
BATCH_SIZE : 8 # batch size used to train
EPOCHS : 500 # number of epochs to train
EVAL_INTERVAL : 50 # evaluation interval during training
AMP : false # use AMP in training
DDP : false # use DDP training
LOSS:
NAME : OhemCrossEntropy # loss function name (ohemce, ce, dice)
CLS_WEIGHTS : false # use class weights in loss calculation
OPTIMIZER:
NAME : adamw # optimizer name
LR : 0.001 # initial learning rate used in optimizer
WEIGHT_DECAY : 0.01 # decay rate used in optimizer
SCHEDULER:
NAME : warmuppolylr # scheduler name
POWER : 0.9 # scheduler power
WARMUP : 10 # warmup epochs used in scheduler
WARMUP_RATIO : 0.1 # warmup ratio
EVAL:
MODEL_PATH : 'checkpoints/pretrained/segformer/segformer.b2.ade.pth' # trained model file path
IMAGE_SIZE : [512, 512] # evaluation image size in (h, w)
MSF:
ENABLE : false # multi-scale and flip evaluation
FLIP : true # use flip in evaluation
SCALES : [0.5, 0.75, 1.0, 1.25, 1.5, 1.75] # scales used in MSF evaluation
TEST:
MODEL_PATH : 'checkpoints/pretrained/segformer/segformer.b2.ade.pth' # trained model file path
FILE : 'assests/ade' # filename or foldername
IMAGE_SIZE : [512, 512] # inference image size in (h, w)
OVERLAY : true # save the overlay result (image_alpha+label_alpha)