Spaces:
Running
Running
File size: 507 Bytes
29f689c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import copy
__all__ = ['build_post_process']
from .db_postprocess import DBPostProcess
support_dict = ['DBPostProcess']
def build_post_process(config, global_config=None):
config = copy.deepcopy(config)
module_name = config.pop('name')
if global_config is not None:
config.update(global_config)
assert module_name in support_dict, Exception(
'det post process only support {}'.format(support_dict))
module_class = eval(module_name)(**config)
return module_class
|