-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add paddlemodel #46
Open
an1018
wants to merge
7
commits into
Layout-Parser:main
Choose a base branch
from
an1018:add_paddlemodel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add paddlemodel #46
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
eb57ff0
Add paddlemodel
an1018 3f67b76
Add paddlemodel
an1018 922c689
Add paddlemodel
an1018 99aa72e
Add paddlemodel
an1018 deb004b
add paddlemodels
an1018 747759f
Update modelzoo.md
littletomatodonkey eec3c4c
Merge pull request #2 from littletomatodonkey/patch-1
an1018 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,6 @@ sphinx_rtd_theme | |
google-cloud-vision==1 | ||
pytesseract | ||
pycocotools | ||
git+https://github.com/facebookresearch/[email protected]#egg=detectron2 | ||
git+https://github.com/facebookresearch/[email protected]#egg=detectron2 | ||
paddlepaddle==2.1.0 | ||
paddleocr>=2.0.1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Installation | ||
|
||
## Install Python | ||
|
||
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. | ||
|
||
## Install the Layout Parser main library | ||
|
||
Installing the Layout Parser library is very straightforward: you just need to run the following command: | ||
|
||
```bash | ||
pip3 install -U layoutparser | ||
``` | ||
|
||
## [Optional] Install Detectron2 for Using Layout Models | ||
|
||
### For Mac OS and Linux Users | ||
|
||
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: | ||
|
||
```bash | ||
pip3 install 'git+https://github.com/facebookresearch/[email protected]#egg=detectron2' | ||
``` | ||
|
||
This might take some time as the command will *compile* the library. You might also want to install a Detectron2 version | ||
with GPU support or encounter some issues during the installation process. Please refer to the official Detectron2 | ||
[installation instruction](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md) for detailed | ||
information. | ||
|
||
### For Windows users | ||
|
||
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. | ||
|
||
1. Challenges for installing `pycocotools` | ||
- You can find detailed instructions on [this post](https://changhsinlee.com/pycocotools/) from Chang Hsin Lee. | ||
- Another solution is try to install `pycocotools-windows`, see https://github.com/cocodataset/cocoapi/issues/415. | ||
2. Challenges for installing `Detectron2` | ||
- [@ivanpp](https://github.com/ivanpp) curates a detailed description for installing `Detectron2` on Windows: [Detectron2 walkthrough (Windows)](https://ivanpp.cc/detectron2-walkthrough-windows/#step3installdetectron2) | ||
- `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. | ||
|
||
|
||
## [Optional] Install OCR utils | ||
|
||
Layout Parser also comes with supports for OCR functions. In order to use them, you need to install the OCR utils via: | ||
|
||
```bash | ||
pip3 install -U layoutparser[ocr] | ||
``` | ||
|
||
Additionally, if you want to use the Tesseract-OCR engine, you also need to install it on your computer. Please check the | ||
[official documentation](https://tesseract-ocr.github.io/tessdoc/Installation.html) for detailed installation instructions. | ||
|
||
## Known issues | ||
|
||
<details><summary>Error: instantiating `lp.GCVAgent.with_credential` returns module 'google.cloud.vision' has no attribute 'types'. </summary> | ||
<p> | ||
|
||
In this case, you have a newer version of the google-cloud-vision. Please consider downgrading the API using: | ||
```bash | ||
pip install layoutparser[ocr] | ||
``` | ||
</p> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tutorial on OCR model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll add later~