From 15b76da0d16b4dbc17f632a45298fa6b2f571b01 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 19 May 2021 10:01:25 +0800 Subject: [PATCH] fix params --- tools/infer/predict_det.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/infer/predict_det.py b/tools/infer/predict_det.py index 59bb49f9..11e78a56 100755 --- a/tools/infer/predict_det.py +++ b/tools/infer/predict_det.py @@ -65,7 +65,9 @@ class TextDetector(object): postprocess_params["max_candidates"] = 1000 postprocess_params["unclip_ratio"] = args.det_db_unclip_ratio postprocess_params["use_dilation"] = args.use_dilation - postprocess_params["score_mode"] = args.det_db_score_mode + if hasattr(args, "det_db_score_mode"): + postprocess_params["score_mode"] = args.det_db_score_mode + elif self.det_algorithm == "EAST": postprocess_params['name'] = 'EASTPostProcess' postprocess_params["score_thresh"] = args.det_east_score_thresh -- GitLab