GithubHelp home page GithubHelp logo

ocr-accuracy-evaluator's Introduction

OCR Preprocessing and Recognition Project

Project Overview

This Python project utilizes the Tesseract OCR engine through the pytesseract wrapper and the Python Imaging Library (PIL) to perform Optical Character Recognition (OCR) on images. The main goal is to compare the accuracy of OCR results with and without various image preprocessing methods.

Features

  • Tesseract OCR Integration: Utilize the Tesseract engine to extract text from images.
  • Image Preprocessing: Implement different image preprocessing techniques like erosion, dilation, and color filtering to enhance OCR accuracy.
  • Accuracy Measurement: Calculate the OCR accuracy using the Levenshtein distance, providing a metric for comparing different preprocessing methods.

Prerequisites

  • Python 3.x
  • pytesseract
  • Pillow (PIL)
  • OpenCV
  • NumPy

Installation

  1. Install Python Packages:

  2. Tesseract OCR:

  • Download and install Tesseract from Tesseract GitHub.
  • Ensure the Tesseract path is configured correctly in the script:
    pytesseract.pytesseract.tesseract_cmd = r"C:\\Program Files\\Tesseract-OCR\\tesseract.exe"

Usage

  1. Load the Image:
  • Place the image you want to process in the project directory.
  1. Run the Script:
  • Execute the Python script to perform OCR on the image.
  • Adjust the preprocessing functions as needed to compare different results.
  1. View Results:
  • The script will display the original and preprocessed images along with their OCR results and accuracy.

Contributing

Contributions to enhance the functionality or the efficiency of the OCR process are welcome. Please ensure to submit a pull request with a clear description of your changes.

ocr-accuracy-evaluator's People

Contributors

belalabulabn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.