-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
35 lines (27 loc) · 1.18 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
import datetime
class DefaultConfigs(object):
timestamp = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
#1.string parameters
x_train_dir = r'/home/star/ac/large_data/train/Images'
y_train_dir = r'/home/star/ac/large_data/train/masks'
x_valid_dir = r'/home/star/ac/large_data/valid/Images'
y_valid_dir = r'/home/star/ac/large_data/valid/masks'
pre_weights = r'pretrain_model/mobilenet_v2-6a65762b.pth'
model_save_path = r'tmp/{}/'.format(timestamp)
logs = '/logs'
visible_devices = '0' # modify according to your hardware
#2. numeric parameters
epoch = 120
per_batch_size = 8 # modify according to your hardware, GTX 1070 uses 6.
nb_gpus = 1 # GPU cards number, modify according to your hardware.
batch_size = per_batch_size * nb_gpus
img_height = 480
img_width = 640
nb_classes = 3 #(denatl, gum, background)
class_ID = [0, 1, 2] #(denatl-0, gum-1, background-2)
init_lr = 1e-3
lr_decay = 1e-4
weight_decay = 5e-4
model_name = "mobilenet"#'xception resnet101 mobilenet
choice_head = "design"#"design","build_aspp_decoder"
config = DefaultConfigs()