Coder Social home page Coder Social logo

raleighlittles / passport_mrz_decoder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14.52 MB

Automatic online passport MRZ decoding using Flask and Tesseract. Deployment coming soon!

Python 62.45% HTML 37.55%
icao-9303 mrz ocrb passport pytesseract-ocr td3 mrv-a

passport_mrz_decoder's Introduction

Context

If you've ever looked closely at your passport, you'll notice 2 lines of text at the bottom.

passport image example

This is called the "machine-readable zone" and it encodes basic information about your passport. At border checkpoints, its used to verify that the info in your passport isn't falsified and that your passport isn't expired.

I couldn't find any online, open-source MRZ decoders so I decided to make my own.

About

This repository contains a simple MRZ decoder for passports. It consists of a Flask webapp that lets you either: (1) enter your own passports MRZ as text (2) upload a photo of your passport; to view the decoded MRZ results.

Screenshot of main UI

Here's the result of a sample submission:

Result screenshot sample

Note: So far it's only been tested on American passports. Other passports that use the TD3 or MRV-A standards (which have 2-line, 44-characters-per-line MRZ) should theoretically work. See the further reading section for more info.

The examples folder contains some examples of passports to test with.

Usage/Setup

Install dependencies:

$ pip install -r requirements.txt

Load flask app:

$ flask --app main run --debug

Troubleshooting

Flask app won't connect?

Go to: chrome://net-internals/#sockets

click "Flush socket pools"

flush socket pools image

Further reading

passport_mrz_decoder's People

Contributors

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