From 4eb351866c1bda9db33c77c93e6fdc0164c9ee3a Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Mon, 8 Feb 2021 14:05:48 +0800 Subject: [PATCH] predict_rec support rare --- tools/infer/predict_rec.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index fd895e50..b3d9d490 100755 --- a/tools/infer/predict_rec.py +++ b/tools/infer/predict_rec.py @@ -54,6 +54,13 @@ class TextRecognizer(object): "character_dict_path": args.rec_char_dict_path, "use_space_char": args.use_space_char } + elif self.rec_algorithm == "RARE": + postprocess_params = { + 'name': 'AttnLabelDecode', + "character_type": args.rec_char_type, + "character_dict_path": args.rec_char_dict_path, + "use_space_char": args.use_space_char + } self.postprocess_op = build_post_process(postprocess_params) self.predictor, self.input_tensor, self.output_tensors = \ utility.create_predictor(args, 'rec', logger) -- GitLab