Skip to content

cloklindt/OCR

Repository files navigation

OCR Web Application

A web application for Optical Character Recognition (OCR) that supports both printed and handwritten text recognition. The application uses PaddleOCR for handwritten text and Tesseract.js for printed text.

Features

  • Support for both printed and handwritten text recognition
  • Multiple language support
  • PDF and image file processing
  • Text summarization
  • Export functionality (PDF and DOCX)
  • Real-time processing status
  • Detailed OCR configuration options

Tech Stack

Frontend

  • React
  • TypeScript
  • Tesseract.js
  • PDF.js
  • React Dropzone
  • React Toastify

Backend

  • FastAPI
  • PaddleOCR
  • Python
  • OpenCV
  • NumPy

Installation

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • npm or yarn

Backend Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Start the backend server:
uvicorn app.main:app --reload

Frontend Setup

  1. Install dependencies:
cd frontend
npm install
  1. Start the development server:
npm run dev

Usage

  1. Open the application in your browser (default: http://localhost:5173)
  2. Upload an image or PDF file
  3. Select the document language
  4. Choose between handwritten or printed text
  5. Click "Extract Text" to process the document
  6. View and edit the extracted text
  7. Export the result as PDF or DOCX

Configuration

OCR Settings

  • Page Segmentation Mode (PSM)
  • OCR Engine Mode (OEM)
  • Character whitelist/blacklist
  • Language selection
  • Handwritten text detection

Performance Settings

  • Image preprocessing
  • Batch processing
  • Confidence thresholds
  • Processing retries

License

MIT

Author

Christopher Loklindt (christopher@loklindt.dk)

About

Testing OCR website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors