提交 4f3eef69 编写于 作者: A an1018

update layout

上级 c94025f2
......@@ -16,7 +16,7 @@ import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(__dir__)
sys.path.append(os.path.abspath(os.path.join(__dir__, '../..')))
sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..')))
os.environ["FLAGS_allocator_strategy"] = 'auto_growth'
......@@ -57,8 +57,8 @@ class LayoutPredictor(object):
postprocess_params = {
'name': 'PicoDetPostProcess',
"layout_dict_path": args.layout_dict_path,
"score_threshold": args.score_threshold,
"nms_threshold": args.nms_threshold,
"score_threshold": args.layout_score_threshold,
"nms_threshold": args.layout_nms_threshold,
}
self.preprocess_op = create_operators(pre_process_list)
......
......@@ -36,24 +36,14 @@ def init_args():
parser.add_argument(
"--layout_dict_path",
type=str,
default="../../ppocr/utils/dict/layout_pubalynet_dict.txt")
default="../ppocr/utils/dict/layout_pubalynet_dict.txt")
parser.add_argument(
"--score_threshold",
"--layout_score_threshold",
type=float,
default=0.5,
help="Threshold of score.")
parser.add_argument(
"--nms_threshold", type=float, default=0.5, help="Threshold of nms.")
parser.add_argument(
"--layout_path_model",
type=str,
default="lp://PubLayNet/ppyolov2_r50vd_dcn_365e_publaynet/config")
parser.add_argument(
"--layout_label_map",
type=ast.literal_eval,
default=None,
help='label map according to ppstructure/layout/README_ch.md')
"--layout_nms_threshold", type=float, default=0.5, help="Threshold of nms.")
# params for vqa
parser.add_argument("--vqa_algorithm", type=str, default='LayoutXLM')
parser.add_argument("--ser_model_dir", type=str)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册