Skip to main content

TrueOCR

OCR tiếng Việt tốc độ cao trên CPU. Đọc ảnh nhiều dòng hoặc crop một dòng; trả về text, bbox và confidence. Model khoảng 8 MB kèm trong package, chạy offline, không cần GPU hay PyTorch.

Tốc độ CPU

Xeon Platinum 8358P, 1 thread, batch 1, cùng 128 crop × 3 lượt/model @TrueOCR 0.1.0.

p50 latency của 8 recognizer trên CPU; thanh ngắn hơn là nhanh hơn.

Model p50, ms/crop ↓ p95, ms/crop ↓ p50 / TrueOCR
TrueOCR 0.1.0 1.54 2.35 1.0×
Tesseract fast 5.89 15.29 3.8×
PaddleOCR v6 tiny 10.76 12.29 7.0×
Tesseract best 20.24 49.06 13.2×
PaddleOCR v5 Latin mobile 29.43 30.79 19.1×
EasyOCR latin_g2 30.03 68.90 19.5×
VietOCR vgg_seq2seq 71.77 98.01 46.7×
VietOCR vgg_transformer 137.85 231.45 89.7×

Đo latency của crop recognition, gồm preprocessing, inference và text decoding. Không gồm model loading, image I/O hay text detection cho cả trang. Benchmark setup, baseline config và số liệu từng request.

Quick Start

Python ≥3.10.

pip install trueocr
from trueocr import load_model

model = load_model()  # Load một lần, dùng lại cho nhiều ảnh
result = model.predict("anh.jpg")
print(result.text)

Mặc định đọc ảnh nhiều dòng. Với crop một dòng: model.predict("crop.png", mode="line"). Lấy bbox và confidence qua result.lines; lưu text, JSON và ảnh bbox bằng result.save("output").

CLI: trueocr anh.jpg --out output/.

Chất lượng và giới hạn

Model dùng cho chữ in tiếng Việt. Handwriting, scene text và font lạ còn yếu; crop quá rộng hoặc chứa nhiều dòng dễ sai. Kết quả theo dataset.

API và config · Notebook · Release · Apache-2.0

Metadata

Release files for trueocr 0.1.1

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

Source distribution (sdist)

Source distribution for trueocr 0.1.1
File Size Uploaded Provenance
trueocr-0.1.1.tar.gz 7.4 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for trueocr 0.1.1
File Interpreter ABI Platform
trueocr-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 MB

Release files / trueocr-0.1.1.tar.gz

Download URL trueocr-0.1.1.tar.gz
Size 7.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c25b4b2e486b9434f600fb083db70022b6b01f55708b868df4373950cd7e7d3e
BLAKE2b-256 checksum
How to use checksums
695fd537adcab7ab74fc705f419a4be0571d6e4022fb0aaaf478c9911171d43d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / trueocr-0.1.1-py3-none-any.whl

Download URL trueocr-0.1.1-py3-none-any.whl
Size 7.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8a7e4141d5f06f602684ea5dbafd775d11787d7319d39baaabf5e41158597374
BLAKE2b-256 checksum
How to use checksums
dbdbf32d13bb09f875b8f8b301c83ea4f8dfe92fcb543f49ca11daed5a0657b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for trueocr 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trueocr-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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.1 This release

2 release files Full 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