All Projects → urbanclap-engg → smart-docs-parser

urbanclap-engg / smart-docs-parser

Licence: MIT License
An OCR based document parser to extract information from identity document images

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to smart-docs-parser

Php-Google-Vision-Api
Google Vision Api for PHP (https://cloud.google.com/vision/)
Stars: ✭ 61 (+335.71%)
Mutual labels:  ocr, google-vision
solr-ocrpayload-plugin
Efficient indexing and retrieval of OCR bounding boxes in Solr
Stars: ✭ 22 (+57.14%)
Mutual labels:  ocr
Iron-OCR-Image-to-Text-in-CSharp
Image to Text Tutorial in C# - See https://ironsoftware.com/csharp/ocr/tutorials/how-to-read-text-from-an-image-in-csharp-net/
Stars: ✭ 65 (+364.29%)
Mutual labels:  ocr
PRLib
Pre-Recognition Library - library with algorithms for improving OCR quality.
Stars: ✭ 22 (+57.14%)
Mutual labels:  ocr
Android-Text-Scanner
Read text and numbers with android camera OCR
Stars: ✭ 27 (+92.86%)
Mutual labels:  ocr
ocr
Simple app to extract text from pictures using Tesseract
Stars: ✭ 98 (+600%)
Mutual labels:  ocr
Seven-Segment-OCR
Computer vision project to automatically recognize digits characters in a seven-segments display
Stars: ✭ 58 (+314.29%)
Mutual labels:  ocr
CTC-OCR
A TensorFlow implementation of hybird CNN-LSTM model with CTC loss for OCR problem
Stars: ✭ 27 (+92.86%)
Mutual labels:  ocr
car-OCR
基于机器学习和OCR的车牌识别系统 @fujunhao
Stars: ✭ 39 (+178.57%)
Mutual labels:  ocr
tesseract-server
A small lightweight HTTP server that converts photos, images and scanned documents to text using optical character recognition by utilizing the power of Google Tesseract.
Stars: ✭ 15 (+7.14%)
Mutual labels:  ocr
staff identity card ocr project
Staff Identity Card OCR Project
Stars: ✭ 15 (+7.14%)
Mutual labels:  ocr
screenshot-actions
Dunst actions for screenshots (OCR, upload to 0x0.st, delete, rename, move to/from clipboard)
Stars: ✭ 49 (+250%)
Mutual labels:  ocr
ScreenAccess
Anti Recoil system with weapon type built-in recognition based on OCR, currently support next games: Apex Legends
Stars: ✭ 41 (+192.86%)
Mutual labels:  ocr
easyocr
easy to ocr
Stars: ✭ 49 (+250%)
Mutual labels:  ocr
MillionHeros
Android直播答题助手,支持全部答题APP,百万英雄/百万赢家/冲顶大会/芝士超人
Stars: ✭ 23 (+64.29%)
Mutual labels:  ocr
scanbot-sdk-example-ionic
Scanbot scanner SDK example app for Ionic with Cordova.
Stars: ✭ 24 (+71.43%)
Mutual labels:  ocr
VehicleInfoOCR
Use your camera to read number plates and obtain vehicle details. Simple, ad-free and faster alternative to existing playstore apps
Stars: ✭ 35 (+150%)
Mutual labels:  ocr
pdf2xml-viewer
A simple viewer and inspection tool for text boxes in PDF documents
Stars: ✭ 82 (+485.71%)
Mutual labels:  ocr
breach-protocol-autosolver
Solve breach protocol minigame in second(s). Windows/Linux/GeForce Now/Google Stadia. Every language.
Stars: ✭ 28 (+100%)
Mutual labels:  ocr
namsel
An OCR application focused on machine-print Tibetan text
Stars: ✭ 22 (+57.14%)
Mutual labels:  ocr

smart-docs-parser

smart-docs-parser is a NodeJs library to parse details from ID images.

https://medium.com/urbanclap-engineering/document-details-parsing-using-ocr-170bf6ad8a97

How does it work?

smart-docs-parser works in three steps:

  • Extraction of raw text from document image using OCR
  • Validation of document image based on passed document type and extracted raw text
  • Parsing relevant information from raw text using document parser

Installation

$ npm install smart-docs-parser

Usage

Configuration

Create a config folder at the root of your project. Add default.json file to the config folder.

config/default.json

{
  "smart-docs-parser": {
    "api_keys": {
      "google-vision": "YOUR_API_KEY"
    }
  }
}

Code

// ES6 import statement
import SmartDocuments from 'smart-docs-parser';

// Sample Request
const extractedDocumentDetails = await SmartDocuments.extractDocumentDetailsFromImage({
    document_url: 'https://avatars2.githubusercontent.com/u/20634933?s=40&v=4',
    document_type: 'PAN_CARD',
    ocr_library: 'google-vision'
});

// Sample Response
{ raw_text: 
   [ 'INCOME TAX DEPARTMENT',
     'GOVT. OF INDIA',
     'Permanent Account Number Card',
     'PANAM8144G',
     '/Name',
     'ID NAME',
     'frar TT /Father\'s Name',
     'FATHER NAME',
     'ae of Birth',
     '13/02/1994',
     'SIGN',
     'at / Signature',
     '' ],
  is_document_valid: true,
  document_details: 
   { document_type: 'PAN_CARD',
     identification_number: 'PANAM8144G',
     name: 'ID NAME',
     date_of_birth: '1994-02-13T00:00:00.000Z',
     fathers_name: 'FATHER NAME' 
   } 
}

Interfaces

Request

export interface ExtractDocumentDetailsFromImageRequest {
  document_url: string;
  document_type: string;
  ocr_library: string;
  custom_parser?: object; // Only for custom parsers
  custom_ocr?: object; // Only for custom OCRs
  timeout?: number; //Optional request timeout parameter, defaults to 30 secs
}

Response

export interface ExtractDocumentDetailsFromImageResponse {
  raw_text: Array<string>;
  is_document_valid: boolean;
  document_details: DocumentDetails | object;
}
interface DocumentDetails {
  document_type?: string;
  identification_number?: string;
  name?: string;
  fathers_name?: string;
  date_of_birth?: string;
  gender?: 'M'|'F';
  address?: string;
}

raw_text is the text extracted by the OCR

is_document_valid denotes whether the document is valid based on input document_type and extracted raw_text

document_details is the document information parsed using the specific document parser

Supported Request Parameters

Document Type

  • PAN CARD
    document_type: 'PAN_CARD'
  • AADHAAR CARD
    document_type: 'AADHAAR_CARD'

OCR Library

  • Google Vision
    ocr_library: 'google-vision'

Current limitations

Address parsing

Library can parse state name and pin-code but the accuracy of the system for complete address text parsing is not upto the mark due to the noise introduced by multilingual text.

Contributions

Contributions are welcome. Please create a pull-request if you want to add more document parsers, OCR libraries, test-support or enhance the existing code.

Extending smart-docs-parser

For specific use-cases

Contributing to the library

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].