Adds config yaml
Browse files- conf/config.yaml +18 -0
- config.py +0 -29
conf/config.yaml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# data:
|
| 2 |
+
train_csv_path: data/diabetic-retinopathy-dataset/train.csv
|
| 3 |
+
val_csv_path: data/diabetic-retinopathy-dataset/val.csv
|
| 4 |
+
|
| 5 |
+
# experiment:
|
| 6 |
+
seed: 42
|
| 7 |
+
batch_size: 128
|
| 8 |
+
num_workers: 2
|
| 9 |
+
use_class_weighting: false
|
| 10 |
+
use_weighted_sampler: false # class weighting and weighted sampler are mutually exclusive
|
| 11 |
+
model_name: "resnet50"
|
| 12 |
+
max_epochs: 50
|
| 13 |
+
image_size: 224
|
| 14 |
+
learning_rate: 3e-4
|
| 15 |
+
use_scheduler: true
|
| 16 |
+
|
| 17 |
+
logs_dir: logs
|
| 18 |
+
checkpoint_dirpath: artifacts/checkpoints
|
config.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 1 |
-
from dataclasses import dataclass
|
| 2 |
-
|
| 3 |
-
@dataclass
|
| 4 |
-
class Config:
|
| 5 |
-
# Data paths
|
| 6 |
-
train_csv_path: str = "data/train.csv"
|
| 7 |
-
val_csv_path: str = "data/val.csv"
|
| 8 |
-
test_csv_path: str = "data/test.csv" # Added for test data
|
| 9 |
-
|
| 10 |
-
# Model parameters
|
| 11 |
-
input_size: tuple[int, int] = (224, 224) # Input image size
|
| 12 |
-
num_classes: int = 5 # Number of output classes
|
| 13 |
-
batch_size: int = 32
|
| 14 |
-
epochs: int = 10
|
| 15 |
-
learning_rate: float = 0.001
|
| 16 |
-
model_architecture: str = "PretrainedResNet50" # Specify the backbone architecture
|
| 17 |
-
loss_function: str = "cross_entropy"
|
| 18 |
-
optimizer: str = "Adam"
|
| 19 |
-
lr_scheduler: str = "StepLR"
|
| 20 |
-
dropout_rate: float = 0.5
|
| 21 |
-
weight_decay: float = 0.001
|
| 22 |
-
early_stopping: bool = True
|
| 23 |
-
use_gpu: bool = True
|
| 24 |
-
random_seed: int = 42
|
| 25 |
-
data_augmentation: bool = True
|
| 26 |
-
|
| 27 |
-
# Model paths
|
| 28 |
-
model_save_path: str = "models/model.pth"
|
| 29 |
-
logs_path: str = "logs/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|