Zorrojurro commited on
Commit
2db56af
·
verified ·
1 Parent(s): 4a0ea4c

Upload config.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. config.yaml +90 -0
config.yaml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================================================
2
+ # CNN-Based Thermal Pattern Analysis — Configuration
3
+ # ============================================================
4
+
5
+ # --- Data ---
6
+ data:
7
+ raw_dir: "data/raw"
8
+ processed_dir: "data/processed"
9
+ sequences_dir: "data/sequences"
10
+ image_size: [224, 224]
11
+ sequence_length: 5 # shorter = more sequences for 90%+ accuracy
12
+ train_split: 0.7
13
+ val_split: 0.15
14
+ test_split: 0.15
15
+ num_workers: 0
16
+
17
+ # --- Preprocessing ---
18
+ preprocessing:
19
+ bilateral_filter:
20
+ d: 9
21
+ sigma_color: 75
22
+ sigma_space: 75
23
+ clahe:
24
+ clip_limit: 2.0
25
+ tile_grid_size: [8, 8]
26
+ normalize: true # Min-Max to [0, 1]
27
+
28
+ # --- Augmentation ---
29
+ augmentation:
30
+ enabled: true
31
+ rotation_limit: 15 # degrees
32
+ horizontal_flip: true
33
+ vertical_flip: false
34
+ brightness_limit: 0.1
35
+ contrast_limit: 0.1
36
+
37
+ # --- Model ---
38
+ model:
39
+ feature_extractor:
40
+ backbone: "resnet18"
41
+ pretrained: true
42
+ in_channels: 1 # grayscale
43
+ embedding_dim: 256
44
+ sequence_analyzer:
45
+ hidden_size: 128
46
+ num_layers: 2
47
+ bidirectional: true
48
+ dropout: 0.3
49
+ attention: true
50
+ anomaly_detector:
51
+ similarity_metric: "cosine"
52
+ threshold: 0.7
53
+
54
+ # --- Training ---
55
+ training:
56
+ epochs: 100
57
+ batch_size: 16
58
+ learning_rate: 0.0003
59
+ weight_decay: 0.00001
60
+ optimizer: "adamw"
61
+ scheduler: "cosine_annealing"
62
+ early_stopping:
63
+ patience: 25
64
+ min_delta: 0.0005
65
+ loss:
66
+ contrastive_weight: 0.0
67
+ triplet_weight: 0.0
68
+ triplet_margin: 1.0
69
+
70
+ # --- Evaluation ---
71
+ evaluation:
72
+ metrics:
73
+ - accuracy
74
+ - precision
75
+ - recall
76
+ - f1_score
77
+ - auc_roc
78
+ grad_cam: true
79
+ confusion_matrix: true
80
+
81
+ # --- Paths ---
82
+ paths:
83
+ checkpoints: "checkpoints"
84
+ logs: "logs"
85
+ results: "results"
86
+ visualizations: "results/visualizations"
87
+
88
+ # --- Device ---
89
+ device: "auto" # auto | cpu | cuda
90
+ seed: 42