wuji3/visiondk

How to use class-level augment in visiondk/configs/classification/complete.yaml ?

Opened this issue · 0 comments

"""
model:
choice: torchvision-swin_t # torchvision- or custom-
kwargs: {} # kwargs feed into torchvision-style models.init
num_classes: 5
pretrained: True
backbone_freeze: False
bn_freeze: False
bn_freeze_affine: False
attention_pool: False
data:
root: data
nw: 2
imgsz:
- 480
- 480
train:
bs: 16 # one gpu if DDP
common_aug: null
class_aug: null
augment: # refer to utils/transforms.py
random_choice:
- random_color_jitter:
prob: 0.5
brightness: 0.1
contrast: 0.1
saturation: 0.1
hue: 0.1
- random_cutout:
n_holes: 4
length: 80
ratio: 0.2
prob: 0.5
random_crop_and_resize:
size:
- 480
- 480
to_tensor: no_params
normalize:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
aug_epoch: 80
val:
bs: 1
augment:
resize:
size:
- 480
- 480
to_tensor: no_params
normalize:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
hyp:
epochs: 100
lr0: 0.001 # sgd=1e-2, adam=1e-3
lrf_ratio: null # decay to lrf_ratio * lr0, if None, 0.1
momentum: 0.937
weight_decay: 0.0005
warmup_momentum: 0.8
warm_ep: 3
loss:
ce: True
bce:
- False
- 0.5
- True
label_smooth: 0.1
strategy:
prog_learn: False
mixup:
- 0.01 # prob
- [0,70] # [start, end)
focal: # Only support BCE
- False # turn-on-or-off
- 0.25 # alpha
- 1.5 # gamma
ohem: # only support CE
- False
- 8 # min_kept
- 0.7 # thresh_prob
- 255 # ignore_index
optimizer:
- sgd # sgd adam or sam
- False
scheduler: cosine_with_warm # linear or cosine
"""

in line 18 and line 19, I set

common_aug: 1 2 3
class_aug: null

It does not work, what I can do to take it to come into effect?

Thanks for your attention!