Detect and convert table image to html table
Project description
Table2HTML
A Python package that converts table images into HTML format using Object Detection model and OCR.
Installation
pip install table2html
Usage
from table2html import Table2HTML
import cv2
# Initialize
table2html = Table2HTML()
# Convert table image to HTML
image = cv2.imread("path/to/image.jpg")
cells, html = table2html(image)
# Save HTML output
with open('table.html', 'w') as f:
f.write(html)
Input
image: numpy.ndarray (OpenCV/cv2 image format)
Outputs
-
cells: List of dictionaries, where each dictionary represents a cell with:row: int - Row indexcolumn: int - Column indexbox: Tuple[int] - Bounding box coordinates (x1, y1, x2, y2)text: str - Cell text content
-
html: str - HTML representation of the table
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file table2html-1.1.0.tar.gz.
File metadata
- Download URL: table2html-1.1.0.tar.gz
- Upload date:
- Size: 80.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b71d435676cab31503f136d82f3fd6e081addfebb082daf9b263e8e9f4027df1
|
|
| MD5 |
33336fa59cc030ba6357262661f0d2bd
|
|
| BLAKE2b-256 |
573f9218d98a2db4e65f9157acacb034e047dc827dd5b2b429407ecd4a365abd
|
Provenance
The following attestation bundles were made for table2html-1.1.0.tar.gz:
Publisher:
workflow.yml on jayllfpt/table2html
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
table2html-1.1.0.tar.gz -
Subject digest:
b71d435676cab31503f136d82f3fd6e081addfebb082daf9b263e8e9f4027df1 - Sigstore transparency entry: 148215120
- Sigstore integration time:
-
Permalink:
jayllfpt/table2html@6b1425561361a505705d000d731b55df427f7b97 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/jayllfpt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@6b1425561361a505705d000d731b55df427f7b97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file table2html-1.1.0-py3-none-any.whl.
File metadata
- Download URL: table2html-1.1.0-py3-none-any.whl
- Upload date:
- Size: 80.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
124179f9e9b27ff848ea70e6af74718d2b73fb93801b44ee5c6759ba565b4aec
|
|
| MD5 |
eda5461763899c8d4f09760b35dbaa57
|
|
| BLAKE2b-256 |
344ead70f4fb0f9d451af5aad64f9b346981c5ccdbae538018cb810387ebda07
|
Provenance
The following attestation bundles were made for table2html-1.1.0-py3-none-any.whl:
Publisher:
workflow.yml on jayllfpt/table2html
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
table2html-1.1.0-py3-none-any.whl -
Subject digest:
124179f9e9b27ff848ea70e6af74718d2b73fb93801b44ee5c6759ba565b4aec - Sigstore transparency entry: 148215121
- Sigstore integration time:
-
Permalink:
jayllfpt/table2html@6b1425561361a505705d000d731b55df427f7b97 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/jayllfpt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@6b1425561361a505705d000d731b55df427f7b97 -
Trigger Event:
push
-
Statement type: