Upload configs/ablations.yaml with huggingface_hub
Browse files- configs/ablations.yaml +142 -0
configs/ablations.yaml
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ablation Study Configurations
|
| 2 |
+
#
|
| 3 |
+
# Each ablation isolates one variable to measure its contribution.
|
| 4 |
+
# Run: python scripts/run_ablations.py --config configs/ablations.yaml
|
| 5 |
+
#
|
| 6 |
+
# Baseline: SCRFD-34G with default settings
|
| 7 |
+
|
| 8 |
+
ablations:
|
| 9 |
+
# 1. Sample Redistribution (SCRFD's key contribution)
|
| 10 |
+
sample_redistribution:
|
| 11 |
+
description: "Impact of large-scale crops on small face detection"
|
| 12 |
+
experiments:
|
| 13 |
+
- name: "baseline_crops"
|
| 14 |
+
data.crop_scales: [0.3, 0.45, 0.6, 0.8, 1.0]
|
| 15 |
+
note: "Standard crops only (no SR)"
|
| 16 |
+
- name: "extended_crops"
|
| 17 |
+
data.crop_scales: [0.3, 0.45, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0]
|
| 18 |
+
note: "Full Sample Redistribution (SCRFD default)"
|
| 19 |
+
- name: "extreme_crops"
|
| 20 |
+
data.crop_scales: [0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.0]
|
| 21 |
+
note: "Even larger crops — test limits"
|
| 22 |
+
|
| 23 |
+
# 2. Loss Function Choice
|
| 24 |
+
loss_functions:
|
| 25 |
+
description: "GFL vs Focal Loss for classification"
|
| 26 |
+
experiments:
|
| 27 |
+
- name: "gfl_diou"
|
| 28 |
+
model.losses.cls: gfl
|
| 29 |
+
model.losses.reg: diou
|
| 30 |
+
note: "SCRFD default"
|
| 31 |
+
- name: "focal_diou"
|
| 32 |
+
model.losses.cls: focal
|
| 33 |
+
model.losses.reg: diou
|
| 34 |
+
note: "Standard focal loss"
|
| 35 |
+
- name: "gfl_smoothl1"
|
| 36 |
+
model.losses.cls: gfl
|
| 37 |
+
model.losses.reg: smooth_l1
|
| 38 |
+
note: "GFL + Smooth L1 regression"
|
| 39 |
+
|
| 40 |
+
# 3. Anchor Matching Strategy
|
| 41 |
+
matching:
|
| 42 |
+
description: "ATSS vs fixed IoU threshold matching"
|
| 43 |
+
experiments:
|
| 44 |
+
- name: "atss_k9"
|
| 45 |
+
model.matching.type: atss
|
| 46 |
+
model.matching.topk: 9
|
| 47 |
+
note: "ATSS with k=9 (SCRFD default)"
|
| 48 |
+
- name: "atss_k5"
|
| 49 |
+
model.matching.type: atss
|
| 50 |
+
model.matching.topk: 5
|
| 51 |
+
note: "ATSS with smaller k"
|
| 52 |
+
- name: "iou_035"
|
| 53 |
+
model.matching.type: iou
|
| 54 |
+
model.matching.pos_iou: 0.35
|
| 55 |
+
model.matching.neg_iou: 0.3
|
| 56 |
+
note: "Fixed IoU (TinaFace-style lower threshold)"
|
| 57 |
+
- name: "iou_050"
|
| 58 |
+
model.matching.type: iou
|
| 59 |
+
model.matching.pos_iou: 0.5
|
| 60 |
+
model.matching.neg_iou: 0.4
|
| 61 |
+
note: "Standard IoU threshold"
|
| 62 |
+
|
| 63 |
+
# 4. Robustness Augmentations
|
| 64 |
+
robustness:
|
| 65 |
+
description: "Impact of blur/compression/lighting augmentations"
|
| 66 |
+
experiments:
|
| 67 |
+
- name: "no_robustness"
|
| 68 |
+
data.robustness_augmentation: false
|
| 69 |
+
note: "Standard aug only"
|
| 70 |
+
- name: "blur_only"
|
| 71 |
+
data.robustness_augmentation: true
|
| 72 |
+
data.robustness_blur_prob: 0.3
|
| 73 |
+
data.robustness_jpeg_prob: 0.0
|
| 74 |
+
data.robustness_lowlight_prob: 0.0
|
| 75 |
+
note: "Blur augmentation only"
|
| 76 |
+
- name: "compression_only"
|
| 77 |
+
data.robustness_augmentation: true
|
| 78 |
+
data.robustness_blur_prob: 0.0
|
| 79 |
+
data.robustness_jpeg_prob: 0.3
|
| 80 |
+
data.robustness_lowlight_prob: 0.0
|
| 81 |
+
note: "JPEG compression only"
|
| 82 |
+
- name: "full_robustness"
|
| 83 |
+
data.robustness_augmentation: true
|
| 84 |
+
note: "All robustness augmentations"
|
| 85 |
+
|
| 86 |
+
# 5. GroupNorm vs BatchNorm
|
| 87 |
+
normalization:
|
| 88 |
+
description: "GN vs BN (TinaFace found GN better at small batch sizes)"
|
| 89 |
+
experiments:
|
| 90 |
+
- name: "group_norm"
|
| 91 |
+
model.neck.use_gn: true
|
| 92 |
+
model.head.use_gn: true
|
| 93 |
+
note: "GroupNorm (SCRFD/TinaFace default)"
|
| 94 |
+
- name: "batch_norm"
|
| 95 |
+
model.neck.use_gn: false
|
| 96 |
+
model.head.use_gn: false
|
| 97 |
+
note: "Standard BatchNorm"
|
| 98 |
+
|
| 99 |
+
# 6. Input Resolution
|
| 100 |
+
input_resolution:
|
| 101 |
+
description: "Trade-off between resolution and speed for tiny faces"
|
| 102 |
+
experiments:
|
| 103 |
+
- name: "res_320"
|
| 104 |
+
data.input_size: 320
|
| 105 |
+
inference.input_size: 320
|
| 106 |
+
- name: "res_480"
|
| 107 |
+
data.input_size: 480
|
| 108 |
+
inference.input_size: 480
|
| 109 |
+
- name: "res_640"
|
| 110 |
+
data.input_size: 640
|
| 111 |
+
inference.input_size: 640
|
| 112 |
+
- name: "res_960"
|
| 113 |
+
data.input_size: 960
|
| 114 |
+
inference.input_size: 960
|
| 115 |
+
note: "Higher res for tiny faces (+5-10% Hard AP, ~4x slower)"
|
| 116 |
+
|
| 117 |
+
# 7. Landmark Multi-Task Learning
|
| 118 |
+
landmarks:
|
| 119 |
+
description: "RetinaFace finding: auxiliary landmark loss improves detection"
|
| 120 |
+
experiments:
|
| 121 |
+
- name: "no_landmarks"
|
| 122 |
+
model.head.use_landmarks: false
|
| 123 |
+
- name: "with_landmarks"
|
| 124 |
+
model.head.use_landmarks: true
|
| 125 |
+
model.losses.lmk_weight: 0.1
|
| 126 |
+
note: "Requires RetinaFace landmark annotations"
|
| 127 |
+
|
| 128 |
+
# 8. Tracker Configuration
|
| 129 |
+
tracking:
|
| 130 |
+
description: "ByteTrack hyperparameter sensitivity"
|
| 131 |
+
experiments:
|
| 132 |
+
- name: "no_tracking"
|
| 133 |
+
engine.use_tracking: false
|
| 134 |
+
- name: "conservative"
|
| 135 |
+
engine.tracker.high_thresh: 0.6
|
| 136 |
+
engine.tracker.low_thresh: 0.2
|
| 137 |
+
engine.tracker.max_lost: 15
|
| 138 |
+
- name: "aggressive"
|
| 139 |
+
engine.tracker.high_thresh: 0.3
|
| 140 |
+
engine.tracker.low_thresh: 0.05
|
| 141 |
+
engine.tracker.max_lost: 60
|
| 142 |
+
note: "More tracks, more false positives"
|