A cross platform OCR Library based on OpenVINO.
Project description
rapidocr-openvino Package
1. Install package by pypi.
$ pip install rapidocr-openvino
2. Use.
-
Run by script.
import cv2 from rapidocr_openvino import RapidOCR rapid_ocr = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' # str result = rapid_ocr(img_path) # np.ndarray img = cv2.imread('tests/test_files/ch_en_num.jpg') result = rapid_ocr(img) # bytes with open(img_path, 'rb') as f: result = rapid_ocr(f.read()) # Path result = rapid_ocr(Path(img_path)) print(result) # result: [[dt_boxes], txt, score] # 示例:[[左上, 右上, 右下, 左下], '小明', '0.99'] # elapse_list: [det_elapse, cls_elapse, rec_elapse] # all_elapse = det_elapse + cls_elapse + rec_elapse
-
Run by command line.
$ rapidocr_openvino -h usage: rapidocr_openvino [-h] [-img IMG_PATH] [-p] optional arguments: -h, --help show this help message and exit -img IMG_PATH, --img_path IMG_PATH -p, --print_cost $ rapidocr_openvino -img tests/test_files/ch_en_num.jpg
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for rapidocr_openvino-1.1.29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 880829f76bc3f186edb9f7fed5a7cc3c1c1665919eb25b729be7d7838aa8eac1 |
|
MD5 | 264cb481a51e32f54ce0ea4be6f5060f |
|
BLAKE2b-256 | fc10f6028e5788b71f9a1d5daeb206ef571e343095cddb590f8a554f3fd8f3d2 |