eeeeeeeeeeeeee3 commited on
Commit
f43666f
·
verified ·
1 Parent(s): ef9d121

Upload configs/training_soccertrack_phase1.yaml with huggingface_hub

Browse files
configs/training_soccertrack_phase1.yaml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Training Configuration for Player-Only Detection - Phase 1 (Head Training)
2
+ # Freeze backbone, train only decoder + classification head
3
+
4
+ # Model Architecture
5
+ model:
6
+ architecture: "detr" # Options: "detr" (vanilla DETR) or "rfdetr" (RF-DETR from Roboflow)
7
+ backbone: "resnet50" # ResNet backbone
8
+ num_classes: 1 # ONLY player
9
+ pretrained: true # Use pre-trained weights
10
+ hidden_dim: 256
11
+ nheads: 8
12
+ num_encoder_layers: 6
13
+ num_decoder_layers: 6
14
+ rfdetr_size: "base"
15
+
16
+ # Progressive Training Settings
17
+ progressive_training:
18
+ freeze_backbone: true # Freeze backbone for Phase 1
19
+ phase: 1
20
+
21
+ # Hyperparameters
22
+ training:
23
+ batch_size: 4 # Increased for more stable gradients
24
+ num_epochs: 15 # Phase 1: 15 epochs (extended from 10)
25
+ learning_rate: 0.0001 # 1e-4 as float (standard LR for head training)
26
+ weight_decay: 0.0001 # 1e-4 as float
27
+ warmup_epochs: 3 # Reduced for faster learning
28
+ gradient_clip: 0.1
29
+ gradient_accumulation_steps: 2
30
+ memory_cleanup_frequency: 10
31
+ adaptive_optimization: true
32
+ target_gpu_utilization: 0.85
33
+ max_ram_usage: 0.80
34
+ adaptive_adjustment_interval: 50
35
+ mixed_precision: true
36
+ compile_model: false
37
+ channels_last: true
38
+ cudnn_benchmark: false # Disable to avoid CUDNN compatibility issues
39
+ tf32: true
40
+ focal_loss:
41
+ enabled: true
42
+ alpha: 0.5
43
+ gamma: 2.0
44
+
45
+ # Optimizer
46
+ optimizer:
47
+ type: "AdamW"
48
+ lr: 0.0001 # 1e-4 as float
49
+ betas: [0.9, 0.999]
50
+ weight_decay: 0.0001 # 1e-4 as float
51
+
52
+ # Learning Rate Schedule
53
+ lr_schedule:
54
+ type: "cosine" # cosine annealing
55
+ warmup_epochs: 3
56
+ min_lr: 0.000001 # 1e-6 as float
57
+
58
+ # Data Augmentation
59
+ augmentation:
60
+ train:
61
+ horizontal_flip: 0.5
62
+ color_jitter:
63
+ brightness: 0.2
64
+ contrast: 0.2
65
+ saturation: 0.2
66
+ hue: 0.1
67
+ random_crop: false
68
+ resize_range: [800, 1333]
69
+ clahe:
70
+ enabled: true
71
+ clip_limit: 2.0
72
+ tile_grid_size: [8, 8]
73
+ motion_blur:
74
+ enabled: true
75
+ prob: 0.2 # Reduced from 0.3
76
+ max_kernel_size: 15
77
+ gaussian_blur:
78
+ enabled: true
79
+ prob: 0.2 # Reduced from 0.3
80
+ kernel_size_range: [3, 7]
81
+ sigma_range: [0.5, 2.0]
82
+ iso_noise:
83
+ enabled: true
84
+ prob: 0.2 # Reduced from 0.3
85
+ noise_level: [5, 25]
86
+ jpeg_compression:
87
+ enabled: true
88
+ prob: 0.2 # Keep at 0.2
89
+ quality_range: [60, 95]
90
+ mixup:
91
+ enabled: true
92
+ prob: 0.2 # Reduced from 0.3
93
+ alpha: 0.2
94
+ mosaic:
95
+ enabled: true
96
+ prob: 0.3 # Reduced from 0.5
97
+ min_scale: 0.4
98
+ max_scale: 1.0
99
+ val:
100
+ resize: 1333
101
+
102
+ # Dataset
103
+ dataset:
104
+ train_path: "/workspace/soccer_coach_cv/datasets/soccertrack/train"
105
+ val_path: "/workspace/soccer_coach_cv/datasets/soccertrack/val"
106
+ num_workers: 4
107
+ pin_memory: true
108
+ prefetch_factor: 2
109
+ persistent_workers: false
110
+
111
+ # Checkpoint Settings
112
+ checkpoint:
113
+ save_dir: "models/checkpoints"
114
+ save_frequency: 999
115
+ save_every_epoch: true
116
+ keep_last_lightweight: 20
117
+ save_best: false
118
+ metric: "mAP"
119
+ use_lightweight_only: true
120
+
121
+ # Evaluation
122
+ evaluation:
123
+ iou_thresholds: [0.5, 0.75]
124
+ max_detections: 100
125
+
126
+ # Logging
127
+ logging:
128
+ log_dir: "logs"
129
+ tensorboard: true
130
+ mlflow: true
131
+ mlflow_tracking_uri: "file:./mlruns"
132
+ mlflow_experiment_name: "detr_training_player_phase1"
133
+ mlflow_log_models: true
134
+ print_frequency: 20
135
+ log_every_n_steps: 50