e904b667c6
Build/Publish Develop Docs / deploy (push) Failing after 1s
PaddleOCR Code Style Check / check-code-style (push) Failing after 1s
PaddleOCR PR Tests GPU / detect-changes (push) Failing after 1s
PaddleOCR PR Tests / detect-changes (push) Failing after 1s
PaddleOCR PR Tests GPU / test-pr-gpu (push) Has been cancelled
PaddleOCR PR Tests / test-pr (push) Has been cancelled
PaddleOCR PR Tests GPU / test-pr-gpu-impl (push) Has been cancelled
PaddleOCR PR Tests / test-pr-python (3.13) (push) Has been cancelled
PaddleOCR PR Tests / test-pr-python (3.8) (push) Has been cancelled
PaddleOCR PR Tests / test-pr-python (3.9) (push) Has been cancelled
20 lines
438 B
Python
20 lines
438 B
Python
# -*- 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
|