https://github.com/hgjazhgj/pponnxcr
OCR based on onnxruntime with PaddleOCR models
https://github.com/hgjazhgj/pponnxcr
Last synced: 2 months ago
JSON representation
OCR based on onnxruntime with PaddleOCR models
- Host: GitHub
- URL: https://github.com/hgjazhgj/pponnxcr
- Owner: hgjazhgj
- License: agpl-3.0
- Created: 2023-06-28T14:21:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T23:08:26.000Z (over 1 year ago)
- Last Synced: 2025-03-18T02:03:08.210Z (2 months ago)
- Language: Python
- Size: 41.2 MB
- Stars: 26
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# pponnxcr - PaddlePaddle ONNXruntime OCR
OCR based on ONNX Runtime with PaddleOCR models
Refractor by [@hgjazhgj](https://github.com/hgjazhgj/) for [ppocr-onnx](https://github.com/triwinds/ppocr-onnx) and implements:- Update `rec` model to v3
- Remove all unnecessary components e.g. `draw-ocr`
- Add English, Japanese and TraditionalChinese language support## Install
```bash
pip install pponnxcr
```## Usage
```python
from pponnxcr import TextSystem
import cv2ZHS = TextSystem('zhs')
ZHT = TextSystem('zht')
JA = TextSystem('ja')
EN = TextSystem('en')img = cv2.imread('test.png')
ZHS.ocr_single_line(img)
ZHS.ocr_lines([img, ...])
ZHS.detect_and_ocr(img)
```## License
[GNU AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html)
Which means that unless commercially licensed, any modification or use of this project in any way requires open source
## Reference
- [ppocr-onnx](https://github.com/triwinds/ppocr-onnx)
- [RapidOCR](https://github.com/RapidAI/RapidOCR)
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
- [Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX)