Skip to content

Commit

Permalink
Merge commit 'ebdf1cf90d44e278a322f327ac18eac6fff5a745' into dev-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ProtossDragoon committed Dec 7, 2022
2 parents 1a44354 + ebdf1cf commit 19810d6
Show file tree
Hide file tree
Showing 86 changed files with 3,361 additions and 401 deletions.
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ repos:
rev: v4.3.0
hooks:
- id: trailing-whitespace
exclude: ^dicts/
exclude: |
(?x)(
^dicts/|
^projects/ABCNet/dicts/
)
- id: check-yaml
- id: end-of-file-fixer
exclude: ^dicts/
exclude: |
(?x)(
^dicts/|
^projects/ABCNet/dicts/
)
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: check-merge-conflict
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ The main branch works with **PyTorch 1.6+**.

6. **One-stop Dataset Preparaion**. Multiple datasets are instantly ready with only one line of command, via our [Dataset Preparer](https://mmocr.readthedocs.io/en/dev-1.x/user_guides/data_prepare/dataset_preparer.html).

7. **Embracing more `projects/`**: We now introduce `projects/` folder, where some experimental features, frameworks and models can be placed, only needed to satisfy the minimum requirement on the code quality. Everyone is welcome to post their implementation of any great ideas in this folder! Learn more from our [example project](https://github.com/open-mmlab/mmocr/blob/dev-1.x/projects/example_project/).

8. **More models**. MMOCR 1.0 supports more tasks and more state-of-the-art models!

Read [Changelog](https://mmocr.readthedocs.io/en/dev-1.x/notes/changelog.html) for more details!

## Installation
Expand Down Expand Up @@ -152,6 +156,13 @@ Supported algorithms:

</details>

<details open>
<summary>Text Spotting</summary>

- [x] [ABCNet](projects/ABCNet/README.md) (CVPR'2020)

</details>

Please refer to [model_zoo](https://mmocr.readthedocs.io/en/dev-1.x/modelzoo.html) for more details.

## Contributing
Expand Down
15 changes: 13 additions & 2 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ MMOCR 的模块化设计使用户可以定义自己的优化器,数据预处

6. 一站式数据准备:准备数据集已经不再是难事。使用我们的 [Dataset Preparer](https://mmocr.readthedocs.io/zh_CN/dev-1.x/user_guides/data_prepare/dataset_preparer.html),一行命令即可让多个数据集准备就绪。

7. 拥抱更多 `projects/`: 我们推出了 `projects/` 文件夹,用于存放一些实验性的新特性、框架和模型。我们对这个文件夹下的代码规范不作过多要求,力求让社区的所有想法第一时间得到实现和展示。请查看我们的[样例 project](https://github.com/open-mmlab/mmocr/blob/dev-1.x/projects/example_project/) 以了解更多。

8. 更多新模型:MMOCR 1.0 支持了更多模型和模型种类。

阅读[更新日志](https://mmocr.readthedocs.io/zh_CN/dev-1.x/notes/changelog.html)以获取更多信息。

## 安装
Expand Down Expand Up @@ -152,6 +156,13 @@ pip3 install -e .

</details>

<details open>
<summary>端对端 OCR</summary>

- [x] [ABCNet](projects/ABCNet/README.md) (CVPR'2020)

</details>

请点击[模型库](https://mmocr.readthedocs.io/zh_CN/dev-1.x/modelzoo.html)查看更多关于上述算法的详细信息。

## 贡献指南
Expand Down Expand Up @@ -204,10 +215,10 @@ MMOCR 是一款由来自不同高校和企业的研发人员共同参与贡献

## 欢迎加入 OpenMMLab 社区

扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=aCvMxdr3),或通过添加微信“Open小喵Lab”加入官方交流微信群。
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://r.vansin.top/?r=join-qq),或通过添加微信“Open小喵Lab”加入官方交流微信群。

<div align="center">
<img src="https://raw.githubusercontent.com/open-mmlab/mmcv/master/docs/en/_static/zhihu_qrcode.jpg" height="400" /> <img src="https://raw.githubusercontent.com/open-mmlab/mmcv/master/docs/en/_static/qq_group_qrcode.jpg" height="400" /> <img src="https://raw.githubusercontent.com/open-mmlab/mmcv/master/docs/en/_static/wechat_qrcode.jpg" height="400" />
<img src="https://raw.githubusercontent.com/open-mmlab/mmcv/master/docs/en/_static/zhihu_qrcode.jpg" height="400" /> <img src="https://cdn.vansin.top/OpenMMLab/q3.png" height="400" /> <img src="https://raw.githubusercontent.com/open-mmlab/mmcv/master/docs/en/_static/wechat_qrcode.jpg" height="400" />
</div>

我们会在 OpenMMLab 社区为大家
Expand Down
4 changes: 2 additions & 2 deletions configs/textrecog/_base_/datasets/cute80.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cute80_textrecog_data_root = 'data/rec/ct80/'
cute80_textrecog_data_root = 'data/cute80'

cute80_textrecog_test = dict(
type='OCRDataset',
data_root=cute80_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)
14 changes: 10 additions & 4 deletions configs/textrecog/_base_/datasets/icdar2013.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
icdar2013_textrecog_data_root = 'data/rec/icdar_2013/'
icdar2013_textrecog_data_root = 'data/icdar2013'

icdar2013_textrecog_train = dict(
type='OCRDataset',
data_root=icdar2013_textrecog_data_root,
ann_file='train_labels.json',
test_mode=False,
ann_file='textrecog_train.json',
pipeline=None)

icdar2013_textrecog_test = dict(
type='OCRDataset',
data_root=icdar2013_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)

icdar2013_857_textrecog_test = dict(
type='OCRDataset',
data_root=icdar2013_textrecog_data_root,
ann_file='textrecog_test_857.json',
test_mode=True,
pipeline=None)
14 changes: 10 additions & 4 deletions configs/textrecog/_base_/datasets/icdar2015.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
icdar2015_textrecog_data_root = 'data/rec/icdar_2015/'
icdar2015_textrecog_data_root = 'data/icdar2015'

icdar2015_textrecog_train = dict(
type='OCRDataset',
data_root=icdar2015_textrecog_data_root,
ann_file='train_labels.json',
test_mode=False,
ann_file='textrecog_train.json',
pipeline=None)

icdar2015_textrecog_test = dict(
type='OCRDataset',
data_root=icdar2015_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)

icdar2015_1811_textrecog_test = dict(
type='OCRDataset',
data_root=icdar2015_textrecog_data_root,
ann_file='textrecog_test_1811.json',
test_mode=True,
pipeline=None)
7 changes: 3 additions & 4 deletions configs/textrecog/_base_/datasets/iiit5k.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
iiit5k_textrecog_data_root = 'data/rec/IIIT5K/'
iiit5k_textrecog_data_root = 'data/iiit5k'

iiit5k_textrecog_train = dict(
type='OCRDataset',
data_root=iiit5k_textrecog_data_root,
ann_file='train_labels.json',
test_mode=False,
ann_file='textrecog_train.json',
pipeline=None)

iiit5k_textrecog_test = dict(
type='OCRDataset',
data_root=iiit5k_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)
10 changes: 8 additions & 2 deletions configs/textrecog/_base_/datasets/svt.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
svt_textrecog_data_root = 'data/rec/svt/'
svt_textrecog_data_root = 'data/svt'

svt_textrecog_train = dict(
type='OCRDataset',
data_root=svt_textrecog_data_root,
ann_file='textrecog_train.json',
pipeline=None)

svt_textrecog_test = dict(
type='OCRDataset',
data_root=svt_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)
10 changes: 8 additions & 2 deletions configs/textrecog/_base_/datasets/svtp.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
svtp_textrecog_data_root = 'data/rec/svtp/'
svtp_textrecog_data_root = 'data/svtp'

svtp_textrecog_train = dict(
type='OCRDataset',
data_root=svtp_textrecog_data_root,
ann_file='textrecog_train.json',
pipeline=None)

svtp_textrecog_test = dict(
type='OCRDataset',
data_root=svtp_textrecog_data_root,
ann_file='test_labels.json',
ann_file='textrecog_test.json',
test_mode=True,
pipeline=None)
10 changes: 5 additions & 5 deletions configs/textrecog/abinet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Linguistic knowledge is of great benefit to scene text recognition. However, how

## Results and models

| methods | pretrained | | Regular Text | | | Irregular Text | | download |
| :----------------------------------------------: | :--------------------------------------------------: | :----: | :----------: | :----: | :----: | :------------: | :----: | :------------------------------------------------- |
| | | IIIT5K | SVT | IC13 | IC15 | SVTP | CT80 | |
| [ABINet-Vision](/configs/textrecog/abinet/abinet-vision_20e_st-an_mj.py) | - | 0.9523 | 0.9057 | 0.9369 | 0.7886 | 0.8403 | 0.8437 | [model](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet-vision_20e_st-an_mj/abinet-vision_20e_st-an_mj_20220915_152445-85cfb03d.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet-vision_20e_st-an_mj/20220915_152445.log) |
| [ABINet](/configs/textrecog/abinet/abinet_20e_st-an_mj.py) | [Pretrained](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_pretrain-45deac15.pth) | 0.9603 | 0.9382 | 0.9547 | 0.8122 | 0.8868 | 0.8785 | [model](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_20e_st-an_mj/abinet_20e_st-an_mj_20221005_012617-ead8c139.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_20e_st-an_mj/20221005_012617.log) |
| methods | pretrained | | Regular Text | | | Irregular Text | | download |
| :--------------------------------------------: | :------------------------------------------------: | :----: | :----------: | :-------: | :-------: | :------------: | :----: | :----------------------------------------------- |
| | | IIIT5K | SVT | IC13-1015 | IC15-2077 | SVTP | CT80 | |
| [ABINet-Vision](/configs/textrecog/abinet/abinet-vision_20e_st-an_mj.py) | - | 0.9523 | 0.9196 | 0.9369 | 0.7896 | 0.8403 | 0.8437 | [model](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet-vision_20e_st-an_mj/abinet-vision_20e_st-an_mj_20220915_152445-85cfb03d.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet-vision_20e_st-an_mj/20220915_152445.log) |
| [ABINet](/configs/textrecog/abinet/abinet_20e_st-an_mj.py) | [Pretrained](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_pretrain-45deac15.pth) | 0.9603 | 0.9397 | 0.9557 | 0.8146 | 0.8868 | 0.8785 | [model](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_20e_st-an_mj/abinet_20e_st-an_mj_20221005_012617-ead8c139.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/abinet/abinet_20e_st-an_mj/20221005_012617.log) |

```{note}
1. ABINet allows its encoder to run and be trained without decoder and fuser. Its encoder is designed to recognize texts as a stand-alone model and therefore can work as an independent text recognizer. We release it as ABINet-Vision.
Expand Down
8 changes: 4 additions & 4 deletions configs/textrecog/crnn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Image-based sequence recognition has been a long-standing research topic in comp

## Results and models

| methods | | Regular Text | | | | Irregular Text | | download |
| :----------------------------------------------------: | :----: | :----------: | :----: | :-: | :----: | :------------: | :----: | :-------------------------------------------------------------------------------------------: |
| methods | IIIT5K | SVT | IC13 | | IC15 | SVTP | CT80 | |
| [CRNN](/configs/textrecog/crnn/crnn_mini-vgg_5e_mj.py) | 0.8053 | 0.8053 | 0.8739 | | 0.5556 | 0.6093 | 0.5694 | [model](https://download.openmmlab.com/mmocr/textrecog/crnn/crnn_mini-vgg_5e_mj/crnn_mini-vgg_5e_mj_20220826_224120-8afbedbb.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/crnn/crnn_mini-vgg_5e_mj/20220826_224120.log) |
| methods | | Regular Text | | | | Irregular Text | | download |
| :----------------------------------------------------: | :----: | :----------: | :-------: | :-: | :-------: | :------------: | :----: | :-------------------------------------------------------------------------------------: |
| methods | IIIT5K | SVT | IC13-1015 | | IC15-2077 | SVTP | CT80 | |
| [CRNN](/configs/textrecog/crnn/crnn_mini-vgg_5e_mj.py) | 0.8053 | 0.7991 | 0.8739 | | 0.5571 | 0.6093 | 0.5694 | [model](https://download.openmmlab.com/mmocr/textrecog/crnn/crnn_mini-vgg_5e_mj/crnn_mini-vgg_5e_mj_20220826_224120-8afbedbb.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/crnn/crnn_mini-vgg_5e_mj/20220826_224120.log) |

## Citation

Expand Down
2 changes: 0 additions & 2 deletions configs/textrecog/crnn/crnn_mini-vgg_5e_mj.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'../_base_/schedules/schedule_adadelta_5e.py',
'_base_crnn_mini-vgg.py',
]

# dataset settings
train_list = [_base_.mjsynth_textrecog_test]
test_list = [
Expand All @@ -21,7 +20,6 @@
]

default_hooks = dict(logger=dict(type='LoggerHook', interval=50), )

train_dataloader = dict(
batch_size=64,
num_workers=24,
Expand Down
8 changes: 4 additions & 4 deletions configs/textrecog/master/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Attention-based scene text recognizers have gained huge success, which leverages

## Results and Models

| Methods | Backbone | | Regular Text | | | | Irregular Text | | download |
| :----------------------------------------------------------------: | :-----------: | :----: | :----------: | :----: | :-: | :----: | :------------: | :----: | :------------------------------------------------------------------: |
| | | IIIT5K | SVT | IC13 | | IC15 | SVTP | CT80 | |
| [MASTER](/configs/textrecog/master/master_resnet31_12e_st_mj_sa.py) | R31-GCAModule | 0.9490 | 0.8967 | 0.9517 | | 0.7631 | 0.8465 | 0.8854 | [model](https://download.openmmlab.com/mmocr/textrecog/master/master_resnet31_12e_st_mj_sa/master_resnet31_12e_st_mj_sa_20220915_152443-f4a5cabc.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/master/master_resnet31_12e_st_mj_sa/20220915_152443.log) |
| Methods | Backbone | | Regular Text | | | | Irregular Text | | download |
| :-------------------------------------------------------------: | :-----------: | :----: | :----------: | :-------: | :-: | :-------: | :------------: | :----: | :---------------------------------------------------------------: |
| | | IIIT5K | SVT | IC13-1015 | | IC15-2077 | SVTP | CT80 | |
| [MASTER](/configs/textrecog/master/master_resnet31_12e_st_mj_sa.py) | R31-GCAModule | 0.9490 | 0.8887 | 0.9517 | | 0.7650 | 0.8465 | 0.8889 | [model](https://download.openmmlab.com/mmocr/textrecog/master/master_resnet31_12e_st_mj_sa/master_resnet31_12e_st_mj_sa_20220915_152443-f4a5cabc.pth) \| [log](https://download.openmmlab.com/mmocr/textrecog/master/master_resnet31_12e_st_mj_sa/20220915_152443.log) |

## Citation

Expand Down
Loading

0 comments on commit 19810d6

Please sign in to comment.