Skip to content

Commit 99c0956

Browse files
committed
Fix typos
1 parent 6b82277 commit 99c0956

File tree

3 files changed

+40
-51
lines changed

3 files changed

+40
-51
lines changed

.github/CONTRIBUTING.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Contributing to Layout Parser
22

3-
🎉👍 Thank you for reading this and plan to contribute! We hope you can join us and work on
4-
this exciting project that can transform document image analysis pipelines with the full
5-
power of Deep Learning.
3+
🙌 Thank you for reading this and plan to contribute! We hope you can join us and work on this exciting project that can transform document image analysis pipelines with the full power of Deep Learning.
64

75
All kinds of contributions are welcome, including but not limited to:
86

@@ -12,30 +10,30 @@ All kinds of contributions are welcome, including but not limited to:
1210

1311
## Planned features
1412

15-
We are planning to improve different aspects of Layout Parser, any feedbacks and contributions are welcomed!
13+
We are planning to improve different aspects of Layout Parser, any feedbacks and contributions would be great!
1614

1715
### Layout Modeling
1816

19-
(Pre-trained) layout models are one of the most components in Layout Parser, and we are planning to broadening the support for layout models:
17+
(Pre-trained) layout models are one of the most important components in Layout Parser, and we are planning to broaden the support for layout models:
2018

