Skip to main content

to build locally after cloning

pip install comics-ocr[cuda] -f https://download.pytorch.org/whl/torch_stable.html

or 

pip install comics-ocr[cpu]

You can get the necessary model checkpoints and configs from COMICS TEXT+ repository.

Usage

# Import library
from comics_ocr import ComicsOCR

# initalize the model
e2e_ocr_model = ComicsOCR(
    ocr_detector_config="fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/fcenet_r50dcnv2_fpn_1500e_ctw1500_custom.py",
    ocr_detector_checkpoint='fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/best_0_hmean-iou:hmean_epoch_5.pth',
    recog_config='master_custom_dataset.py',
    ocr_recognition_checkpoint='best_0_1-N.E.D_epoch_4.pth',
    det='FCE_CTW_DCNv2',
    recog='MASTER')

# Run the model
img_path = "speech_bubble/0/3/9.jpg"
text, preprocessed_text, sanitized_text = e2e_ocr_model.extract_text(img_path)

Metadata

Release files for comics-ocr 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for comics-ocr 0.1.2
File Size Uploaded Provenance Actions
comics_ocr-0.1.2.tar.gz 204.2 kB Without provenance Details for comics_ocr-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for comics-ocr 0.1.2
File Interpreter ABI Platform Actions
comics_ocr-0.1.2-py3-none-any.whl Python 3 none any Details for comics_ocr-0.1.2-py3-none-any.whl

Total release size: 1.1 MB

Release files / comics_ocr-0.1.2.tar.gz

Download URL comics_ocr-0.1.2.tar.gz
Size 204.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d99d301fb2e8d2c50caff2c0f24113bbff1110b8ad7d214a556c6357ca9fc6eb
BLAKE2b-256 checksum
How to use checksums
844d45f6fa91a5bf69f7f6101a753d87935cf75b32502106ea4dedd89c27be1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / comics_ocr-0.1.2-py3-none-any.whl

Download URL comics_ocr-0.1.2-py3-none-any.whl
Size 931.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfd8c1a931265a4b69199de7f25b803608ee015f1259656a1c09331626c1987a
BLAKE2b-256 checksum
How to use checksums
feb4e1ef2299e295941d903a1cfbd3fb0a5f6a40d96daed22d8cec0f51af2ac6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Security for comics-ocr 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page