Skip to content

Commit acae8da

Browse files
authored
[Docs] updata abcnet doc (#1658)
* updata abcnet doc * updata link * updata link * updata config name * add link for data
1 parent 4d5ed98 commit acae8da

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

projects/ABCNet/README.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,30 @@ This is an implementation of [ABCNet](https://github.com/aim-uofa/AdelaiDet) bas
1919

2020
<!-- 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`. -->
2121

22-
This ABCNet implementation works for inference only. Its full implementation will be available soon.
22+
### Prerequisites
2323

24-
### Testing commands
24+
- Python 3.7
25+
- PyTorch 1.6 or higher
26+
- [MIM](https://github.com/open-mmlab/mim)
27+
- [MMOCR](https://github.com/open-mmlab/mmocr)
28+
29+
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 `ABCNet/` root directory, run the following line to add the current directory to `PYTHONPATH`:
30+
31+
```shell
32+
# Linux
33+
export PYTHONPATH=`pwd`:$PYTHONPATH
34+
# Windows PowerShell
35+
$env:PYTHONPATH=Get-Location
36+
```
37+
38+
if the data is not in `ABCNet/`, you can link the data into `ABCNet/`:
39+
40+
```shell
41+
# Linux
42+
ln -s ${DataPath} $PYTHONPATH
43+
# Windows PowerShell
44+
New-Item -ItemType SymbolicLink -Path $env:PYTHONPATH -Name data -Target ${DataPath}
45+
```
2546

2647
As of now, `BezierAlign` is not yet supported by MMCV, and we will use third-party MMCV with the implementation of `BezierAlign`. You will need to install it from the source code as follows:
2748

@@ -31,10 +52,26 @@ cd mmcv
3152
MMCV_WITH_OPS=1 MAX_JOBS=8 python setup.py develop
3253
```
3354

34-
In MMOCR's root directory, run the following command to test the model:
55+
### Training commands
56+
57+
In the current directory, run the following command to train the model:
58+
59+
```bash
60+
mim train mmocr config/abcnet/abcnet_resnet50_fpn_500e_icdar2015.py --work-dir work_dirs/
61+
```
62+
63+
To train on multiple GPUs, e.g. 8 GPUs, run the following command:
64+
65+
```bash
66+
mim train mmocr config/abcnet/abcnet_resnet50_fpn_500e_icdar2015.py --work-dir work_dirs/ --launcher pytorch --gpus 8
67+
```
68+
69+
### Testing commands
70+
71+
In the current directory, run the following command to test the model:
3572

3673
```bash
37-
python tools/test.py projects/ABCNet/config/abcnet/abcnet_resnet50_fpn.py ${CHECKPOINT_PATH}
74+
mim test mmocr config/abcnet/abcnet_resnet50_fpn_500e_icdar2015.py --work-dir work_dirs/ --checkpoint ${CHECKPOINT_PATH}
3875
```
3976

4077
## Results
@@ -43,9 +80,9 @@ Here we provide the baseline version of ABCNet with ResNet50 backbone.
4380

4481
To find more variants, please visit the [official model zoo](https://github.com/aim-uofa/AdelaiDet/blob/master/configs/BAText/README.md).
4582

46-
| Name | E2E-None-Hmean | det-Hmean | Download |
47-
| :-------------------: | :------------: | :-------: | :-----------------------------------------------------------------------------------------------------------------------------------: |
48-
| v1-icdar2015-finetune | 0.5803 | 0.8818 | [model](https://download.openmmlab.com/mmocr/textspotting/abcnet/abcnet_resnet50_fpn/abcnet_resnet50_fpn_500e_icdar2015-e8c31510.pth) |
83+
| Name | Pretrained Model | E2E-None-Hmean | det-Hmean | Download |
84+
| :-------------------: | :--------------------------------------------------------------------------------: | :------------: | :-------: | :------------------------------------------------------------------------: |
85+
| v1-icdar2015-finetune | [SynthText](https://download.openmmlab.com/mmocr/textspotting/abcnet/abcnet_resnet50_fpn_500e_icdar2015/abcnet_resnet50_fpn_pretrain-d060636c.pth) | 0.6127 | 0.8753 | [model](https://download.openmmlab.com/mmocr/textspotting/abcnet/abcnet_resnet50_fpn_500e_icdar2015/abcnet_resnet50_fpn_500e_icdar2015-326ac6f4.pth) \| [log](https://download.openmmlab.com/mmocr/textspotting/abcnet/abcnet_resnet50_fpn_500e_icdar2015/20221210_170401.log) |
4986

5087
## Citation
5188

@@ -89,9 +126,9 @@ A project does not necessarily have to be finished in a single PR, but it's esse
89126

90127
<!-- As this template does. -->
91128

92-
- [ ] Milestone 2: Indicates a successful model implementation.
129+
- [x] Milestone 2: Indicates a successful model implementation.
93130

94-
- [ ] Training-time correctness
131+
- [x] Training-time correctness
95132

96133
<!-- If you are reproducing the result from a paper, checking this item means that you should have trained your model from scratch based on the original paper's specification and verified that the final result matches the report within a minor error range. -->
97134

0 commit comments

Comments
 (0)