Extract guest info from passport and ID scans. Built for hotel receptionists who are tired of manually typing data from document photocopies.
- Feed it a passport/ID image (JPG, PNG) or PDF
- It tries MRZ (Machine Readable Zone) extraction first — the two lines of text at the bottom of passports
- If no MRZ is found, it falls back to full-page OCR with pattern matching
- You get structured fields: name, DOB, passport number, nationality, expiry, sex
pip install docufillDocufill needs Tesseract and Poppler installed on your system:
macOS:
brew install tesseract popplerUbuntu/Debian:
sudo apt-get install tesseract-ocr poppler-utilsWindows:
choco install tesseract popplerRun docufill doctor to verify everything is set up.
# Check dependencies
docufill doctor
# Scan a document
docufill scan passport.jpg
docufill scan passport.pdf --json
# Launch web UI
docufill serve
docufill serve --port 8080docufill serveOpens a local web page with drag-and-drop. Drop a passport scan, get a table of extracted fields with copy buttons.
from docufill.scanner import scan
result = scan("passport.jpg")
print(result.full_name)
print(result.date_of_birth)
print(result.to_json())git clone https://github.com/docufill/docufill
cd docufill
pip install -e ".[dev]"
pytestMIT