Skip to content

soul0101/Automatic-Cheque-Clearing-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic-Cheque-Clearing-System

In spite of the overall rapid emergence of electronic payments, huge volumes of handwritten bank cheques are issued and processed manually every day.

The Automatic Cheque Clearing System leverages AI fuelled technology along with rich rule-based automations to optimize, organize and streamline cheque clearance.

Flow Diagram

flow

Crop and Skew Removal

In scenarios where the scanned cheque is misaligned and not to scale, the daisi runs robust computer vision algorithms to detect and crop to the cheque boundary.

image

Cleaning and Binarization

After cropping the cheque is preprocessed to be cleaned and binarized for uniform text recognition.

image

Segmentation

All Indian banks have to follow the CTS-2010 format of the cheque which lays down dimensions for a valid cheque. We use these dimensions as a template for segmenting our cheques. The daisi is flexible in terms of input templates and can be modified as per the needs.

image

Extracted Information

After segmentation, OCR (Optical Character Recognition) and ICR (Intelligent Character Recognition) algorithms are run to detect printed and handwritten text. The raw extracted text is further sanitized to account for errors in the Text Recognition.


For example, a fuzzy segmentation and correction algorithm is in place for detecting the legal amount.
"One LackTwenthosand" -> "One Lack Ten Thousand"


image

Signature Verification

The signature is paramount to verify the authenticity of the cheque, a deep learning signature extraction and verification algorithm is used to extract, clean and verify the signature.

image

Example API

import os, sys
import json
import numpy as np
from PIL import Image

import pydaisi as pyd
automatic_cheque_clearing_system = pyd.Daisi("soul0101/Automatic Cheque Clearing System")

raw_image = np.array(Image.open('./images/icici1_tilted.png'))
segmentation_template = json.loads(open('./templates/icici.json', "r").read())

raw_extraction_result_pipeline, sanitized_result_pipeline, segments_pipeline = automatic_cheque_clearing_system.cheque_verification_pipeline(raw_image, segmentation_template=segmentation_template).value

Template Format

All dimensions are in millimeter
{
  "cheque_height": <cheque height>,
  "cheque_width": <cheque width>,
  "bounding_boxes": {
    "acc_number": [x, y, w, h],
    "bank_details": [x, y, w, h],
    "payee": [x, y, w, h],
    "courtesy_amount": [x, y, w, h],
    "legal_amount_line_1": [x, y, w, h],
    "legal_amount_line_2": [x, y, w, h],
    "date_box": [x, y, w, h],
    "micr_strip": [x, y, w, h],
    "sign_area": [x, y, w, h]
  }
}

CTS-2010 Template

{
  "cheque_height": 92,
  "cheque_width": 202,
  "bounding_boxes": {
    "acc_number": [24, 42, 90, 15],
    "bank_details": [0, 0, 144, 15],
    "payee": [25, 18, 145, 9],
    "courtesy_amount": [143, 31, 54, 13],
    "legal_amount_line_1": [29, 25, 152, 9.5],
    "legal_amount_line_2": [17, 35, 115, 9.5],
    "date_box": [144, 3, 56, 15],
    "micr_strip": [25, 78, 152, 13],
    "sign_area": [148, 55, 48, 25]
  }
}

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published