-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconstants.py
52 lines (38 loc) · 1.32 KB
/
constants.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from enum import Enum
# ************************************************ #
# Parameters
input_shape = (640,192,3)
input_shape_full_size = (1024,320,3)#(1242, 374, 3)
input_channels = input_shape[2]
number_classes = 2
road_color = [255,0,255]
other_road_surface_color = [0,0,0]
background_color = [255,0,0]
system_files = '.DS_Store'
use_unet = True
train_ratio = 0.8 # 80% train, 20% test
assert train_ratio > 0 and train_ratio <= 1
# ************************************************ #
# Dataset Locations
data_train_image_dir = 'data/data_road/training/image_2'
data_train_gt_dir = 'data/data_road/training/gt_image_2'
data_test_image_dir = 'data/data_road/testing/image_2/'
data_location = 'data'
# ************************************************ #
# Model Pre-Trained Weight Locations
resnet_18_model_path = "models/resnet18_imagenet_1000_no_top.h5"
resnet_50_model_path = "models/resnet50_imagenet_1000_no_top.h5"
def get_model_path(resnet_type):
return "models/resnet{}_imagenet_1000_no_top.h5".format(str(resnet_type))
# ************************************************ #
# Model Types
class EncoderType(Enum):
resnet18 = 18
resnet34 = 34
resnet50 = 50
resnet101 = 101
resnet152 = 152
classes = 1000
dataset = 'imagenet'
include_top = False
models_location = "models"