-
Notifications
You must be signed in to change notification settings - Fork 530
/
Copy pathroboflow_detection_dataset_params.yaml
99 lines (92 loc) · 3.92 KB
/
roboflow_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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
data_dir: /data/rf100
dataset_name: # Set the name of the dataset you want to use (e.g. "digits-t2eg6")
train_dataset_params:
data_dir: ${..data_dir} # root path to Robflow datasets
dataset_name: ${..dataset_name}
split: train
input_dim: [640, 640]
cache_dir:
cache: False
ignore_empty_annotations: False
transforms:
- DetectionMosaic:
input_dim: ${dataset_params.train_dataset_params.input_dim}
prob: 1.
- DetectionRandomAffine:
degrees: 0. # rotation degrees, randomly sampled from [-degrees, degrees]
translate: 0.1 # image translation fraction
scales: [ 0.5, 1.5 ] # random rescale range (keeps size by padding/cropping) after mosaic transform.
shear: 0.0 # shear degrees, randomly sampled from [-degrees, degrees]
target_size: ${dataset_params.train_dataset_params.input_dim}
filter_box_candidates: False # 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 filter_box_candidates = True
ar_thr: 20 # aspect ratio threshold when filter_box_candidates = True
border_value: 128
# - 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}
- DetectionStandardize:
max_value: 255.
- 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
verbose: 0
train_dataloader_params:
shuffle: True
batch_size: 16
min_samples: 512
num_workers: 4
drop_last: False
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_dir} # root path to Robflow datasets
dataset_name: ${..dataset_name}
split: valid
input_dim: [640, 640]
cache_dir:
cache: False
ignore_empty_annotations: False
transforms:
- DetectionPaddedRescale:
input_dim: ${dataset_params.val_dataset_params.input_dim}
pad_value: 114
- DetectionStandardize:
max_value: 255.
- 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
verbose: 0
val_dataloader_params:
batch_size: 32
num_workers: 4
drop_last: False
shuffle: False
pin_memory: True
collate_fn: # collate function for valset
_target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
_convert_: all