Skip to content

linhub15/idify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idify

Automatically fillup government forms with your id card.

IDify_recording.mov

local frontend server (Node)

# npm (default)
npm run --prefix frontend dev
# or pnpm
pnpm run --prefix frontend dev

Form fields

family_name: string
given_name: string
address: string
date_of_birth: string (ISO 8601)
license_number: NNNNNN-NNN
sex: "M" | "F" | "X"

OCR API

curl -X 'POST' \
  'http://127.0.0.1:8000/upload-image/' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@/Users/habib/Documents/idify/pysrc/img/high_contrast.jpeg;type=image/jpeg'  

Sample Response:

{
  "message": "Image received and processed!",
  "data": {
    "license_number": "134711-320",
    "first_name": "Sam",
    "last_name": "SAMPLE",
    "street_address": "24 My Place Street",
    "post_code": "T5J 2M6",
    "city": "Anywhere",
    "province": "Alberta",
    "country": "Canada",
    "issue_date": "17 MAY 2018",
    "date_of_birth": "20 NOV 1971",
    "sex": "M",
    "eye_color": "Brown",
    "hair_color": "Brown",
    "height": "182 cm",
    "weight": "83 kg"
  }
}