Docr 🚀
1. Overview 🌟
🛠️ Component design with module-based functionality, allowing for on-demand feature acquisition, 🚀 easy to expand, and flexible to use, just like playing with building blocks!
Docr is a modular component-based toolkit for document analysis and processing. It's designed with flexibility and extensibility in mind, making it easy to expand and use various document processing functionalities as needed.
2. Features 🛠️
- 📄 Layout Analysis
- 🔢 Formula Detection and Recognition
- 📝 Optical Character Recognition (OCR)
- 📊 Table Structure Recognition
- 📚 Reading Order Analysis
- 🖼️ Image Processing Utilities
3. Installation and Usage 📦
3.1 Prerequisites
- Python 3.10 or higher
- Poetry (for dependency management)
3.2 Setup
-
Clone the repository:
git clone https://github.com/yjmm10/docr.git cd docr git clone https://huggingface.co/liferecords/Telos.git docr/models
-
Install dependencies:
poetry install -v
3.3 Usage
Here's a quick example of how to use Docr for OCR:
from docr import OCR
import cv2
# Initialize the OCR model
ocr_model = OCR()
# Read an image
image = cv2.imread("path/to/your/image.png")
# Perform OCR
result = ocr_model(image)
print(result)
Docr comes with a Streamlit-based web UI for easy demonstration of its capabilities:
-
Run the demo:
streamlit run webui/demo.py
-
Open your browser and navigate to the provided URL (usually http://localhost:8501)
-
Upload an image and select the model you want to use for processing
Docr also provides a FastAPI-based API service for integration into other applications:
-
Start the API server:
uvicorn api.docr_api:app --host 0.0.0.0 --port 8000
-
The API documentation will be available at http://localhost:8000/docs
4. Development 🔬
For detailed information on development, please refer to the development guide. This guide will help you set up your IDE for working with Docr, including SRC Layout configuration.
5. Contributing 🤝
We welcome contributions! Please see our Contributing Guidelines for more details.
6. License 📄
Docr is released under the MIT License. See the LICENSE file for more details.
7. Contact 📧
For any questions or feedback, please contact the project maintainer: liferecords yjmm10@yeah.net
Release files for docr 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| docr-0.2.1.tar.gz | 38.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docr-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.4 kB
Release files / docr-0.2.1.tar.gz
| Download URL | docr-0.2.1.tar.gz |
|---|---|
| Size | 38.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0d39ddcc7e5e2711d042a2225bcd546df825aad0103d6d8f2cf5c6f4337861e
|
|
BLAKE2b-256 checksum How to use checksums |
bf883df2a97472afe4e5af01c620abaf835c5807be32c8ed9d91387017b7660d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Release files / docr-0.2.1-py3-none-any.whl
| Download URL | docr-0.2.1-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6a4828e96a206b902b0b16f96700e8bc4b66ac39f9a058b45c3d1f8e15d7d20
|
|
BLAKE2b-256 checksum How to use checksums |
929f1d4b35da87276f7cabda3820d5a173a6161dab961129b94fdcd7642b0eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|