Skip to content

Commit

Permalink
predict_rec support rare
Browse files Browse the repository at this point in the history
  • Loading branch information
WenmuZhou committed Feb 8, 2021
1 parent 9cc6363 commit 4dfc583
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/infer/predict_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def __init__(self, args):
"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)
Expand Down

0 comments on commit 4dfc583

Please sign in to comment.