From 7756e66b8eea5b9eb1e590bd52a7bcedcccb1a6d Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Wed, 27 Apr 2022 02:45:23 +0000 Subject: [PATCH] update trt dynamic shape for v3 rec --- tools/infer/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 22ffe4d6..762db868 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -271,7 +271,7 @@ def create_predictor(args, mode, logger): elif mode == "rec": if args.rec_algorithm != "CRNN": use_dynamic_shape = False - imgH = int(args.rec_image_shape.split(',')[1]) + imgH = int(args.rec_image_shape.split(',')[-2]) min_input_shape = {"x": [1, 3, imgH, 10]} max_input_shape = {"x": [args.rec_batch_num, 3, imgH, 1536]} opt_input_shape = {"x": [args.rec_batch_num, 3, imgH, 320]} -- GitLab