Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in demo/ocr_image_demo.py script #173

Closed
narenderkumarnain opened this issue May 12, 2021 · 4 comments
Closed

Error in demo/ocr_image_demo.py script #173

narenderkumarnain opened this issue May 12, 2021 · 4 comments
Assignees

Comments

@narenderkumarnain
Copy link

I was trying the demo ocr_image_demo.py script and got this error.
mmocr_error

cuhk-hbsun added a commit to cuhk-hbsun/mmocr-2 that referenced this issue May 12, 2021
@narenderkumarnain
Copy link
Author

narenderkumarnain commented May 12, 2021

I was trying to use the Batch Inference feature added through a pr this morning, It worked well with the detection Model but Fails with the Recognition Model. Not even able to Use inference module with single image in batch (Just image Numpy array as input). The above fix just Suppresses the Batch Inference of Detection as well. So Recognition models are not yet able to support the Batch Inference or I am missing something? @cuhk-hbsun

@cuhk-hbsun
Copy link
Collaborator

@narenderkumarnain Thanks for your feedback.

  1. Theoretically, for the algorithms using MultiRotateAugOCR in test_pipeline of text recognition or MultiScaleFlipAug in test_pipeline of text detection, the batch model is not supported since there may be multiple scaled images for one image.
  2. But in practice, there is only one scale in most of the algorithms using MultiScaleFlipAug, or one rotate for MultiRotateAugOCR, so batch mode can be supported by turn off (ignore) the aug_test.
  3. I will update the code to support batch mode for both text detection and recognition.

@cuhk-hbsun
Copy link
Collaborator

@narenderkumarnain I have updated the demo scripts. Please pull the latest code and try again.

@narenderkumarnain
Copy link
Author

@cuhk-hbsun It works now. Thanks for the Changes.

quincylin1 pushed a commit to quincylin1/mmocr-1 that referenced this issue May 17, 2021
* fix open-mmlab#173: support aug test

* fix pytest

* support batch inference for both text det and recog

* update unittest

* use one img for batch infer test
gaotongxiao pushed a commit to gaotongxiao/mmocr that referenced this issue Jul 15, 2022
* fix open-mmlab#173: support aug test

* fix pytest

* support batch inference for both text det and recog

* update unittest

* use one img for batch infer test
gaotongxiao pushed a commit to gaotongxiao/mmocr that referenced this issue Jul 15, 2022
* fix open-mmlab#173: support aug test

* fix pytest

* support batch inference for both text det and recog

* update unittest

* use one img for batch infer test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants