-
Notifications
You must be signed in to change notification settings - Fork 530
/
Copy pathcoco_detection_dataset_params.yaml
83 lines (78 loc) · 3.81 KB
/
coco_detection_dataset_params.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
train_dataset_params:
data_dir: /data/coco # root path to coco data
subdir: images/train2017 # sub directory path of data_dir containing the train data.
json_file: instances_train2017.json # path to coco train json file, data_dir/annotations/train_json_file.
input_dim: [640, 640]
cache_dir:
cache: False
transforms:
- DetectionMosaic:
input_dim: ${dataset_params.train_dataset_params.input_dim}
prob: 1.
- DetectionRandomAffine:
degrees: 10. # rotation degrees, randomly sampled from [-degrees, degrees]
translate: 0.1 # image translation fraction
scales: [ 0.1, 2 ] # random rescale range (keeps size by padding/cropping) after mosaic transform.
shear: 2.0 # shear degrees, randomly sampled from [-degrees, degrees]
target_size: ${dataset_params.train_dataset_params.input_dim}
filter_box_candidates: True # whether to filter out transformed bboxes by edge size, area ratio, and aspect ratio.
wh_thr: 2 # edge size threshold when filter_box_candidates = True (pixels)
area_thr: 0.1 # threshold for area ratio between original image and the transformed one, when when filter_box_candidates = True
ar_thr: 20 # aspect ratio threshold when filter_box_candidates = True
- DetectionMixup:
input_dim: ${dataset_params.train_dataset_params.input_dim}
mixup_scale: [ 0.5, 1.5 ] # random rescale range for the additional sample in mixup
prob: 1.0 # probability to apply per-sample mixup
flip_prob: 0.5 # probability to apply horizontal flip
- DetectionHSV:
prob: 1.0 # probability to apply HSV transform
hgain: 5 # HSV transform hue gain (randomly sampled from [-hgain, hgain])
sgain: 30 # HSV transform saturation gain (randomly sampled from [-sgain, sgain])
vgain: 30 # HSV transform value gain (randomly sampled from [-vgain, vgain])
- DetectionHorizontalFlip:
prob: 0.5 # probability to apply horizontal flip
- DetectionPaddedRescale:
input_dim: ${dataset_params.train_dataset_params.input_dim}
- DetectionTargetsFormatTransform:
input_dim: ${dataset_params.train_dataset_params.input_dim}
output_format: LABEL_CXCYWH
tight_box_rotation: False
class_inclusion_list:
max_num_samples:
with_crowd: False
train_dataloader_params:
shuffle: True
batch_size: 16
num_workers: 8
drop_last: True
pin_memory: True
worker_init_fn:
_target_: super_gradients.training.utils.utils.load_func
dotpath: super_gradients.training.datasets.datasets_utils.worker_init_reset_seed
collate_fn: # collate function for trainset
_target_: super_gradients.training.utils.detection_utils.DetectionCollateFN
val_dataset_params:
data_dir: /data/coco # root path to coco data
subdir: images/val2017 # sub directory path of data_dir containing the train data.
json_file: instances_val2017.json # path to coco train json file, data_dir/annotations/train_json_file.
input_dim: [640, 640]
cache_dir:
cache: False
transforms:
- DetectionPaddedRescale:
input_dim: ${dataset_params.val_dataset_params.input_dim}
- DetectionTargetsFormatTransform:
input_dim: ${dataset_params.val_dataset_params.input_dim}
output_format: LABEL_CXCYWH
tight_box_rotation: False
class_inclusion_list:
max_num_samples:
with_crowd: True
val_dataloader_params:
batch_size: 64
num_workers: 8
drop_last: False
pin_memory: True
collate_fn: # collate function for valset
_target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
_convert_: all