Skip to content

Commit

Permalink
[Bug Fix] Modify TRT dynamic shape in PP-OCRv2 example. (#769)
Browse files Browse the repository at this point in the history
* Imporve OCR Readme

* Improve OCR Readme

* Improve OCR Readme

* Improve OCR Readme

* Improve OCR Readme

* Add Initialize function to PP-OCR

* Add Initialize function to PP-OCR

* Add Initialize function to PP-OCR

* Make all the model links come from PaddleOCR

* Improve OCR readme

* Improve OCR readme

* Improve OCR readme

* Improve OCR readme

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add Readme for vision results

* Add check for label file in postprocess of Rec model

* Add check for label file in postprocess of Rec model

* Add check for label file in postprocess of Rec model

* Add check for label file in postprocess of Rec model

* Add check for label file in postprocess of Rec model

* Add check for label file in postprocess of Rec model

* Add comments to create API docs

* Improve OCR comments

* Rename OCR and add comments

* Make sure previous python example works

* Make sure previous python example works

* Fix Rec model bug

* Fix Rec model bug

* Fix rec model bug

* Add SetTrtMaxBatchSize function for TensorRT

* Add SetTrtMaxBatchSize Pybind

* Add set_trt_max_batch_size python function

* Set TRT dynamic shape in PPOCR examples

* Set TRT dynamic shape in PPOCR examples

* Set TRT dynamic shape in PPOCR examples

* Fix PPOCRv2 python example

* Fix PPOCR dynamic input shape bug

* Remove useless code

* Fix PPOCR bug

* Remove useless comments  in PaddleSeg example

* Fix quantize docs readme

* Fix PP-OCRv2 readme

* Modify dynamic shape in PP-OCRv2 example

Co-authored-by: Jason <jiangjiajun@baidu.com>
  • Loading branch information
yunyaoXYY and jiangjiajun authored Dec 1, 2022
1 parent 0d53ebb commit 4fd333f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/vision/ocr/PP-OCRv2/cpp/infer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ void InitAndInfer(const std::string& det_model_dir, const std::string& cls_model
// We recommend that users set the length and height of the detection model to a multiple of 32.
det_option.SetTrtInputShape("x", {1, 3, 64,64}, {1, 3, 640, 640},
{1, 3, 960, 960});
cls_option.SetTrtInputShape("x", {1, 3, 48, 10}, {10, 3, 48, 320}, {64, 3, 48, 1024});
cls_option.SetTrtInputShape("x", {1, 3, 48, 10}, {10, 3, 48, 320}, {32, 3, 48, 1024});
rec_option.SetTrtInputShape("x", {1, 3, 32, 10}, {10, 3, 32, 320},
{64, 3, 32, 2304});
{32, 3, 32, 2304});

// Users could save TRT cache file to disk as follow.
// det_option.SetTrtCacheFile(det_model_dir + sep + "det_trt_cache.trt");
Expand Down

0 comments on commit 4fd333f

Please sign in to comment.