Skip to content

Commit

Permalink
[Docs] Mark projects in docs (#1766)
Browse files Browse the repository at this point in the history
* [Docs] Mark projects in docs

* fix

* fix

* fix

* fix
  • Loading branch information
gaotongxiao authored Mar 10, 2023
1 parent 590af4b commit 465316f
Show file tree
Hide file tree
Showing 18 changed files with 205 additions and 61 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ Supported algorithms:

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

## Projects

[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.

## Contributing

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

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

## Projects in OpenMMLab
## OpenMMLab Family

- [MMEngine](https:/open-mmlab/mmengine): OpenMMLab foundational library for training deep learning models
- [MMCV](https:/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.
Expand Down
5 changes: 5 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ pip3 install -e .

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

## 社区项目

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

## 贡献指南

我们感谢所有的贡献者为改进和提升 MMOCR 所作出的努力。请参考[贡献指南](.github/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
Expand Down
2 changes: 1 addition & 1 deletion docs/en/_static/js/collapsed.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var collapsedSections = ['Migration Guides', 'Dataset Zoo', 'Model Zoo', 'Notes', 'API Reference']
var collapsedSections = ['Migration Guides', 'API Reference']
1 change: 1 addition & 0 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def builder_inited_handler(app):
subprocess.run(['./merge_docs.sh'])
subprocess.run(['./stats.py'])
subprocess.run(['./dataset_zoo.py'])
subprocess.run(['./project_zoo.py'])


def setup(app):
Expand Down
21 changes: 11 additions & 10 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ You can switch between English and Chinese in the lower-left corner of the layou
basic_concepts/convention.md
basic_concepts/engine.md

.. toctree::
:maxdepth: 2
:caption: Migrating from MMOCR 0.x

migration/overview.md
migration/code.md
migration/dataset.md
migration/model.md
migration/transforms.md

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

modelzoo.md
projectzoo.md
backbones.md
textdet_models.md
textrecog_models.md
Expand All @@ -73,9 +65,18 @@ You can switch between English and Chinese in the lower-left corner of the layou
:caption: Notes

notes/contribution_guide.md
notes/projects.md
notes/changelog.md

.. toctree::
:maxdepth: 2
:caption: Migrating from MMOCR 0.x

migration/overview.md
migration/code.md
migration/dataset.md
migration/model.md
migration/transforms.md

.. toctree::
:maxdepth: 1
:caption: API Reference
Expand Down
1 change: 0 additions & 1 deletion docs/en/notes/projects.md

This file was deleted.

52 changes: 52 additions & 0 deletions docs/en/project_zoo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env python
import os.path as osp
import re

# This script reads /projects/selected.txt and generate projectzoo.md

files = []

project_zoo = """
# SOTA Models
Here are some selected project implementations that are not yet included in
MMOCR package, but are ready to use.
"""

files = open('../../projects/selected.txt').readlines()

for file in files:
file = file.strip()
with open(osp.join('../../', file)) as f:
content = f.read()

# Extract title
expr = '# (.*?)\n'
title = re.search(expr, content).group(1)
project_zoo += f'## {title}\n\n'

# Locate the description
expr = '## Description\n(.*?)##'
description = re.search(expr, content, re.DOTALL).group(1)
project_zoo += f'{description}\n'

# check milestone 1
expr = r'- \[(.?)\] Milestone 1'
state = re.search(expr, content, re.DOTALL).group(1)
infer_state = '✔' if state == 'x' else '❌'

# check milestone 2
expr = r'- \[(.?)\] Milestone 2'
state = re.search(expr, content, re.DOTALL).group(1)
training_state = '✔' if state == 'x' else '❌'

# add table
readme_link = f'https:/open-mmlab/mmocr/blob/dev-1.x/{file}'
project_zoo += '### Status \n'
project_zoo += '| Inference | Train | README |\n'
project_zoo += '| --------- | -------- | ------ |\n'
project_zoo += f'|️{infer_state}|{training_state}|[link]({readme_link})|\n'

with open('projectzoo.md', 'w') as f:
f.write(project_zoo)
2 changes: 1 addition & 1 deletion docs/zh_cn/_static/js/collapsed.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var collapsedSections = ['迁移指南', '数据集支持', '模型支持', '记录', 'API文档']
var collapsedSections = ['MMOCR 0.x 迁移指南', 'API 文档']
1 change: 1 addition & 0 deletions docs/zh_cn/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def builder_inited_handler(app):
subprocess.run(['./merge_docs.sh'])
subprocess.run(['./stats.py'])
subprocess.run(['./dataset_zoo.py'])
subprocess.run(['./project_zoo.py'])


def setup(app):
Expand Down
27 changes: 14 additions & 13 deletions docs/zh_cn/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,16 @@
:caption: 基础概念

basic_concepts/structures.md
basic_concepts/models.md
basic_concepts/transforms.md
basic_concepts/evaluation.md
basic_concepts/overview.md
basic_concepts/data_flow.md
basic_concepts/datasets.md
basic_concepts/transforms.md
basic_concepts/models.md
basic_concepts/visualizers.md
basic_concepts/convention.md
basic_concepts/engine.md

.. toctree::
:maxdepth: 2
:caption: MMOCR 0.x 迁移指南

migration/overview.md
migration/code.md
migration/dataset.md
migration/model.md
migration/transforms.md

.. toctree::
:maxdepth: 2
Expand All @@ -63,19 +54,29 @@
:caption: 模型支持

modelzoo.md
projectzoo.md
backbones.md
textdet_models.md
textrecog_models.md
kie_models.md

.. toctree::
:maxdepth: 2
:caption: 记录
:caption: 其它

notes/contribution_guide.md
notes/projects.md
notes/changelog.md

.. toctree::
:maxdepth: 2
:caption: MMOCR 0.x 迁移指南

migration/overview.md
migration/code.md
migration/dataset.md
migration/model.md
migration/transforms.md

.. toctree::
:maxdepth: 2
:caption: API 文档
Expand Down
1 change: 0 additions & 1 deletion docs/zh_cn/notes/projects.md

This file was deleted.

51 changes: 51 additions & 0 deletions docs/zh_cn/project_zoo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python
import os.path as osp
import re

# This script reads /projects/selected.txt and generate projectzoo.md

files = []

project_zoo = """
# 前沿模型
这里是一些已经复现,但是尚未包含在 MMOCR 包中的前沿模型。
"""

files = open('../../projects/selected.txt').readlines()

for file in files:
file = file.strip()
with open(osp.join('../../', file)) as f:
content = f.read()

# Extract title
expr = '# (.*?)\n'
title = re.search(expr, content).group(1)
project_zoo += f'## {title}\n\n'

# Locate the description
expr = '## Description\n(.*?)##'
description = re.search(expr, content, re.DOTALL).group(1)
project_zoo += f'{description}\n'

# check milestone 1
expr = r'- \[(.?)\] Milestone 1'
state = re.search(expr, content, re.DOTALL).group(1)
infer_state = '✔' if state == 'x' else '❌'

# check milestone 2
expr = r'- \[(.?)\] Milestone 2'
state = re.search(expr, content, re.DOTALL).group(1)
training_state = '✔' if state == 'x' else '❌'

# add table
readme_link = f'https:/open-mmlab/mmocr/blob/dev-1.x/{file}'
project_zoo += '### 模型状态 \n'
project_zoo += '| 推理 | 训练 | README |\n'
project_zoo += '| --------- | -------- | ------ |\n'
project_zoo += f'|️{infer_state}|{training_state}|[link]({readme_link})|\n'

with open('projectzoo.md', 'w') as f:
f.write(project_zoo)
2 changes: 1 addition & 1 deletion docs/zh_cn/user_guides/data_prepare/dataset_preparer.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
c# 数据准备 (Beta)
# 数据准备 (Beta)

```{note}
Dataset Preparer 目前仍处在公测阶段,欢迎尝鲜试用!如遇到任何问题,请及时向我们反馈。
Expand Down
2 changes: 1 addition & 1 deletion projects/ABCNet/README_V2.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ABCNet: Real-time Scene Text Spotting with Adaptive Bezier-Curve Network
# ABCNet v2: Adaptive Bezier-Curve Network for Real-time End-to-end Text Spotting

<div>
<a href="https://arxiv.org/abs/2105.03620">[arXiv paper]</a>
Expand Down
10 changes: 7 additions & 3 deletions projects/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Projects

Implementing new models and features into OpenMMLab's algorithm libraries could be troublesome due to the rigorous requirements on code quality, which could hinder the fast iteration of SOTA models and might discourage our members from sharing their latest outcome here.
The OpenMMLab ecosystem can only grow through the contributions of the community.
Everyone is welcome to post their implementation of any great ideas in this folder! If you wish to start your own project, please go through the [example project](example_project/) for the best practice. For common questions about projects, please read our [faq](faq.md).

And that's why we have this `Projects/` folder now, where some experimental features, frameworks and models are placed, only needed to satisfy the minimum requirement on the code quality, and can be used as standalone libraries. Users are welcome to use them if they [use MMOCR from source](https://mmocr.readthedocs.io/en/dev-1.x/get_started/install.html#best-practices).
## External Projects

Everyone is welcome to post their implementation of any great ideas in this folder! If you wish to start your own project, please go through the [example project](example_project/) for the best practice.
Here we lists some selected external projects released in the community built upon MMOCR:

- [TableMASTER-mmocr](https:/JiaquanYe/TableMASTER-mmocr)
- [WordArt](https:/xdxie/WordArt)

Note: The core maintainers of MMOCR only ensure the results are reproducible and the code quality meets its claim at the time each project was submitted, but they may not be responsible for future maintenance. The original authors take responsibility for maintaining their own projects.
Loading

0 comments on commit 465316f

Please sign in to comment.