-
Notifications
You must be signed in to change notification settings - Fork 32
/
config.py
executable file
·73 lines (60 loc) · 2.21 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import os
# Path Inputs
path_input = 'data/Buildings/train'
# Inside this folder, should contain an image and label folder \
# Example - train/image, train/label
path_output = 'model/exp3'
path_validation = 'data/Buildings/test'
path_vali_output = os.path.join(path_output, 'validation')
# generateDatset Parameters
default_resolution = 0.1
minResolution = 0.1 # meters
maxResolution = 1 # meters
step = 0.1 # meters
# Model Parameters
num_image_channels = 3
num_label_channels = 1
validation_split = 0.15
image_size = 200
grid_size = 200
epoch = 30
overlap = 10
batch = 32
image_ext = ['.tif', '.tiff', '.vrt']
# Post Processing
skeletonize_filter = 5
minimum_distance_watershed = 7.5 # 7.5m away buildings
simplify_parameter = 0.7 # 0.7m can be adjusted while simplifying vectors
erosion_filter = 3
watershed_neighbour = 4 # 4 or 8
"""
####################### DO NOT CHANGE BEYOND THIS ###########################
"""
# Configuration file
path_configuration = os.path.join(path_output, 'param.json')
# Derived Input paths
path_image = os.path.join(path_input, 'image')
path_label = os.path.join(path_input, 'label')
path_logs = os.path.join(path_output, 'log')
path_tensorboard_log = os.path.join(path_logs, 'tensorboard')
# Path Outputs
path_vrt = os.path.join(path_output, 'vrt')
path_image_vrt = os.path.join(path_vrt, 'image')
path_label_vrt = os.path.join(path_vrt, 'label')
path_model = os.path.join(path_output, 'model')
path_weight = os.path.join(path_output, 'weight')
path_prediction = os.path.join(path_output, 'predicted')
path_tiled = os.path.join(path_output, 'tiled')
# Tiled Training dataset
path_tiled_image = os.path.join(path_tiled, 'image')
path_tiled_label = os.path.join(path_tiled, 'label')
# Derived Validation paths
path_vali_image = os.path.join(path_validation, 'image')
path_vali_label = os.path.join(path_validation, 'label')
path_vali_tiled = os.path.join(path_vali_output, 'tiled')
# Tiled Validation dataset
path_vali_tiled_image = os.path.join(path_vali_tiled, 'image')
path_vali_tiled_label = os.path.join(path_vali_tiled, 'label')
path_vali_vrt = os.path.join(path_vali_output, 'vrt')
path_vali_image_vrt = os.path.join(path_vali_vrt, 'image')
path_vali_label_vrt = os.path.join(path_vali_vrt, 'label')