Skip to content

Commit 465316f

Browse files
authored
[Docs] Mark projects in docs (#1766)
* [Docs] Mark projects in docs * fix * fix * fix * fix
1 parent 590af4b commit 465316f

File tree

18 files changed

+205
-61
lines changed

18 files changed

+205
-61
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ Supported algorithms:
198198

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

201+
## Projects
202+
203+
[Here](projects/README.md) are some implementations of SOTA models and solutions built on MMOCR, which are supported and maintained by community users. These projects demonstrate the best practices based on MMOCR for research and product development. We welcome and appreciate all the contributions to OpenMMLab ecosystem.
204+
201205
## Contributing
202206

203207
We appreciate all contributions to improve MMOCR. Please refer to [CONTRIBUTING.md](.github/CONTRIBUTING.md) for the contributing guidelines.
@@ -224,7 +228,7 @@ If you find this project useful in your research, please consider cite:
224228

225229
This project is released under the [Apache 2.0 license](LICENSE).
226230

227-
## Projects in OpenMMLab
231+
## OpenMMLab Family
228232

229233
- [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab foundational library for training deep learning models
230234
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.

README_zh-CN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ pip3 install -e .
188188

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

191+
## 社区项目
192+
193+
[这里](projects/README.md)有一些由社区用户支持和维护的基于 MMOCR 的 SOTA 模型和解决方案的实现。这些项目展示了基于 MMOCR 的研究和产品开发的最佳实践。
194+
我们欢迎并感谢对 OpenMMLab 生态系统的所有贡献。
195+
191196
## 贡献指南
192197

193198
我们感谢所有的贡献者为改进和提升 MMOCR 所作出的努力。请参考[贡献指南](.github/CONTRIBUTING.md)来了解参与项目贡献的相关指引。

docs/en/_static/js/collapsed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var collapsedSections = ['Migration Guides', 'Dataset Zoo', 'Model Zoo', 'Notes', 'API Reference']
1+
var collapsedSections = ['Migration Guides', 'API Reference']

docs/en/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def builder_inited_handler(app):
180180
subprocess.run(['./merge_docs.sh'])
181181
subprocess.run(['./stats.py'])
182182
subprocess.run(['./dataset_zoo.py'])
183+
subprocess.run(['./project_zoo.py'])
183184

184185

185186
def setup(app):

docs/en/index.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ You can switch between English and Chinese in the lower-left corner of the layou
3838
basic_concepts/convention.md
3939
basic_concepts/engine.md
4040

41-
.. toctree::
42-
:maxdepth: 2
43-
:caption: Migrating from MMOCR 0.x
44-
45-
migration/overview.md
46-
migration/code.md
47-
migration/dataset.md
48-
migration/model.md
49-
migration/transforms.md
5041

5142
.. toctree::
5243
:maxdepth: 2
@@ -63,6 +54,7 @@ You can switch between English and Chinese in the lower-left corner of the layou
6354
:caption: Model Zoo
6455

6556
modelzoo.md
57+
projectzoo.md
6658
backbones.md
6759
textdet_models.md
6860
textrecog_models.md
@@ -73,9 +65,18 @@ You can switch between English and Chinese in the lower-left corner of the layou
7365
:caption: Notes
7466

7567
notes/contribution_guide.md
76-
notes/projects.md
7768
notes/changelog.md
7869

70+
.. toctree::
71+
:maxdepth: 2
72+
:caption: Migrating from MMOCR 0.x
73+
74+
migration/overview.md
75+
migration/code.md
76+
migration/dataset.md
77+
migration/model.md
78+
migration/transforms.md
79+
7980
.. toctree::
8081
:maxdepth: 1
8182
:caption: API Reference

docs/en/notes/projects.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/en/project_zoo.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
import os.path as osp
3+
import re
4+
5+
# This script reads /projects/selected.txt and generate projectzoo.md
6+
7+
files = []
8+
9+
project_zoo = """
10+
# SOTA Models
11+
12+
Here are some selected project implementations that are not yet included in
13+
MMOCR package, but are ready to use.
14+
15+
"""
16+
17+
files = open('../../projects/selected.txt').readlines()
18+
19+
for file in files:
20+
file = file.strip()
21+
with open(osp.join('../../', file)) as f:
22+
content = f.read()
23+
24+
# Extract title
25+
expr = '# (.*?)\n'
26+
title = re.search(expr, content).group(1)
27+
project_zoo += f'## {title}\n\n'
28+
29+
# Locate the description
30+
expr = '## Description\n(.*?)##'
31+
description = re.search(expr, content, re.DOTALL).group(1)
32+
project_zoo += f'{description}\n'
33+
34+
# check milestone 1
35+
expr = r'- \[(.?)\] Milestone 1'
36+
state = re.search(expr, content, re.DOTALL).group(1)
37+
infer_state = '✔' if state == 'x' else '❌'
38+
39+
# check milestone 2
40+
expr = r'- \[(.?)\] Milestone 2'
41+
state = re.search(expr, content, re.DOTALL).group(1)
42+
training_state = '✔' if state == 'x' else '❌'
43+
44+
# add table
45+
readme_link = f'https://github.com/open-mmlab/mmocr/blob/dev-1.x/{file}'
46+
project_zoo += '### Status \n'
47+
project_zoo += '| Inference | Train | README |\n'
48+
project_zoo += '| --------- | -------- | ------ |\n'
49+
project_zoo += f'|️{infer_state}|{training_state}|[link]({readme_link})|\n'
50+
51+
with open('projectzoo.md', 'w') as f:
52+
f.write(project_zoo)

docs/zh_cn/_static/js/collapsed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var collapsedSections = ['迁移指南', '数据集支持', '模型支持', '记录', 'API文档']
1+
var collapsedSections = ['MMOCR 0.x 迁移指南', 'API 文档']

docs/zh_cn/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def builder_inited_handler(app):
177177
subprocess.run(['./merge_docs.sh'])
178178
subprocess.run(['./stats.py'])
179179
subprocess.run(['./dataset_zoo.py'])
180+
subprocess.run(['./project_zoo.py'])
180181

181182

182183
def setup(app):

docs/zh_cn/index.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,16 @@
2828
:caption: 基础概念
2929

3030
basic_concepts/structures.md
31-
basic_concepts/models.md
31+
basic_concepts/transforms.md
3232
basic_concepts/evaluation.md
3333
basic_concepts/overview.md
3434
basic_concepts/data_flow.md
3535
basic_concepts/datasets.md
36-
basic_concepts/transforms.md
36+
basic_concepts/models.md
3737
basic_concepts/visualizers.md
3838
basic_concepts/convention.md
3939
basic_concepts/engine.md
4040

41-
.. toctree::
42-
:maxdepth: 2
43-
:caption: MMOCR 0.x 迁移指南
44-
45-
migration/overview.md
46-
migration/code.md
47-
migration/dataset.md
48-
migration/model.md
49-
migration/transforms.md
5041

5142
.. toctree::
5243
:maxdepth: 2
@@ -63,19 +54,29 @@
6354
:caption: 模型支持
6455

6556
modelzoo.md
57+
projectzoo.md
6658
backbones.md
6759
textdet_models.md
6860
textrecog_models.md
6961
kie_models.md
7062

7163
.. toctree::
7264
:maxdepth: 2
73-
:caption: 记录
65+
:caption: 其它
7466

7567
notes/contribution_guide.md
76-
notes/projects.md
7768
notes/changelog.md
7869

70+
.. toctree::
71+
:maxdepth: 2
72+
:caption: MMOCR 0.x 迁移指南
73+
74+
migration/overview.md
75+
migration/code.md
76+
migration/dataset.md
77+
migration/model.md
78+
migration/transforms.md
79+
7980
.. toctree::
8081
:maxdepth: 2
8182
:caption: API 文档

0 commit comments

Comments
 (0)