-
Notifications
You must be signed in to change notification settings - Fork 60
Update SVTR Tiny Model #486
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
Conversation
@@ -38,7 +38,7 @@ According to our experiments, the evaluation results on public benchmark dataset | |||
|
|||
| **Model** | **Context** | **Avg Accuracy** | **Train T.** | **FPS** | **Recipe** | **Download** | | |||
| :-----: | :-----------: | :--------------: | :----------: | :--------: | :--------: |:----------: | | |||
| SVTR-Tiny | D910x4-MS1.10-G | 89.02% | 4866 s/epoch | 2968 | [yaml](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/svtr/svtr_tiny.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/svtr/svtr_tiny-8542b3bb.ckpt) \| [mindir](https://download.mindspore.cn/toolkits/mindocr/svtr/svtr_tiny-8542b3bb-5cf5a130.mindir) | | |||
| SVTR-Tiny | D910x4-MS1.10-G | 90.23% | 3638 s/epoch | 4560 | [yaml](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/svtr/svtr_tiny.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/svtr/svtr_tiny-950be1c3.ckpt) \| [mindir](https://download.mindspore.cn/toolkits/mindocr/svtr/svtr_tiny-950be1c3-86ece8c8.mindir) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the PR is merging, ask @jianyunchao to delete the former ckpt/mindir files in https://download.mindspore.cn/toolkits/mindocr/svtr/
configs/rec/svtr/README.md
Outdated
│ ├── data.mdb | ||
│ └── lock.mdb | ||
└── validation | ||
├── data.mdb | ||
└── lock.mdb | ||
``` | ||
|
||
#### 3.1.3 Dataset Usage | ||
|
||
Here we used the datasets under `training/` folders for training, and the union dataset `validation/` for validation. After training, we used the datasets under `evaluation/` to evaluate model accuracy. | ||
|
||
**Training:** (total 14,442,049 samples) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the ST dataset size is changed, the number of total training samples should also change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, fixed.
Nice work. What leads to the FPS improved from 2968 to 4560? |
Not very sure. Seems removing some long text sample will be helpful. (CTC loss has max. length limit, too.long image will not contributed to the loss value but still cost some time in the previous setting) |
scale_img = cv2.pyrDown(scale_img) | ||
scale_img = cv2.resize(scale_img, (src_w, src_h), interpolation=get_interpolation()) | ||
return scale_img | ||
|
||
|
||
class CVGaussianNoise(object): | ||
def __init__(self, mean=0, var=20): | ||
def __init__(self, mean=0, varience=20): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def __init__(self, mean=0, varience=20): | |
def __init__(self, mean=0, variance=20): |
Do you mean variance? Same in class SVTRDeterioration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixed
__call__
instead of__init__
nn.Dropout
andms_function
Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:
Motivation
(Write your motivation for proposed changes here.)
Test Plan
(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)
Related Issues and PRs
(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)