A package to convert images to text using OCR.
Project description
Image to Text Converter
This package converts an image to a text file by first converting the image to a PDF, then extracting the text using OCR, and finally converting it to plain text.
This process utilizes Marker package by VikParuchuri.
Installation
pip install -r requirements.txt
Usage
from img2otxt.convert import convert_image_to_text
image_path = 'path/to/your/image.png'
output_dir = 'path/to/output/directory'
convert_image_to_text(image_path, output_dir)
Marker Package
This package relies on the Marker package by VikParuchuri for OCR processing. For more details about Marker, please refer to its GitHub repository.
Testing
python -m unittest discover tests
License
MIT License
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
img2otxt-0.1.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file img2otxt-0.1.tar.gz
.
File metadata
- Download URL: img2otxt-0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4859ad6949145e7609daeeb1bddb01a0910f3e577a70e6a54b6377f96c6dcb18 |
|
MD5 | 31da53f651e1216168e7cbcd3f71fc02 |
|
BLAKE2b-256 | ea26820f0dce4d3daddd482b9859166bfce9372c8397b616e23d8917bf026dc6 |
File details
Details for the file img2otxt-0.1-py3-none-any.whl
.
File metadata
- Download URL: img2otxt-0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e012d32e64e8f6aee75ee35cf52877007fff816b7cdd167fafad73dd2c0df6b |
|
MD5 | 1d913d7af940262d5e6c4f50ffa7bc3a |
|
BLAKE2b-256 | d9c477716d6c211e22c22db2f552d554b99ca2c657baf8214e315d9472a49211 |