Skip to main content

khmer-id-reader

Free, open-source Cambodian national ID card OCR library.

Reads all printed fields, verifies MRZ check digits, and cross-checks the Khmer name against the Latin printing.

Install

pip install khmer-id-reader

Usage

Python

from khmer_id_reader import read_card

result = read_card("my_id_photo.jpg")
print(result.name_latin)   # SIM VATTANAC
print(result.id_number)    # 101080854 (01)
print(result.mrz_verified) # True
print(result.to_json())    # full JSON output

Command line

khmer-id-reader my_id_photo.jpg

What it reads

  • Name (Khmer + Latin, cross-verified)
  • Date of birth, sex, height
  • Place of birth
  • Address (verified against national gazetteer)
  • ID number
  • Validity period
  • Nationality
  • Full MRZ (3 lines, check-digit verified)

Models

Models are auto-downloaded from HuggingFace on first use (~50 MB).

License

Apache 2.0

Author

Sim Vattanac

Metadata

Release files for khmer-id-reader 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for khmer-id-reader 0.1.0
File Size Uploaded Provenance Actions
khmer_id_reader-0.1.0.tar.gz 13.3 MB Without provenance Details for khmer_id_reader-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for khmer-id-reader 0.1.0
File Interpreter ABI Platform Actions
khmer_id_reader-0.1.0-py3-none-any.whl Python 3 none any Details for khmer_id_reader-0.1.0-py3-none-any.whl

Total release size: 26.7 MB

Release files / khmer_id_reader-0.1.0.tar.gz

Download URL khmer_id_reader-0.1.0.tar.gz
Size 13.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9b289b4445eecad100eb8a8eaf688e8e47981d160fb06b9999df2c1ad5a29cc6
BLAKE2b-256 checksum
How to use checksums
f668908c6cab7d72e4768a13e0cdf80aa48495b9d343b121831c61ce7de1e845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / khmer_id_reader-0.1.0-py3-none-any.whl

Download URL khmer_id_reader-0.1.0-py3-none-any.whl
Size 13.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0fdd0bbbdfdcc0946ea750f08c4fae76a8b9289cec3661277aa562af59a1ee51
BLAKE2b-256 checksum
How to use checksums
0bed0a41c977fd0b5d865b2e86ec225482fe181f03c2c070a172315b71137aa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for khmer-id-reader 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page