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

[Fix] fix converting to onnx bug because of changing key from img_shape to resize_shape #523

Merged
merged 5 commits into from
Oct 20, 2021

Conversation

Harold-lkk
Copy link
Collaborator

@Harold-lkk Harold-lkk commented Oct 12, 2021

Motivation

In #407, in meta_keys, the img_shape was replaced by resize_shape, which causes failure on converting CRNN to ONNX.

@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #523 (3bebf28) into main (abfe75d) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #523      +/-   ##
==========================================
- Coverage   85.69%   85.65%   -0.04%     
==========================================
  Files         142      142              
  Lines        9539     9543       +4     
  Branches     1364     1364              
==========================================
  Hits         8174     8174              
- Misses       1048     1052       +4     
  Partials      317      317              
Flag Coverage Δ
unittests 85.65% <0.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
mmocr/core/deployment/deploy_utils.py 23.03% <0.00%> (-0.58%) ⬇️
mmocr/core/evaluation/ner_metric.py 100.00% <0.00%> (ø)
.../pipelines/textdet_targets/base_textdet_targets.py 85.91% <0.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 abfe75d...3bebf28. Read the comment docs.

Copy link
Collaborator

@gaotongxiao gaotongxiao left a comment

Choose a reason for hiding this comment

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

LGTM, ping @AllentDan Could you check if this change would incur any potential risks on deployment tasks?

Copy link
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

PSENet and PANNet need test as well

tools/deployment/pytorch2onnx.py Show resolved Hide resolved
Copy link
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

LGTM but need @gaotongxiao approve

mmocr/core/deployment/deploy_utils.py Show resolved Hide resolved
Comment on lines +187 to +188
1: 'seq_len',
2: 'num_classes'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are these keys for?

@gaotongxiao gaotongxiao merged commit 5671939 into open-mmlab:main Oct 20, 2021
gaotongxiao pushed a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…pe to resize_shape (open-mmlab#523)

* fix pytorch to onnx for mmocr0.3.0

* fix pytorch to onnx for mmocr0.3.0

* modify deployment doc and fix scale_factor bug and test psenet and panet

* fix trt part

* init detector with **(cfg.model)

Co-authored-by: AllentDan <AllentDan@yeah.net>
gaotongxiao pushed a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…pe to resize_shape (open-mmlab#523)

* fix pytorch to onnx for mmocr0.3.0

* fix pytorch to onnx for mmocr0.3.0

* modify deployment doc and fix scale_factor bug and test psenet and panet

* fix trt part

* init detector with **(cfg.model)

Co-authored-by: AllentDan <AllentDan@yeah.net>
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.

3 participants