Coder Social home page Coder Social logo

arabic_ocr's Introduction

Arabic_OCR

alt text
This repo contains Arabic OCR App. The APP can be used to extract the Arabic text from the images. This was built based on the EasyOCR library. EsayOCR built detection/recognition model to detect and recognize the characters and words. For detection part they used the pretrained model for CRAFT algorithm. For recognition they built a CRNN model. For our case, we used the two pretrained model for Arabic language. To create the wep app, we used the Streamlit library.

Installation

There are many option to run or install the app we will show three of them:

1. Run via Colab

you can run colab notebook and go through the ngrok link to run the app.
Open In Colab,

2. Install via conda

In this step we assume that conda is preinstalled on the machine. If conda is not installed you can follow the steps on the that link

  1. At first we need to clone the repo to the local machine.
git clone https://github.com/maidaly/Arabic_OCR.git
  1. Create a new conda enviroment to run the app inside it.
conda create --name arabic_ocr
conda activate arabic_ocr
  1. Install the required python packages
pip install -r requirements.txt
  1. Run the app
streamlit run app.py

The command need to run from the folder that contains the repo files. It will generate two links you can go throgh http://localhost:8501 to run the app on the local host.

3. Run via docker container

In this step we assume that Docker is running on your machine.

  1. Clone the repo silmilar to conda installtion.
  2. Convert directory to the repo location.
  3. Build a docker image.
docker image build -t arabic_ocr:app 
  1. Run the image
docker run -p 8501:8501 arabic_ocr:app 

After running the image we can go to http://localhost:8501 to run the app.

Note

  • The first time running the app it may take time (some moments) to download the pretrained models that used. The time depends on the network speed. Then the pretrained models will be saved to used later.
  • The app is running faster with the machine that contains Nvidia gpus. If the gpu is not availble the app will run but with slow performance.

arabic_ocr's People

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.