Table extraction from image.
Project description
TableCV
Extract table from an image.
Usage
There are two ways to get table from an image.
Approach 1 (uses PaddleOCR)
Call extract_table
(returns pandas Dataframe object).
from tablecv import extract_table
print(extract_table(image_path=""))
Approach 2
Perform ocr using your favourite OCR tool (EasyOCR, KerasOCR, PaddleOCR, WhateverOCR ...).
ocr_results
object should look like the following:
# list of tuple of bounding box and text
ocr_results = [
(
(1, 2, 3, 4), "a" # (x, y, w, h), text
),
(
(4, 5, 6, 7), "b"
),
...
]
and then call extract_table_from_ocr
method.
from tablecv import extract_table_from_ocr
ocr_results: list[tuple[tuple[float, float, float, float], str]] = ...
print(extract_table_from_ocr(ocr_results))
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
tablecv-0.1.0.tar.gz
(6.2 kB
view hashes)