Giter Site home page Giter Site logo

cmc-7-trained-model's Introduction

CMC-7 Check Character Recognition System

Table of Contents

Overview

The CMC-7 Check Character Recognition System is a deep learning project aimed at recognizing CMC-7 characters on checks. The project combines data preprocessing, model training, and optical character recognition (OCR) techniques to accurately identify CMC-7 characters from check images.

Built With

This project utilizes the following frameworks and libraries:

  • TensorFlow - Deep learning framework used for creating and training the neural network model.
  • OpenCV - Computer vision library for image preprocessing and manipulation.
  • PIL - Python Imaging Library for handling image operations.
  • Augmentor - Augmentation library for generating diverse training data.
  • Keras - High-level neural networks API running on top of TensorFlow.
  • Python - Programming language used for the project.

Project Structure

The project is organized into several directories:

  • data: Contains training, validation, and test data in specific class folders.
  • models: Contains the trained CNN model and its architecture definition.
  • src: Contains modules for data preprocessing, model training.
  • main.py: The entry point for preprocessing, training, and saving the model.
  • testModel.py: Used to test the trained model's recognition performance.
  • data_augmentor.py: A script for augmenting custom bank-specific CMC-7 characters to enhance model recognition.

Getting Started

  1. Clone the repository:

    git clone https://github.com/seifKader/CMC-7-trained-model.git
    cd CMC-7-trained-model
  2. Install the required dependencies:

    pip install -r requirements.txt

Run Project

To run the project and test the trained model's recognition on your own images, follow these steps:

  1. Prepare Your Data: Before running the project, ensure that you have your training, validation, and test datasets ready as described in the data directory. Alternatively, you can use the existing trained model if available.

  2. Open testModel.py: Navigate to the project directory and open the testModel.py script in your preferred text editor.

  3. Specify Your Test Image: In the testModel.py script, find the following line(a test image is provided you can try it):

    img_path = "test.jpg"

    Replace "test.jpg" with the path to your own test image.

  4. Run the Script: Open your terminal or command prompt and execute the following command to run the script:

    python testModel.py
  5. View Results: The script will process the image and display the predicted class for each recognized character in the console output.

Note: The testModel.py script processes the provided image and prints the predicted classes for the recognized characters. If you want to further enhance the visual feedback, consider modifying the script to draw bounding boxes around the recognized characters.

Data Preprocessing

The preprocess.py module under src/data_preprocessing prepares the data by loading images, converting them to grayscale, normalizing, and creating labels. This processed data is then ready for training.

Model Training

The train.py module under src/model_training defines a Convolutional Neural Network (CNN) architecture and trains it on the preprocessed data. The trained model is saved for future use.

Data Augmentation

Enhance model recognition for custom bank-specific CMC-7 characters by following these steps:

  1. Prepare Cropped Images: Gather cropped images of bank-specific CMC-7 characters. Each character should be in its own image file.

  2. Specify The Character Image: In the data_augmentor.py script, locate the following line:

    p = Augmentor.Pipeline("path to your image")

    Replace "path to your image" with the path to the image of the character you want to augment.

  3. Run the data_augmentor.py Script: Execute the following command in your terminal or command prompt:

    python data_augmentor.py

Note: Feel free to explore and customize the project to meet your specific needs and further enhance character recognition accuracy.

cmc-7-trained-model's People

Contributors

saifkader avatar

Stargazers

 avatar Souhail Krissaane avatar  avatar  avatar

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.