Skip to content

47thtechcorner/RayCodes_UnlimitedOCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Read Any Document 100% Free - Unlimited-OCR + Ollama Setup

Python Badge Streamlit Badge Ollama Badge Hugging Face Badge


📖 Introduction

Unlimited OCR Works is a high-performance, visual pipeline that bridges Baidu's state-of-the-art Unlimited-OCR (via Hugging Face Gradio API) and local Ollama LLMs (llama3.2:1b) to transcribe and instantly structure documents into clean Markdown.

The entire logic is compiled into a single file of under 100 lines of code (app.py), achieving maximum efficiency with zero fluff.


⚡ Key Features

  • 🎯 Precise OCR: Uses Baidu's Unlimited-OCR model for detailed document transcription.
  • 🧠 Local LLM Structuring: Post-processes raw OCR outputs locally with Ollama (configured to use fast models like llama3.2:1b with think=false).
  • 🎛️ Streamlit Dashboard: A native Web UI featuring a side-by-side layout, image visualization, and instant status monitoring.
  • 📝 Automated Output saving: Writes parsed tables directly to output.md on every run.

🛠️ Tech Stack & Dependencies

  • Core Engine: gradio_client (Baidu Space connection)
  • Structuring: ollama (Official Python SDK client)
  • Frontend: streamlit (UI rendering)
  • Image handling: pillow (mock receipt builder)

🚀 Setup & Launch (Under 10 Seconds)

1. Install Dependencies

pip install -r requirements.txt

2. Verify local Ollama is Running

Make sure the local Ollama server is running and the model is downloaded:

ollama run llama3.2:1b

3. Launch App

streamlit run app.py

📂 File Architecture

📂 Unlimited OCR
 ├── 📄 app.py              # Consolidated frontend and pipeline (<100 lines)
 ├── 📄 requirements.txt    # Minimal dependencies list
 ├── 📄 output.md           # Dynamically saved pipeline result
 └── 📄 README.md           # System documentation

💡 Real-world Use Cases

📋 1. Invoice & Receipt Parsing Automatically extracts financial receipts, totals, tax, server, and quantities directly into a searchable database.
📚 2. Academic & Multi-column Parsing Handles complex layouts (multi-column text, annotations, footers) and structures them sequentially.
🏥 3. Medical Report Structuring Parses unstructured legacy lab results and scanning logs into standard clinical reports.
📦 4. Logistics & Manifest Auditing Converts raw warehouse logs, shipping slips, and packaging details into auditable cargo manifests.
🏛️ 5. Historical Archive Search Processes old print archive scans, cleaning up syntax anomalies and archaic spelling via the local LLM.

🔮 Roadmap

  • Offline OCR Execution: Fallback to local execution of Unlimited-OCR model if local CUDA device exists.
  • PII Redaction: Auto-mask sensitive data (emails, credit cards, phones) before passing text to the LLM.
  • Custom JSON Schema: Custom output schema constructor in the Streamlit UI.

🏷️ Keywords

Unlimited-OCR, Ollama OCR, Local LLM OCR, Streamlit OCR, Baidu Unlimited OCR, Free Document Parsing, Python OCR Pipeline, Gradio Client OCR

About

A high-performance document parsing and structuring pipeline using Baidu Unlimited-OCR and local Ollama.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages