Giter Site home page Giter Site logo

ocr-arabic's Introduction

ocr-arabic

OCR + transliteration on arabic scanned images

Used specifically for Lebanese Government ID card scanned images

Installation

  • clone this repository
  • install jq, curl, direnv
  • copy .envrc.dist to .envrc and set Google vision API key into env var GOOGLE_VISION_API_KEY
    • get it from google cloud console
  • direnv allow .

Usage

Download example scanned ID

wget https://www.tradearabia.com/source/2014/08/06/id.jpg -O images/id.jpg

Run OCR and transliteration

./ocr-arabic.sh images/id.jpg

Example input

example scanned ID

Example output

Transliterated                          |                                     OCR
---------------------------------------------------------------------------------
United Arab Emirates o                  |                  o setarimE barA detinU
. ldentity card                         |                         drac ytitnedl .
dwlp Al<mArAt AlErbyp AlmtHdp           |ةدحتملا ةيبرعلا تارامإلا ةلود
bTAqp hwyp                              |                     ةيوه ةقاطب
Number                                  |                                  rebmuN
rqm Alhwyp / ID                         |                DI / ةيوهلا مقر
784-1977-1234566-1                      |                      1-6654321-7791-487
mn Al<sm: AHmd mHmd Ebd Allh            |هللا دبع دمحم دمحا :مسإلا نم
Name: Ahmed Mohamed Abdulla             |             alludbA demahoM demhA :emaN
Aljnsyp: Al<mArAt AlErbyp AlmtHdp       |ةدحتملا ةيبرعلا تارامإلا :ةيسنجلا
Nationality: United Arab Emirates       |       setarimE barA detinU :ytilanoitaN

ocr-arabic's People

Contributors

shadiakiki1986 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.