Skip to main content

🛠️ Docr: A modular toolkit for intelligent document analysis and processing. Easy to expand and flexible to use, just like playing with building blocks!

Project description

English | 中文 | 日语

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

  1. Clone the repository:

    git clone https://github.com/yjmm10/docr.git
    cd docr
    git clone https://huggingface.co/liferecords/Telos.git docr/models
    
  2. 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:

  1. Run the demo:

    streamlit run webui/demo.py
    
  2. Open your browser and navigate to the provided URL (usually http://localhost:8501)

  3. 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:

  1. Start the API server:

    uvicorn api.docr_api:app --host 0.0.0.0 --port 8000
    
  2. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docr-0.2.1.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docr-0.2.1-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file docr-0.2.1.tar.gz.

File metadata

  • Download URL: docr-0.2.1.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for docr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c0d39ddcc7e5e2711d042a2225bcd546df825aad0103d6d8f2cf5c6f4337861e
MD5 992161b944421b6e301fbe760e821e6d
BLAKE2b-256 bf883df2a97472afe4e5af01c620abaf835c5807be32c8ed9d91387017b7660d

See more details on using hashes here.

File details

Details for the file docr-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: docr-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for docr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6a4828e96a206b902b0b16f96700e8bc4b66ac39f9a058b45c3d1f8e15d7d20
MD5 93b8aff4d3a1b13b52db9c13c7839c23
BLAKE2b-256 929f1d4b35da87276f7cabda3820d5a173a6161dab961129b94fdcd7642b0eb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page