mirror of https://github.com/open-mmlab/mmocr.git
parent
24bfb18768
commit
e81bb13696
projects
example_project
|
@ -0,0 +1,9 @@
|
|||
# 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.
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
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.
|
|
@ -16,12 +16,34 @@ This project implements a dummy ResNet wrapper, which literally does nothing new
|
|||
|
||||
<!-- For a typical model, this section should contain the commands for training and testing. You are also suggested to dump your environment specification to env.yml by `conda env export > env.yml`. -->
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.7
|
||||
- PyTorch 1.6 or higher
|
||||
- [MIM](https://github.com/open-mmlab/mim)
|
||||
- [MMOCR](https://github.com/open-mmlab/mmocr)
|
||||
|
||||
All the commands below rely on the correct configuration of `PYTHONPATH`, which should point to the project's directory so that Python can locate the module files. In `example_project/` root directory, run the following line to add the current directory to `PYTHONPATH`:
|
||||
|
||||
```shell
|
||||
# Linux
|
||||
export PYTHONPATH=`pwd`:$PYTHONPATH
|
||||
# Windows PowerShell
|
||||
$env:PYTHONPATH=Get-Location
|
||||
```
|
||||
|
||||
### Training commands
|
||||
|
||||
In MMOCR's root directory, run the following command to train the model:
|
||||
|
||||
```bash
|
||||
python tools/train.py projects/example_project/configs/dbnet_dummy-resnet_fpnc_1200e_icdar2015.py
|
||||
mim train mmocr configs/dbnet_dummy-resnet_fpnc_1200e_icdar2015.py --work-dir work_dirs/dummy_mae/
|
||||
```
|
||||
|
||||
To train on multiple GPUs, e.g. 8 GPUs, run the following command:
|
||||
|
||||
```bash
|
||||
mim train mmocr configs/dbnet_dummy-resnet_fpnc_1200e_icdar2015.py --work-dir work_dirs/dummy_mae/ --launcher pytorch --gpus 8
|
||||
```
|
||||
|
||||
### Testing commands
|
||||
|
@ -29,7 +51,7 @@ python tools/train.py projects/example_project/configs/dbnet_dummy-resnet_fpnc_1
|
|||
In MMOCR's root directory, run the following command to test the model:
|
||||
|
||||
```bash
|
||||
python tools/test.py projects/example_project/confsigs/dbnet_dummy-resnet_fpnc_1200e_icdar2015.py ${CHECKPOINT_PATH}
|
||||
mim test mmocr configs/dbnet_dummy-resnet_fpnc_1200e_icdar2015.py --work-dir work_dirs/dummy_mae/ --checkpoint ${CHECKPOINT_PATH}
|
||||
```
|
||||
|
||||
## Results
|
||||
|
@ -60,7 +82,9 @@ year = {2020}
|
|||
|
||||
## Checklist
|
||||
|
||||
<!-- Here is a checklist illustrating a usual development workflow of a successful project, and also serves as an overview of this project's progress. The PIC (person in charge) or contributors of this project should check all the items that they believe have been finished, which will further be verified by codebase maintainers via a PR.
|
||||
Here is a checklist illustrating a usual development workflow of a successful project, and also serves as an overview of this project's progress.
|
||||
|
||||
<!-- The PIC (person in charge) or contributors of this project should check all the items that they believe have been finished, which will further be verified by codebase maintainers via a PR.
|
||||
|
||||
OpenMMLab's maintainer will review the code to ensure the project's quality. Reaching the first milestone means that this project suffices the minimum requirement of being merged into 'projects/'. But this project is only eligible to become a part of the core package upon attaining the last milestone.
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
_base_ = [
|
||||
'../../../configs/textdet/dbnet/dbnet_resnet18_fpnc_1200e_icdar2015.py'
|
||||
]
|
||||
_base_ = ['mmocr::textdet/dbnet/dbnet_resnet18_fpnc_1200e_icdar2015.py']
|
||||
|
||||
custom_imports = dict(imports=['projects.example_project.dummy'])
|
||||
custom_imports = dict(imports=['dummy'])
|
||||
|
||||
_base_.model.backbone.type = 'DummyResNet'
|
||||
|
|
Loading…
Reference in New Issue