Giter VIP home page Giter VIP logo

arabic-ocr's Introduction

Arabic OCR

GitHub contributors GitHub forks GitHub stars GitHub license

  • OCR system for Arabic language that converts images of typed text to machine-encoded text.
  • The system aims to solve a simpler problem of OCR with images that contain only Arabic characters (check the dataset link below to see a sample of the images).

Important Note

The system currently supports only letters (29 letters) ا-ى , لا (no numbers or special symbols).

Setup

Install python then run this command:

pip install -r requirements.txt

Run

  1. Put the images in src/test directory
  2. Go to src directory and run the following command
    python OCR.py
  3. Output folder will be created with:
    • text folder which has text files corresponding to the images.
    • running_time file which has the time taken to process each image.

Pipeline

Pipeline

Dataset

  • Link to dataset of images and the corresponding text: here.
  • We used 1000 images to generate character dataset that we used for training.

Examples

Line Segmentation

Line

Word Segmentation

Word

Character Segmentation

Word Word Word Word

Testing

NOTE: Make sure you have a folder with the truth output with same file names to compare it with the predicted text.

From within src folder run:

python edit.py 'output/text' 'truth'

Test

Performance

  • Average accuracy: 95%.
  • Average time per image: 16 seconds.

NOTE

We achieved these results when we used only the flatten image as feature.


References

  1. An Efficient, Font Independent Word and Character Segmentation Algorithm for Printed Arabic Text.

  2. A Robust Line Segmentation Algorithm for Arabic Printed Text with Diacritics.

  3. Arabic Character Segmentation Using Projection Based Approach with Profile's Amplitude Filter .

arabic-ocr's People

Contributors

husseinyoussef avatar dependabot[bot] avatar hassanosama avatar gazorpazo0rp 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.