Korean Smartphone Receipt OCR Recognizer (ko-receipt-ppocrv5-rec)
English
A Korean thermal receipt text recognition model fine-tuned from korean_PP-OCRv5_mobile_rec (PaddleOCR / PaddleX), optimized for real-world smartphone-captured Korean receipts.
- Checkpoint:
b1a_phone_only/epoch_10(smartphone-only fine-tuning, 10 epochs / 1,520 steps, starting fromwise_round2/alpha_90) - Export SHA-256 (
inference.pdiparams):bda92492779f64aaa44816319a09d8a743d421faf0f41510f0fbe12ed94392d7
1. Default Pipeline & Detector Compatibility
This repository provides recognizer weights and a ready-to-run E2E inference script (predict.py).
- Default E2E setup (
PP-OCRv5stack):- Detector: Official
PP-OCRv5_mobile_det(auto-downloaded by PaddleOCR) - Recognizer:
Beeam9/ko-receipt-ppocrv5-rec(this model)
- Detector: Official
- Optional upgrade (
PP-OCRv6_medium_det):- Because the recognizer is detector-agnostic, you can also pair this model with official
PP-OCRv6_medium_det(PP-OCRv6_medium_det_infer). (Note:PP-OCRv6_medium_detweights are not bundled in this repository and should be loaded separately from official PaddleOCR.) - On long vertical receipts where small single-digit quantities (
1,2, etc.) are frequently missed, pairing withPP-OCRv6_medium_det(limit_side_len=1600,unclip_ratio=1.479, SAHI tiling) improves single-digit detection recall from68.9%to85.1%(+16.2%p).
- Because the recognizer is detector-agnostic, you can also pair this model with official
2. Benchmark Results (Smartphone Receipts)
Evaluated end-to-end with official PP-OCRv6_medium_det on Korean smartphone-captured thermal receipts:
| Split | Metric | Baseline (replay_bn_frozen/ep12) |
This Model (b1a_ep10) |
Delta |
|---|---|---|---|---|
Archive val (51 receipts, 1,438 lines, blind pass-1 GT) |
Single-line CER (with spaces) | 1.97% | 1.68% | -0.29%p |
Archive val (51 receipts, 1,438 lines, blind pass-1 GT) |
Single-line CER (no spaces) | 1.16% | 1.03% | -0.13%p |
Archive test (51 receipts, blind pass-1 GT) |
E2E span_ns CER (no spaces) |
3.91% | 3.71% (495 / 13,341) | -0.20%p |
Polygon holdout (25 unseen receipts, 1,601 lines) |
1:1 CER (with spaces) | 4.62% (722 edits) | 4.12% (643 edits) | -0.50%p |
Polygon holdout (25 unseen receipts, 1,601 lines) |
1:1 CER (no spaces) | 3.20% (452 edits) | 3.15% (445 edits) | -0.05%p |
3. Design Highlights & Known Limitations
What was improved
- Preventing overfitting & out-of-store vocabulary forgetting: Fine-tuning beyond 20 epochs degraded unseen-store product names and wide lines. Starting from the WiSE-FT interpolated checkpoint (
wise_round2/alpha_90) and stopping early at 10 epochs (1,520 steps) on smartphone-only data achieved the best generalization acrossval,test, andholdout. - Optional small-digit recall boost: Lightweight deployment works out of the box with
PP-OCRv5_mobile_det, whilePP-OCRv6_medium_det+ SAHI tiling can be plugged in when small-digit recall is critical.
Known Limitations
- Very wide lines (
W > 480pxatH=48px): Due to the aspect-ratio gap between fixed-width (320ร48) training and natural-width inference, very long lines (e.g., masked card numbers****, long notices) have higher no-space CER (3.90%) than normal lines (W โค 320px,2.82%). - Extreme capture conditions: Heavy crumpling, harsh glare/shadows, or steep rotation angles can degrade accuracy.
4. Usage (PaddleOCR 3.x / PaddleX)
# Default E2E inference (PP-OCRv5_mobile_det + this recognizer)
python predict.py receipt.jpg
# CPU inference
python predict.py receipt.jpg --device cpu
# Optional: pair with locally downloaded PP-OCRv6_medium_det_infer
python predict.py receipt.jpg --det-model-dir ./PP-OCRv6_medium_det_infer
from huggingface_hub import snapshot_download
from paddleocr import PaddleOCR
rec_dir = snapshot_download(repo_id="Beeam9/ko-receipt-ppocrv5-rec")
ocr = PaddleOCR(
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="korean_PP-OCRv5_mobile_rec",
text_recognition_model_dir=rec_dir,
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False,
text_det_limit_side_len=1600,
text_det_unclip_ratio=1.479,
device="gpu:0", # or "cpu"
)
for res in ocr.predict("receipt.jpg"):
for text, score in zip(res["rec_texts"], res["rec_scores"]):
print(f"[{score:.4f}] {text}")
5. Included Files & License
inference.jsonโ Paddle inference model structure (recognizer)inference.pdiparamsโ Trained recognizer weightsinference.ymlโ PaddleX / PaddleOCR preprocessing & character dictionary configprovenance.jsonโ Checkpoint provenance and SHA-256 checksumspredict.pyโ E2E inference script (PP-OCRv5_mobile_det+ this recognizer)- License: Apache 2.0 (same as base
PP-OCRv5model).
ํ๊ตญ์ด
์ค๋งํธํฐ์ผ๋ก ์ดฌ์ํ ํ๊ตญ์ด ์ด์ ์ฌ ์์์ฆ์ ํนํํ์ฌ ํ์ธํ๋ํ ํ
์คํธ ์ธ์(Text Recognition) ๋ชจ๋ธ์
๋๋ค.
PaddleOCR์ korean_PP-OCRv5_mobile_rec๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ๋ฉฐ, ์ค์ ์ค๋งํธํฐ ์์์ฆ ์ดฌ์ ํ๊ฒฝ์์ ๋ฐ์ํ๋ ์ ๋๋นยท์์ ๊ธ์ยท์ํ๋ช
/๊ธ์ก ํ๊ธฐ ์ธ์ ์ฑ๋ฅ์ ๊ฐ์ ํ์ต๋๋ค.
- ์ฒดํฌํฌ์ธํธ:
b1a_phone_only/epoch_10(wise_round2/alpha_90์ถ๋ฐ์ ๊ธฐ๋ฐ ์ค๋งํธํฐ ๋จ๋ 10์ํญ / 1,520์คํ ) - Export SHA-256 (
inference.pdiparams):bda92492779f64aaa44816319a09d8a743d421faf0f41510f0fbe12ed94392d7
1. ๊ธฐ๋ณธ ํ์ดํ๋ผ์ธ ๊ตฌ์ฑ ๋ฐ ๊ฒ์ถ๊ธฐ ํ์ฉ ๋ฐฉ์
๋ณธ ์ ์ฅ์๋ ์ธ์๊ธฐ(Recognizer) ๊ฐ์ค์น์ **E2E ์คํ ์คํฌ๋ฆฝํธ(predict.py)**๋ฅผ ์ ๊ณตํฉ๋๋ค.
- ๊ธฐ๋ณธ ๊ตฌ์ฑ (
PP-OCRv5๋จ์ผ ์ธ๋ ์กฐํฉ)- ๊ฒ์ถ๊ธฐ (Detector): ๊ณต์
PP-OCRv5_mobile_det(PaddleOCR ์๋ ๋ค์ด๋ก๋) - ์ธ์๊ธฐ (Recognizer):
Beeam9/ko-receipt-ppocrv5-rec(๋ณธ ๋ชจ๋ธ)
- ๊ฒ์ถ๊ธฐ (Detector): ๊ณต์
- ํ์ฅ ํ์ฉ ๋ฐฉ์:
PP-OCRv6_medium_det์ ํจ๊ป ์ฌ์ฉํ๊ธฐ- ๋ณธ ์ธ์๊ธฐ๋ ๊ฒ์ถ๊ธฐ์ ๋
๋ฆฝ์ ์ผ๋ก ๋์ํ๋ฏ๋ก, ๊ณต์
PP-OCRv6_medium_det(PP-OCRv6_medium_det_infer)์ ํจ๊ป ์ฌ์ฉํ์ ๋ ๋ฉ๋๋ค. (โปPP-OCRv6_medium_det๊ฐ์ค์น๋ ๋ณธ ์ ์ฅ์์ ํฌํจ๋์ด ์์ง ์์ผ๋ฉฐ, ๊ณต์ PaddleOCR ๋ชจ๋ธ๋ก ๋ณ๋ ๋ก๋ํ์ฌ ์ฌ์ฉํฉ๋๋ค.) - ํนํ ์ธ๋ก๋ก ๊ธด ์์์ฆ์์ ์๋(
1,2๋ฑ) ๊ฐ์ 1์๋ฆฌ ์ํ ์ซ์ ๊ฒ์ถ์ด ์ค์ํ ๊ฒฝ์ฐ,PP-OCRv6_medium_det(limit_side_len=1600,unclip_ratio=1.479, SAHI ํ์ผ๋ง)์ ์กฐํฉํ๋ฉด 1์๋ฆฌ ์ซ์ ๊ฒ์ถ ์ฌํ์จ(Recall)์68.9% โ 85.1%(+16.2%p)๊น์ง ํฌ๊ฒ ๋์ด์ฌ๋ฆด ์ ์์ต๋๋ค.
- ๋ณธ ์ธ์๊ธฐ๋ ๊ฒ์ถ๊ธฐ์ ๋
๋ฆฝ์ ์ผ๋ก ๋์ํ๋ฏ๋ก, ๊ณต์
2. ์ค๋งํธํฐ ์์์ฆ ๋ฒค์น๋งํฌ ์ฑ๋ฅ
๊ณต์ PP-OCRv6_medium_det์ ๊ฒฐํฉํ End-to-End ๋ฐ ๋จ์ผ ์ค ํ๊ฐ ๊ฒฐ๊ณผ์
๋๋ค.
| ํ๊ฐ์ | ์งํ | ๊ธฐ์ค์ (replay_bn_frozen/ep12) |
๋ณธ ๋ชจ๋ธ (b1a_ep10) |
๊ฐ์ ํญ |
|---|---|---|---|---|
์์นด์ด๋ธ val (51์ฅ, 1,438์ค, ๋ธ๋ผ์ธ๋ 1์ฐจ GT) |
๋จ์ผ ์ค CER (๊ณต๋ฐฑ ํฌํจ) | 1.97% | 1.68% | -0.29%p |
์์นด์ด๋ธ val (51์ฅ, 1,438์ค, ๋ธ๋ผ์ธ๋ 1์ฐจ GT) |
๋จ์ผ ์ค CER (๊ณต๋ฐฑ ์ ๊ฑฐ) | 1.16% | 1.03% | -0.13%p |
์์นด์ด๋ธ test (51์ฅ, ๋ธ๋ผ์ธ๋ 1์ฐจ GT) |
E2E span_ns CER (๊ณต๋ฐฑ ์ ๊ฑฐ) |
3.91% | 3.71% (495 / 13,341) | -0.20%p |
์ ๊ท ํด๋ฆฌ๊ณค holdout (25์ฅ, 1,601์ค) |
1:1 CER (๊ณต๋ฐฑ ํฌํจ) | 4.62% (722ํธ์ง) | 4.12% (643ํธ์ง) | -0.50%p |
์ ๊ท ํด๋ฆฌ๊ณค holdout (25์ฅ, 1,601์ค) |
1:1 CER (๊ณต๋ฐฑ ์ ๊ฑฐ) | 3.20% (452ํธ์ง) | 3.15% (445ํธ์ง) | -0.05%p |
3. ๋ชจ๋ธ ํ๊ณ ๋ฐ ๋ณด์์ ์ํด ์ ์ฉํ ์ค๊ณ ํฌ์ธํธ
์ ์ฉํ ๋ณด์ ์ฌํญ
- ์๊ท๋ชจ ๋๋ฉ์ธ ๋ฐ์ดํฐ ๊ณผ์ ํฉ ๋ฐ ๋ฏธ๋
ธ์ถ ๋งค์ฅ ์ดํ ๋ง๊ฐ ๋ฐฉ์ง: 20์ํญ ์ด์ ๊ฐํ๊ฒ ํ์ธํ๋ํ ๊ฒฝ์ฐ ์ ๊ท ๋งค์ฅ ์ํ๋ช
์ด๋ ๊ธด ์ค์์ ์ค์ธ์์ด ๊ธ์ฆํ๋ ํ์์ ํ์ธํ์ต๋๋ค. ๋ฒ์ฉ ์ฌ์ ํ์ต ๊ฐ์ค์น์ ๋ณด๊ฐํ
wise_round2/alpha_90์ ์ถ๋ฐ์ ์ผ๋ก ์ผ๊ณ **์ค๋งํธํฐ ๋ฐ์ดํฐ ๋จ๋ 10์ํญ(1,520์คํ )**์์ ์กฐ๊ธฐ ์ข ๋ฃํ์ฌvalยทtestยทholdout์ ๊ตฌ๊ฐ ์ต๊ณ ์ฑ๋ฅ์ ํ๋ณดํ์ต๋๋ค. - ์ํ 1์๋ฆฌ ์ซ์ ๋ฏธ๊ฒ์ถ ๋ณด์ (์ ํ ์ ์ฉ): ๊ธฐ๋ณธ
PP-OCRv5_mobile_det๋ก ๊ฐ๋ณ๊ฒ ์ด์ฉํ ์ ์์ผ๋ฉฐ, ๊ธด ์์์ฆ์ ์ํ ์ซ์ ๋๋ฝ์ ์ค์ด๊ณ ์ ํ ๋ ๊ณต์PP-OCRv6_medium_det+ SAHI ํ์ผ๋ง ์กฐํฉ์ ํ์ฉํ ์ ์์ต๋๋ค.
์๋ ค์ง ํ๊ณ (Known Limitations)
- ์ด์ฅ๋ฌธ ํ (
H=48pxํ์ฐ ํญW > 480px): ํ์ต ์ ๊ณ ์ ํญ(320ร48) ์์ถ๊ณผ ์ถ๋ก ์ ์์ฐ ๋น๋ก ํญ ๊ฐ์ ์ฐจ์ด๋ก ์ธํด, ๋งค์ฐ ๊ธด ํ ์ค(์: ์นด๋๋ฒํธ ๋ง์คํน****, ๊ธด ์๋ด ๋ฌธ๊ตฌ)์์๋ ์ผ๋ฐ ์ค(W โค 320px, NS CER2.82%) ๋๋น ์ค์ฐจ(3.90%)๊ฐ ๋ค์ ๋๊ฒ ๋ํ๋ฉ๋๋ค. - ๊ทน๋จ์ ์ดฌ์ ํ๊ฒฝ: ์ฌํ๊ฒ ๊ตฌ๊ฒจ์ง ์์์ฆ, ๊ฐํ ๊ทธ๋ฆผ์ยท๋น ๋ฐ์ฌ, ํฐ ํ์ ๊ฐ๋์์๋ ๊ฒ์ถ ๋ฐ ์ธ์ ์ ํ๋๊ฐ ์ ํ๋ ์ ์์ต๋๋ค.
4. ์ฌ์ฉ ๋ฐฉ๋ฒ (PaddleOCR 3.x / PaddleX)
# ๊ธฐ๋ณธ ์คํ (PP-OCRv5_mobile_det ์๋ ๋ก๋ + ๋ณธ ์ธ์๊ธฐ)
python predict.py receipt.jpg
# CPU ํ๊ฒฝ ์คํ
python predict.py receipt.jpg --device cpu
# ์ ํ: ๋ณ๋๋ก ๋ฐ์ PP-OCRv6_medium_det_infer์ ํจ๊ป ์ฌ์ฉ
python predict.py receipt.jpg --det-model-dir ./PP-OCRv6_medium_det_infer
5. ํฌํจ ํ์ผ ๋ฐ ๋ผ์ด์ ์ค
inference.jsonโ Paddle ์ถ๋ก ๋ชจ๋ธ ๊ตฌ์กฐ (์ธ์๊ธฐ)inference.pdiparamsโ ํ์ต๋ ๋ชจ๋ธ ๊ฐ์ค์น (์ธ์๊ธฐ)inference.ymlโ PaddleX / PaddleOCR ์ ์ฒ๋ฆฌ ๋ฐ ๋ฌธ์ ์ฌ์ ์ค์ provenance.jsonโ ์ฒดํฌํฌ์ธํธ ์ถ์ฒ ๋ฐ SHA-256 ์ฒดํฌ์ฌpredict.pyโPP-OCRv5_mobile_det+ ๋ณธ ์ธ์๊ธฐ E2E ์คํ ์คํฌ๋ฆฝํธ- ๋ผ์ด์ ์ค: ๋ฒ ์ด์ค ๋ชจ๋ธ(
PP-OCRv5)๊ณผ ๋์ผํ Apache 2.0 ๋ผ์ด์ ์ค๋ฅผ ๋ฐ๋ฆ ๋๋ค.
Model tree for Beeam9/ko-receipt-ppocrv5-rec
Base model
PaddlePaddle/PP-OCRv5_mobile_rec