You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
438 B
20 lines
438 B
# -*- coding: utf-8 -*-
|
|
# @Time : 2019/12/5 15:36
|
|
# @Author : zhoujun
|
|
from .icdar2015 import QuadMetric
|
|
|
|
|
|
def get_metric(config):
|
|
try:
|
|
if "args" not in config:
|
|
args = {}
|
|
else:
|
|
args = config["args"]
|
|
if isinstance(args, dict):
|
|
cls = eval(config["type"])(**args)
|
|
else:
|
|
cls = eval(config["type"])(args)
|
|
return cls
|
|
except:
|
|
return None
|