Skip to content

More ocr models #446

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

Merged
merged 17 commits into from
May 20, 2022
Merged

More ocr models #446

merged 17 commits into from
May 20, 2022

Conversation

AllentDan
Copy link
Member

@AllentDan AllentDan commented May 8, 2022

Motivation

Add more mmocr models. PANet, PSENet, SATRN.

Checklist

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

@codecov
Copy link

codecov bot commented May 8, 2022

Codecov Report

Merging #446 (c1759ef) into dev-v0.5.0 (81a9719) will decrease coverage by 0.35%.
The diff coverage is 24.69%.

❗ Current head c1759ef differs from pull request most recent head e80ea05. Consider uploading reports for the commit e80ea05 to get more accurate results

@@              Coverage Diff               @@
##           dev-v0.5.0     #446      +/-   ##
==============================================
- Coverage       59.18%   58.82%   -0.36%     
==============================================
  Files             233      235       +2     
  Lines            7739     7820      +81     
  Branches         1186     1196      +10     
==============================================
+ Hits             4580     4600      +20     
- Misses           2835     2893      +58     
- Partials          324      327       +3     
Flag Coverage Δ
unittests 58.82% <24.69%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdeploy/backend/tensorrt/onnx2tensorrt.py 0.00% <ø> (ø)
mmdeploy/backend/tensorrt/utils.py 0.00% <0.00%> (ø)
...loy/codebase/mmocr/models/text_recognition/base.py 65.21% <0.00%> (-23.02%) ⬇️
...base/mmocr/models/text_detection/panet_trt_fp16.py 21.05% <21.05%> (ø)
mmdeploy/pytorch/functions/triu.py 33.33% <33.33%> (ø)
mmdeploy/codebase/mmocr/deploy/text_detection.py 63.15% <100.00%> (+0.65%) ⬆️
...y/codebase/mmocr/models/text_detection/__init__.py 100.00% <100.00%> (ø)
mmdeploy/pytorch/functions/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d04c8dc...e80ea05. Read the comment docs.

@AllentDan AllentDan requested review from grimoire and RunningLeon May 10, 2022 07:29
@grimoire
Copy link
Member

CRNN failed because the input shape is [1,1,32,32].
visualize failed on latest MMOCR. The visualize function is static method now.

@AllentDan
Copy link
Member Author

CRNN requires other configs with 1x32x32 specified. I'm actually not sure if we should keep the codes for fp-16 because it only works for one checkpoint.

@lvhan028
Copy link
Collaborator

Hi, @AllentDan may use dev-v0.5.0 as your base branch on this PR.

@lzhangzz
Copy link
Collaborator

lzhangzz commented May 19, 2022

The exported pipeline.json for PANet has both size and img_scale set

{
    "type": "Resize",
    "img_scale": [
        3000,
        640
    ],
    "keep_ratio": true,
    "size": [
        736,
        1333
    ]
}

For now, only size is used in SDK, however it's confusing for the users.

grimoire
grimoire previously approved these changes May 20, 2022
Copy link
Member

@grimoire grimoire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvhan028 lvhan028 requested a review from lzhangzz May 20, 2022 06:12
RunningLeon
RunningLeon previously approved these changes May 20, 2022
Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AllentDan AllentDan dismissed stale reviews from RunningLeon and grimoire via bc9fc52 May 20, 2022 07:00
Copy link
Collaborator

@lzhangzz lzhangzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grimoire grimoire merged commit 9eee75b into open-mmlab:dev-v0.5.0 May 20, 2022
lvhan028 pushed a commit to lvhan028/mmdeploy that referenced this pull request Jun 3, 2022
* rewrite sync batchnorm

* export panet and psenet

* resolution

* align fp16 for panet

* refine codes

* enable satrn for trt

* refine docs

* docstring

* docstring

* add ut and refine codes

* fix ut

* resolve comments and move panet-fp16 to doc

* remove ut

* refine ut

* resolve comments

* use size instead of img_scale

* use size of MultiScaleAug

Co-authored-by: dongchunyu.vendor <[email protected]>
lvhan028 pushed a commit to lvhan028/mmdeploy that referenced this pull request Jun 3, 2022
* rewrite sync batchnorm

* export panet and psenet

* resolution

* align fp16 for panet

* refine codes

* enable satrn for trt

* refine docs

* docstring

* docstring

* add ut and refine codes

* fix ut

* resolve comments and move panet-fp16 to doc

* remove ut

* refine ut

* resolve comments

* use size instead of img_scale

* use size of MultiScaleAug

Co-authored-by: dongchunyu.vendor <[email protected]>
@AllentDan AllentDan deleted the more-ocr-models branch November 14, 2022 07:04
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

Successfully merging this pull request may close these issues.

5 participants