Giter VIP home page Giter VIP logo

ocr-benchmark's Introduction

ONLINE OCR

Mobile friendly web app to perform OCR.

Local (client side) and Remote (server side) options are available.

Benchmark option compares local and remote performances.

Uses Docker and Kubernetes to deploy a cluster on Google Container Engine. Uses MongoDB replica set of 3 nodes with persistent disk. Uses Google Cloud Storage to save source images.

RESTRICTIONS

Allowed image extensions:

  • jpg
  • jpeg
  • png

Not compatible with Safari.

INSTRUCTIONS

To run it locally follow these steps:

# Install needed dependencies
apt-get update --fix-missing
apt-get install build-essential python python-dev python-pip python-virtualenv libjpeg-dev libffi-dev libssl-dev tesseract-ocr --assume-yes

# Clone the code
git clone https://github.com/federico-fiorini/ocr-benchmark.git
cd ocr-benchmark

# Install virtualenv
pip install --upgrade pip virtualenv

# Install mongodb
# On Mac
brew install mongodb

# On Ubuntu
sudo apt-get install -y mongodb-org

# Run mongodb deamon in a new terminal
mongod

# Back to previous terminal: create virtual environment
virtualenv .env
.env/bin/pip install -r requirements.txt

# Set env variables
export UPLOAD_FOLDER="/tmp"
export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials/google-cloud-auth.json"

# Run
./run.py

# Open the browser at the given IP address

DEPLOYMENT

To deploy on google cloud follow these steps:

# 1) Install gcloud and authenticate
sudo ./install_gcloud.sh

# 2) Run deployment script
sudo ./deploy.sh

# 3) Open the browser at the given IP address

To roll out an update run:

# Deploy the last version of the code
./roll_update.sh v2

HOW TO USE IT

Login with one of the following test users:

  • username: user1, password: password1
  • username: user2, password: password2
  • username: user3, password: password3

ocr-benchmark's People

Contributors

federico-fiorini avatar

Watchers

James Cloos avatar  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.