diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index ac03f78285..12088b2dc0 100755 --- a/tools/infer/predict_rec.py +++ b/tools/infer/predict_rec.py @@ -73,7 +73,8 @@ class TextRecognizer(object): postprocess_params = { 'name': 'VLLabelDecode', "character_dict_path": args.rec_char_dict_path, - "use_space_char": args.use_space_char + "use_space_char": args.use_space_char, + "max_text_length": args.max_text_length } elif self.rec_algorithm == 'ViTSTR': postprocess_params = {