RapidOCR OpenVINO GPU version (GPU version only)
Project description
Python RapidOCR OpenVINO with GPU (with GPU only)
This is a modified verison of RapidOCR (https://github.com/RapidAI/RapidOCR) to support OpenVINO GPU. Currently works only with for fixed size images (max len of 960) and also needs the image size to a multiple of 32.
Note: Works only with Intel GPUs. For other devices refer to RapidAI RapidOCR.
Installation and Inference:
Pip method:
pip install rapidocr_openvinogpu
import rapidocr_openvinogpu as rog
rapid_ocr = rog.RapidOCR()
img = cv2.imread(file_path)
rapid_ocr(img)
print(result)
print(elapse_list)
Using source code
git clone https://github.com/jaggiK/rapidocr_openvinogpu.git
python3 setup.py install
cd rapidocr_openvinogpu
Run inference for all the images in a given directory
python3 demo.py -d <absolute_path/to/directory>
Infering an image:
python3 demo.py -f <absolute_path/to/image.jpg>
To save inference results, use -v
flag:
python3 demo.py -d <absolute_path/to/directory> -v
# this saves the visualization in "./inference_results/" in the current folder
To save inference results in a desired folder, use -v
and -o
flag:
python3 demo.py -d <absolute_path/to/directory> -v -o <absolute_path/to/directory>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rapidocr_openvinogpu-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | db0d9276a672ec3c668c9a831b2a08fa893f3d98cc6e64d4eac83c324ba51def |
|
MD5 | 0b183d99f52a0a3ba4ac1572133434d8 |
|
BLAKE2b-256 | a5e8f649c8b559b0570bc1262ac61ff62c500ab5c4f085bd9eefd56bb6bcb500 |
Hashes for rapidocr_openvinogpu-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34d1ce4807f7863feee2b1605e4536fa2da091ceb43f146ae5a80bf01e5b417c |
|
MD5 | 3bf7690a65fc5760becdb173db6ef563 |
|
BLAKE2b-256 | a3292ff982d9a9f59c1ce526d31942cf370a68a21515b4b59de96ddc03c0afa5 |