Code Monkey home page Code Monkey logo

cmsc265-optical-character-recognition-ml's Introduction

CMSC 265 Exercise 5 - Optical Character Recognition II

Requirements

  1. Python 3.6.x
  2. OpenCV 3.x

Note: Make sure that Python is compiled with framework enabled when installing on macOS systems.

Installing dependencies

This project requires a working installation of OpenCV 3. Please install this first before installing the project dependencies.

Dependencies of this project can be installed via PIP.

Follow these steps to install the setup the application:

  1. Run the command pyvenv venv to setup a Python 3 virtual environment.

  2. Activate the virtual environment by running source venv/bin/activate

  3. Install the project dependencies by running pip install -r requirements.txt

  4. Locate your OpenCV Python bindings and type the command echo <Python OpenCV bindings path> >> ./venv/lib/<python version>/site-packages/opencv3.pth.

    Where:

    1. <Python CV bindings path>: is the site-packages folder inside the OpenCV installation. Please make sure you select the appropriate version of bindings that matches the Python version declared in the requirements.

    2. <python version>: is the version under your venv virtual environment folder

  5. Create the folder assets/img inside the root of the project directory and place the input images inside the newly created folder.

Running the Program

Training the OCR

You can train the OCR by running the command python train.py or using the command line tool provided by typing the command ./ocr.py train <training_images_directory> <output_knowledge_data_path>. For more options in the command line tool, you can use ./ocr.py train --help.

Testing Identification Knowledge

You can verify the ability of the OCR to recognize the characters from the test image by running python test.py or using the command line tool provided by typing the command ./ocr.py recognize <input_image> <knowledge_data_path>. For more options in the command line tool, you can use ./ocr.py recognize --help.

License

MIT

cmsc265-optical-character-recognition-ml's People

Contributors

ecsnavarretemit avatar

Stargazers

 avatar

Watchers

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