GithubHelp home page GithubHelp logo

gaspumpocr's Introduction

Gas Pump OCR

Project for attempting to scan pictures of gas pumps and detect the digits in the cost and fuel amount displays. Operating under the assumption that most pumps use a 7 segment digit display.

Dependencies

  • Python
  • OpenCV
  • NumPy

Global Setup

  • brew install python - Using python 2.7.13
  • brew install opencv3 - Using >= OpenCV 3.2.0
  • Install the OpenCV package into the python site packages following the instructions from the above command output

Virtual Env

  • pip install virtualenv - Install virtualenv if you haven't
  • virtualenv GasPumpOCR_Env - Create virtual env
  • source GasPumpOCR_Env/bin/activate - Activate virtual env
  • pip install -r requirements.txt - Install dependencies
  • Write/run the code
  • deactivate - When you are done and want the global python env

virtualenvwrapper

virtualenvwrapper is a nice set of wrappers around virtualenv that make it easier to use

Install and configure virtualenvwrapper

pip install virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Create new env

mkvirtualenv GasPumpOCR_Env

Work on a virtual env

workon GasPumpOCR_Env

Install dependencies

pip install -r requirements.txt

Deactivate

deactivate

Running

  • playground.py [file_name] - Used to try out different image manipulation variables, can hardcode an image or pass one in via the command line
  • train_model.py - Used to take a folder organization of confirmed digits and generate a knn training file
  • test_processing.py - Used to run the trained algorithm on a folder of test images to test accuracy, can also be setup to test all the configurations to determine optimal values
  • generate_distorted_images.py - Used to take an image or a folder and run a set of image manipulations to create addtional sample images

Screenshot

Playground Screenshot

gaspumpocr's People

Contributors

kazmiekr avatar

Watchers

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