2020-10-07 13:07:01 +00:00
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
|
c = {
|
2020-12-18 20:27:19 +00:00
|
|
|
"min_area" : 5000,
|
2020-10-18 17:24:55 +00:00
|
|
|
"max_area" : 40000,
|
2020-12-18 20:27:19 +00:00
|
|
|
"threashold" : 7,
|
2020-10-07 13:07:01 +00:00
|
|
|
"resizeWidth" : 512,
|
2020-10-11 15:09:49 +00:00
|
|
|
"inputPath" : None,
|
|
|
|
|
"outputPath": None,
|
2020-12-18 20:27:19 +00:00
|
|
|
"maxLayerLength": 1500,
|
|
|
|
|
"minLayerLength": 40,
|
|
|
|
|
"tolerance": 20,
|
2020-10-07 13:07:01 +00:00
|
|
|
"maxLength": None,
|
2020-12-18 20:27:19 +00:00
|
|
|
"ttolerance": 20,
|
2020-11-05 22:17:05 +00:00
|
|
|
"videoBufferLength": 500,
|
2020-12-18 20:27:19 +00:00
|
|
|
"LayersPerContour": 220,
|
2020-12-20 18:46:11 +00:00
|
|
|
"avgNum":10,
|
|
|
|
|
"ce_average_threads": 16,
|
|
|
|
|
"ce_comp_threads":16,
|
|
|
|
|
"lf_threads":16,
|
2020-10-13 22:16:39 +00:00
|
|
|
}
|
2020-10-11 15:09:49 +00:00
|
|
|
|
|
|
|
|
def __init__(self):
|
2020-10-31 19:36:43 +00:00
|
|
|
'''This is basically just a wrapper for a json / python dict'''
|
2020-12-20 18:46:11 +00:00
|
|
|
#print("Current Config:")
|
|
|
|
|
#for key, value in self.c.items():
|
|
|
|
|
# print(f"{key}:\t\t{value}")
|
2020-10-07 13:07:01 +00:00
|
|
|
|
|
|
|
|
def __getitem__(self, key):
|
2020-10-16 08:36:52 +00:00
|
|
|
if key not in self.c:
|
|
|
|
|
return None
|
2020-10-07 13:07:01 +00:00
|
|
|
return self.c[key]
|
|
|
|
|
|
|
|
|
|
def __setitem__(self, key, value):
|
2020-10-11 15:09:49 +00:00
|
|
|
self.c[key] = value
|