-
Notifications
You must be signed in to change notification settings - Fork 48
/
config.py
81 lines (65 loc) · 2.31 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
74
75
76
77
78
79
80
81
import math
seed = 0
THRESHOLD_POSITIVE = 0.1
THRESHOLD_NEGATIVE = 0
threshold_point = 25
window = 120
sigma = 18.5
sigma_aff = 20
boundary_character = math.exp(-1/2*(threshold_point**2)/(sigma**2))
boundary_affinity = math.exp(-1/2*(threshold_point**2)/(sigma_aff**2))
threshold_character = boundary_character + 0.03
threshold_affinity = boundary_affinity + 0.03
threshold_character_upper = boundary_character + 0.2
threshold_affinity_upper = boundary_affinity + 0.2
scale_character = math.sqrt(math.log(boundary_character)/math.log(threshold_character_upper))
scale_affinity = math.sqrt(math.log(boundary_affinity)/math.log(threshold_affinity_upper))
dataset_name = 'ICDAR2013_ICDAR2017'
test_dataset_name = 'ICDAR2013'
print(
'Boundary character value = ', boundary_character,
'| Threshold character value = ', threshold_character,
'| Threshold character upper value = ', threshold_character_upper
)
print(
'Boundary affinity value = ', boundary_affinity,
'| Threshold affinity value = ', threshold_affinity,
'| Threshold affinity upper value = ', threshold_affinity_upper
)
print('Scale character value = ', scale_character, '| Scale affinity value = ', scale_affinity)
print('Training Dataset = ', dataset_name, '| Testing Dataset = ', test_dataset_name)
DataLoaderSYNTH_base_path = '/home/SharedData/Mayank/SynthText/Images'
DataLoaderSYNTH_mat = '/home/SharedData/Mayank/SynthText/gt.mat'
DataLoaderSYNTH_Train_Synthesis = '/home/SharedData/Mayank/Models/SYNTH/train_synthesis/'
DataLoader_Other_Synthesis = '/home/SharedData/Mayank/'+dataset_name+'/Save/'
Other_Dataset_Path = '/home/SharedData/Mayank/'+dataset_name
save_path = '/home/SharedData/Mayank/Models/WeakSupervision/'+dataset_name
images_path = '/home/SharedData/Mayank/'+dataset_name+'/Images'
target_path = '/home/SharedData/Mayank/'+dataset_name+'/Generated'
Test_Dataset_Path = '/home/SharedData/Mayank/'+test_dataset_name
threshold_word = 0.7
threshold_fscore = 0.5
dataset_pre_process = {
'ic13': {
'train': {
'target_json_path': None,
'target_folder_path': None,
},
'test': {
'target_json_path': None,
'target_folder_path': None,
}
},
'ic15': {
'train': {
'target_json_path': None,
'target_folder_path': None,
},
'test': {
'target_json_path': None,
'target_folder_path': None,
}
}
}
start_iteration = 0
skip_iterations = []