jeetv commited on
Commit
32d059b
·
verified ·
1 Parent(s): b59168f

Create config.yaml

Browse files
Files changed (1) hide show
  1. config.yaml +104 -0
config.yaml ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ TASK: classification
2
+ DATA:
3
+ dataset_name: mvfouls
4
+ data_dir: /home/vorajv/opensportslib/SoccerNet/mvfouls
5
+ data_modality: video
6
+ view_type: multi # multi or single
7
+ num_classes: 8 # mvfoul
8
+ train:
9
+ type: annotations_train.json
10
+ video_path: ${DATA.data_dir}/train
11
+ path: ${DATA.train.video_path}/annotations-train.json
12
+ dataloader:
13
+ batch_size: 8
14
+ shuffle: true
15
+ num_workers: 4
16
+ pin_memory: true
17
+ valid:
18
+ type: annotations_valid.json
19
+ video_path: ${DATA.data_dir}/valid
20
+ path: ${DATA.valid.video_path}/annotations-valid.json
21
+ dataloader:
22
+ batch_size: 1
23
+ num_workers: 1
24
+ shuffle: false
25
+ test:
26
+ type: annotations_test.json
27
+ video_path: ${DATA.data_dir}/test
28
+ path: ${DATA.test.video_path}/annotations-test.json
29
+ dataloader:
30
+ batch_size: 1
31
+ num_workers: 1
32
+ shuffle: false
33
+ num_frames: 16 # 8 before + 8 after the foul
34
+ input_fps: 25 # Original FPS of video
35
+ target_fps: 17 # Temporal downsampling to 1s clip (approx)
36
+ start_frame: 63 # Start frame of clip relative to foul frame
37
+ end_frame: 87 # End frame of clip relative to foul frame
38
+ frame_size: [224, 224] # Spatial resolution (HxW)
39
+ augmentations:
40
+ random_affine: true
41
+ translate: [0.1, 0.1]
42
+ affine_scale: [0.9, 1.0]
43
+ random_perspective: true
44
+ distortion_scale: 0.3
45
+ perspective_prob: 0.5
46
+ random_rotation: true
47
+ rotation_degrees: 5
48
+ color_jitter: true
49
+ jitter_params: [0.2, 0.2, 0.2, 0.1] # brightness, contrast, saturation, hue
50
+ random_horizontal_flip: true
51
+ flip_prob: 0.5
52
+ random_crop: false
53
+
54
+ MODEL:
55
+ type: custom # huggingface, custom
56
+ backbone:
57
+ type: mvit_v2_s # video_mae, r3d_18, mc3_18, r2plus1d_18, s3d, mvit_v2_s
58
+ neck:
59
+ type: MV_Aggregate
60
+ agr_type: max # max, mean, attention
61
+ head:
62
+ type: MV_LinearLayer
63
+ pretrained_model: mvit_v2_s # MCG-NJU/videomae-base, OpenGVLab/VideoMAEv2-Base, r3d_18, mc3_18, r2plus1d_18, s3d, mvit_v2_s
64
+ unfreeze_head: true # for videomae backbone
65
+ unfreeze_last_n_layers: 3 # for videomae backbone
66
+
67
+
68
+ TRAIN:
69
+ monitor: balanced_accuracy # balanced_accuracy, loss
70
+ mode: max # max or min
71
+ enabled: true
72
+ use_weighted_sampler: false
73
+ use_weighted_loss: true
74
+ epochs: 20 #20
75
+ log_interval: 10
76
+ save_every: 2 #5
77
+
78
+ criterion:
79
+ type: CrossEntropyLoss
80
+
81
+ optimizer:
82
+ type: AdamW
83
+ lr: 0.0001 #0.001
84
+ backbone_lr: 0.00005
85
+ head_lr: 0.001
86
+ betas: [0.9, 0.999]
87
+ eps: 0.0000001
88
+ weight_decay: 0.001 #0.01 - videomae, 0.001 - others
89
+ amsgrad: false
90
+
91
+ scheduler:
92
+ type: StepLR
93
+ step_size: 3
94
+ gamma: 0.1
95
+
96
+ SYSTEM:
97
+ log_dir: ./logs
98
+ save_dir: ./checkpoints
99
+ use_seed: false
100
+ seed: 42
101
+ GPU: 4
102
+ device: cuda # auto | cuda | cpu
103
+ gpu_id: 0
104
+