21-
- Support frameworks other than Detectron2, e.g., [MMOCR](https://github.com/open-mmlab/mmocr). It may leads to easier installation and support for more application scenarios like recipt or invoice detection.
19+
- Support framework other than Detectron2, e.g., [MMOCR](https://github.com/open-mmlab/mmocr). It may lead to easier installation and support for more application scenarios like receipt or invoice detection.
2220
- Support segmentation-based models, e.g., [dhSegment](https://github.com/dhlab-epfl/dhSegment)
2321
- Better customized training of layout detection models, see [layout-model-training](https://github.com/Layout-Parser/layout-model-training)
2422
- Reproducing novel layout models in the current framework, e.g., [CascadeTabNet](https://github.com/DevashishPrasad/CascadeTabNet)
2523

26-
We are also working on the Layout Parser platforms that can support users' sharing their own models. Please check more details in [community-platform](https://github.com/Layout-Parser/community-platform).
24+
We are also working on the Layout Parser platform that can support users' sharing their own models. Please check [community-platform](https://github.com/Layout-Parser/community-platform) for more detail.
2725

2826
### Advanced Layout Pipeline
2927

30-
- Support defining `Pipeline` that specifies an end-to-end layout processing pipeline for complex documents.
28+
- Support defining `Pipeline` that specifies an end-to-end layout processing pipeline for complex documents
3129

3230
### Command Line Tool and Layout Detection Service
3331

34-
Layout Parser can be easily turned into a command line tool or service to process documents in bulk.
32+
Layout Parser can be easily turned into a command line tool or service to process documents in bulk
3533

3634
- Build a command line tool based on `Click` that supports commands like `layoutparser process --path <path/to/document/folders>`
37-
- Build a RESTful Layout Parser service based on tools like `FastAPI` with similar supports as the ccommand line tool.
38-
- Performance improvements for these service
35+
- Build a RESTful Layout Parser service based on tools like `FastAPI` with similar supports as the command line tool
36+
- Performance improvements for such services
3937

4038
### Easy Installation and Deployment
4139

@@ -44,28 +42,28 @@ Layout Parser can be easily turned into a command line tool or service to proces
4442

4543
## How to Contribute?
4644

47-
This how-to-guide is abridged from the [MMOCR repo](https://github.com/open-mmlab/mmocr/blob/main/.github/CONTRIBUTING.md)
45+
This how-to-guide is abridged from the [MMOCR Repository](https://github.com/open-mmlab/mmocr/blob/main/.github/CONTRIBUTING.md).
4846

4947
### Main Steps
5048

51-
1. Fork and pull the latest Layout Parser Repo
49+
1. Fork and pull the latest Layout Parser Repository
5250
2. Checkout a new branch (do not use main branch for PRs)
5351
3. Commit your changes
5452
4. Create a PR
5553

5654
**Notes**:
57-
1. If you plan to add some new features that involve large changes, please open an issue for discussion first.
58-
2. If you are the author of some papers and would like to include your method to Layout Parser, please let us know (open an issue or contact the maintainers). We will much appreciate your contribution.
59-
3. For new features and new modules, unit tests are required to improve the robustness.
60-
4. You might want to run `pip install -r dev-requirements.txt` to install the dev-dependencies.
55+
1. If you plan to add some new features that involve big changes, please open an issue to discuss with us first
56+
2. If you are the author of some papers and would like to include your method into Layout Parser, please let us know (open an issue or contact the maintainers). Your contribution would be much appreciated.
57+
3. For new features and new modules, unit tests are required to improve the code robustness
58+
4. You might want to run `pip install -r dev-requirements.txt` to install the dev-dependencies.
6159

6260
### Code Style
6361

6462
1. We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
6563
2. We use the following tools for linting and formatting:
6664
- pylint: linter
6765
- black: formatter
68-
3. We suggest adding [type hints](https://docs.python.org/3/library/typing.html) for all APIs.
66+
3. We suggest adding [type hints](https://docs.python.org/3/library/typing.html) for all APIs.
6967

7068
Sincere thanks,
7169

docs/notes/modelzoo.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ model.detect(image)
1616

1717
## Model Catalog
1818

19-
| Dataset | Model | Config Path | Eval Result (mAP) |
20-
| ------------------------------------------------------------ | ------------------------------------------------------------ | --------------------------------------------- | ------------------------------------------------------------ |
21-
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/j4yseny2u0hn22r/config.yml?dl=1) | lp://HJDataset/faster_rcnn_R_50_FPN_3x/config | |
22-
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/4jmr3xanmxmjcf8/config.yml?dl=1) | lp://HJDataset/mask_rcnn_R_50_FPN_3x/config | |
23-
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [retinanet_R_50_FPN_3x](https://www.dropbox.com/s/z8a8ywozuyc5c2x/config.yml?dl=1) | lp://HJDataset/retinanet_R_50_FPN_3x/config | |
24-
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/f3b12qc4hc0yh4m/config.yml?dl=1) | lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config | |
25-
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/u9wbsfwz4y0ziki/config.yml?dl=1) | lp://PubLayNet/mask_rcnn_R_50_FPN_3x/config | |
26-
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [mask_rcnn_X_101_32x8d_FPN_3x](https://www.dropbox.com/s/nau5ut6zgthunil/config.yaml?dl=1) | lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config | 88.98 [eval.csv](https://www.dropbox.com/s/15ytg3fzmc6l59x/eval.csv?dl=0) |
27-
| [PrimaLayout](https://www.primaresearch.org/dataset/) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/yc92x97k50abynt/config.yaml?dl=1) | lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config | 69.35 [eval.csv](https://www.dropbox.com/s/9uuql57uedvb9mo/eval.csv?dl=0) |
28-
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/wnido8pk4oubyzr/config.yml?dl=1) | lp://NewspaperNavigator/faster_rcnn_R_50_FPN_3x/config | |
29-
| [TableBank](https://doc-analysis.github.io) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/7cqle02do7ah7k4/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_50_FPN_3x/config | 89.78 [eval.csv](https://www.dropbox.com/s/1uwnz58hxf96iw2/eval.csv?dl=0) |
30-
| [TableBank](https://doc-analysis.github.io) | [faster_rcnn_R_101_FPN_3x](https://www.dropbox.com/s/h63n6nv51kfl923/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_101_FPN_3x/config | 91.26 [eval.csv](https://www.dropbox.com/s/e1kq8thkj2id1li/eval.csv?dl=0) |
19+
| Dataset | Model | Config Path | Eval Result (mAP) |
20+
|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------|---------------------------------------------------------------------------|
21+
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/j4yseny2u0hn22r/config.yml?dl=1) | lp://HJDataset/faster_rcnn_R_50_FPN_3x/config | |
22+
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/4jmr3xanmxmjcf8/config.yml?dl=1) | lp://HJDataset/mask_rcnn_R_50_FPN_3x/config | |
23+
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | [retinanet_R_50_FPN_3x](https://www.dropbox.com/s/z8a8ywozuyc5c2x/config.yml?dl=1) | lp://HJDataset/retinanet_R_50_FPN_3x/config | |
24+
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/f3b12qc4hc0yh4m/config.yml?dl=1) | lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config | |
25+
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/u9wbsfwz4y0ziki/config.yml?dl=1) | lp://PubLayNet/mask_rcnn_R_50_FPN_3x/config | |
26+
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [mask_rcnn_X_101_32x8d_FPN_3x](https://www.dropbox.com/s/nau5ut6zgthunil/config.yaml?dl=1) | lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config | 88.98 [eval.csv](https://www.dropbox.com/s/15ytg3fzmc6l59x/eval.csv?dl=0) |
27+
| [PrimaLayout](https://www.primaresearch.org/dataset/) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/yc92x97k50abynt/config.yaml?dl=1) | lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config | 69.35 [eval.csv](https://www.dropbox.com/s/9uuql57uedvb9mo/eval.csv?dl=0) |
28+
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/wnido8pk4oubyzr/config.yml?dl=1) | lp://NewspaperNavigator/faster_rcnn_R_50_FPN_3x/config | |
29+
| [TableBank](https://doc-analysis.github.io/tablebank-page/index.html) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/7cqle02do7ah7k4/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_50_FPN_3x/config | 89.78 [eval.csv](https://www.dropbox.com/s/1uwnz58hxf96iw2/eval.csv?dl=0) |
30+
| [TableBank](https://doc-analysis.github.io/tablebank-page/index.html) | [faster_rcnn_R_101_FPN_3x](https://www.dropbox.com/s/h63n6nv51kfl923/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_101_FPN_3x/config | 91.26 [eval.csv](https://www.dropbox.com/s/e1kq8thkj2id1li/eval.csv?dl=0) |
3131

3232
* For PubLayNet models, we suggest using `mask_rcnn_X_101_32x8d_FPN_3x` model as it's trained on the whole training set, while others are only trained on the validation set (the size is only around 1/50). You could expect a 15% AP improvement using the `mask_rcnn_X_101_32x8d_FPN_3x` model.
3333

@@ -39,4 +39,4 @@ model.detect(image)
3939
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | `{0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}` |
4040
| [PrimaLayout](https://www.primaresearch.org/dataset/) | `{1:"TextRegion", 2:"ImageRegion", 3:"TableRegion", 4:"MathsRegion", 5:"SeparatorRegion", 6:"OtherRegion"}` |
4141
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | `{0: "Photograph", 1: "Illustration", 2: "Map", 3: "Comics/Cartoon", 4: "Editorial Cartoon", 5: "Headline", 6: "Advertisement"}` |
42-
| [TableBank](https://doc-analysis.github.io) | `{0: "Table"}` |
42+
| [TableBank](https://doc-analysis.github.io/tablebank-page/index.html) | `{0: "Table"}` |

installation.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
## Install Python
44

5-
Layout Parser is a Python package that requires Python >= 3.6. If you do not have Python
6-
installed on your computer, you might want to turn to [the official instruction](https://www.python.org/downloads/)
7-
and download and install the appropriate version of Python.
5+
Layout Parser is a Python package that requires Python >= 3.6. If you do not have Python installed on your computer, you might want to turn to [the official instruction](https://www.python.org/downloads/) to download and install the appropriate version of Python.
86

97
## Install the Layout Parser main library
108

@@ -14,43 +12,36 @@ Installing the Layout Parser library is very straightforward: you just need to r
1412
pip3 install -U layoutparser
1513
```
1614

17-
## [Optional] Install Detectron2 and modeling utils
15+
## [Optional] Install Detectron2 for Using Layout Models
1816

19-
### For Mac OS and Linux users
17+
### For Mac OS and Linux Users
2018

21-
If you would like to use deep learning model detection, you need also install Detectron2
22-
on your computer. This could be done by running the following command:
19+
If you would like to use deep learning models for layout detection, you also need to install Detectron2 on your computer. This could be done by running the following command:
2320

2421
```bash
2522
pip3 install 'git+https://github.com/facebookresearch/detectron2.git@v0.4#egg=detectron2'
2623
```
2724

28-
This might take sometime as the command will *compile* the library. You might also install a Detectron2 version with
29-
GPU supports or encounter some issues during the installation process. Please refer to the official Detectron2
25+
This might take some time as the command will *compile* the library. You might also want to install a Detectron2 version
26+
with GPU support or encounter some issues during the installation process. Please refer to the official Detectron2
3027
[installation instruction](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md) for detailed
3128
information.
3229

3330
### For Windows users
3431

35-
However, as reported by many users, the installation of Detectron2 is very tricky on Windows platforms.
36-
In our extensive tests, we find that it is nearly impossible to provide a one-line installation command for Windows users.
37-
As a workaround solution, for now we conclude the possible challenges for installing Detectron2 on Windows, and attach helpful
38-
resources for solving them.
39-
We are also investigating other possibilities for avoiding Detectron2 and enabling the pre-trained models. If you have any
40-
suggestions or ideas for fixing this issue, please feel free to [submit an issue](https://github.com/Layout-Parser/layout-parser/issues) in our repo.
32+
As reported by many users, the installation of Detectron2 can be rather tricky on Windows platforms. In our extensive tests, we find that it is nearly impossible to provide a one-line installation command for Windows users. As a workaround solution, for now we list the possible challenges for installing Detectron2 on Windows, and attach helpful resources for solving them. We are also investigating other possibilities to avoid installing Detectron2 to use pre-trained models. If you have any suggestions or ideas, please feel free to [submit an issue](https://github.com/Layout-Parser/layout-parser/issues) in our repo.
4133

4234
1. Challenges for installing `pycocotools`
4335
- You can find detailed instructions on [this post](https://changhsinlee.com/pycocotools/) from Chang Hsin Lee.
4436
- Another solution is try to install `pycocotools-windows`, see https://github.com/cocodataset/cocoapi/issues/415.
45-
2. Challenges for installing the `Detectron2` library itself
37+
2. Challenges for installing `Detectron2`
4638
- [@ivanpp](https://github.com/ivanpp) curates a detailed description for installing `Detectron2` on Windows: [Detectron2 walkthrough (Windows)](https://ivanpp.cc/detectron2-walkthrough-windows/#step3installdetectron2)
47-
- `Detectron2` claims it won't provide official support for Windows (see [1](https://github.com/facebookresearch/detectron2/issues/9#issuecomment-540974288) and [2](https://detectron2.readthedocs.io/en/latest/tutorials/install.html)), but they claim that Detectron2 is continuously built on windows with CircleCI (see [3](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues)). Hopefully this situation will be improved in the future.
39+
- `Detectron2` maintainers claim that they won't provide official support for Windows (see [1](https://github.com/facebookresearch/detectron2/issues/9#issuecomment-540974288) and [2](https://detectron2.readthedocs.io/en/latest/tutorials/install.html)), but Detectron2 is continuously built on windows with CircleCI (see [3](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues)). Hopefully this situation will be improved in the future.
4840

4941

5042
## [Optional] Install OCR utils
5143

52-
Layout Parser also comes with supports for OCR functions. In order to use them, you need
53-
to install the OCR utils via:
44+
Layout Parser also comes with supports for OCR functions. In order to use them, you need to install the OCR utils via:
5445

5546
```bash
5647
pip3 install -U layoutparser[ocr]
@@ -61,7 +52,7 @@ Additionally, if you want to use the Tesseract-OCR engine, you also need to inst
6152

6253
## Known issues
6354

64-
<details><summary>Error: instantiating lp.GCVAgent.with_credential returns module 'google.cloud.vision' has no attribute 'types'. </summary>
55+
<details><summary>Error: instantiating `lp.GCVAgent.with_credential` returns module 'google.cloud.vision' has no attribute 'types'. </summary>
6556
<p>
6657

6758
In this case, you have a newer version of the google-cloud-vision. Please consider downgrading the API using:

0 commit comments

Comments
 (0)