Skip to content

Repository files navigation

ScribbleQ

Digitize documents. Recognize handwritten content. Export structured text.

Python Streamlit PyTorch OCR


Type
OCR Application
Input
PDF / JPG / PNG
Output
Text / JSON / PDF
Interface
Streamlit

01 · Overview

Handwritten document digitization system

ScribbleQ is an OCR-based document intelligence application for converting handwritten documents into clean digital text.

The system combines document input handling, text-region detection, recognition, structured output, and an interactive Streamlit interface for fast document processing.

┌──────────────────────────────┐
│  SCRIBBLEQ OCR CONSOLE       │
├──────────────────────────────┤
│  Input      PDF / Image      │
│  Detect     Text Regions     │
│  Recognize  Handwriting      │
│  Output     Text / JSON      │
│  UI         Streamlit        │
└──────────────────────────────┘

02 · OCR Pipeline

ScribbleQ OCR pipeline


03 · System Architecture

flowchart TD
    A[PDF / Image Input] --> B[Document Loader]
    B --> C[Text Detection]
    C --> D[Text Recognition]
    D --> E[Structured Output]
    E --> F[Text Export]
    E --> G[PDF Export]
    E --> H[JSON Export]
    I[Streamlit UI] --> B
Loading

04 · Key Features

Feature Purpose
Handwritten OCR Converts handwritten document content into digital text.
Multi-format input Supports PDFs and common image formats.
Detection and recognition flow Separates page analysis from text recognition for cleaner processing.
Structured output Produces data that can be reused in downstream workflows.
Export utilities Supports text, JSON, and PDF-oriented output paths.
Streamlit interface Provides a simple interactive upload and processing experience.

05 · AI Workflow

flowchart LR
    A[Document] --> B[Preprocess]
    B --> C[Detect Text Blocks]
    C --> D[Recognize Text]
    D --> E[Assemble Output]
    E --> F[Export]
Loading
Stage Output
Input loading PDF or image document converted into processable pages.
Detection Located text regions and layout blocks.
Recognition Handwritten content converted into digital text.
Structuring Text arranged into export-ready payloads.
Export Text, JSON, or PDF output.

06 · Installation

git clone https://github.com/ns7523/ScribbleQ.git
cd ScribbleQ
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

07 · Usage

Run the Streamlit app:

streamlit run streamlit_app.py

Open the local interface:

http://localhost:8501

Python API example:

from hwte.io import DocumentFile
from hwte.models import ocr_predictor

model = ocr_predictor(pretrained=True)
doc = DocumentFile.from_pdf("document.pdf")
result = model(doc)

print(result.export())

08 · Project Structure

.
├── assets/
│   └── brand/
│       ├── hero.svg
│       └── pipeline.svg
├── demo/
│   ├── app.py
│   └── backend/
│       └── pytorch.py
├── hwte/
├── streamlit_app.py
├── requirements.txt
└── README.md

Suggested production structure:

docs/ · demo/ · hwte/ · tests/ · examples/ · assets/screenshots/ · requirements.txt

09 · Visual Assets

Upload Interface

assets/screenshots/upload-interface.png

Streamlit upload and document selection flow.

OCR Result

assets/screenshots/ocr-result.png

Recognized text output.

Export View

assets/screenshots/export-view.png

Text, PDF, and JSON export options.

Pipeline View

assets/screenshots/pipeline-view.png

Visual overview of detection and recognition stages.


10 · Future Improvements

  • Add sample input and output examples.
  • Add OCR accuracy and latency benchmarks.
  • Add screenshots under assets/screenshots/.
  • Add deployment notes for Streamlit Cloud.
  • Add tests for input loading and export utilities.
  • Add documentation for OCR model components.
  • Add a clear license file.

N S Akash

AI & Cybersecurity Engineer

GitHub Portfolio Email LinkedIn

About

ScribbleQ (HWTE) is a Streamlit-based handwritten text extraction and digitization tool that converts handwritten documents (PDF/images) into editable text with OCR, allowing export in TXT/PDF and optional translation into multiple languages.

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages