-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.py
38 lines (31 loc) · 1.03 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from yacs.config import CfgNode as CN
_C = CN()
_C.DATASET = CN()
_C.DATASET.DIR = ""
_C.DATASET.CACHE_DIR = ""
_C.DATASET.IMAGE_EXT = ""
_C.DATASET.KEY_POINTS = 0
_C.DATASET.CACHED_IMAGE_SIZE = []
_C.DATASET.PIXEL_SIZE = []
_C.DATASET.AUGMENTATION = CN()
_C.DATASET.AUGMENTATION.REVERSE_AXIS = False
_C.DATASET.AUGMENTATION.FLIP = False
_C.DATASET.AUGMENTATION.FLIP_PAIRS = []
_C.DATASET.AUGMENTATION.ROTATION_FACTOR = 5
_C.DATASET.AUGMENTATION.INTENSITY_FACTOR = 0.25
_C.DATASET.AUGMENTATION.SF = 0.2
_C.DATASET.AUGMENTATION.TRANSLATION_X = 25
_C.DATASET.AUGMENTATION.TRANSLATION_Y = 50
_C.DATASET.AUGMENTATION.ELASTIC_STRENGTH = 50
_C.DATASET.AUGMENTATION.ELASTIC_SMOOTHNESS = 10
_C.TRAIN = CN()
_C.TRAIN.BATCH_SIZE = 1
_C.TRAIN.LR = 0.001
_C.TRAIN.EPOCHS = 10
_C.MODEL = CN(new_allowed=True)
_C.MODEL.NAME = 'Unet'
def get_cfg_defaults():
"""Get a yacs CfgNode object with default values for my_project."""
# Return a clone so that the defaults will not be altered
# This is for the "local variable" use pattern
return _C.clone()