TurkceOCR-Bench / README.md
ersanbil's picture
Release TurkceOCR-Bench v2.0 (Apache-2.0)
d335a96
|
Raw History Blame Contribute Delete
7.49 kB
---
license: apache-2.0
language:
- tr
- en
task_categories:
- image-to-text
- token-classification
- document-question-answering
tags:
- ocr
- turkish
- benchmark
- legal-ocr
- kvkk
- visual-redaction
- turkceocr
---
# TurkceOCR-Bench
Canonical evaluation benchmark suite and Phase-2 real/hybrid visual training & test splits for [`ersanbil/TurkceOCR`](https://huggingface.co/ersanbil/TurkceOCR) and [`ersanbil/kvkk-pii-ner`](https://huggingface.co/ersanbil/kvkk-pii-ner).
Combines **35 unseen real-world Turkish archival, regulatory, and court document pages** (`TurkExternalBlindBench-v1`, `93,165` ground-truth characters), the **15-KPI 6-Category ID/OOD Document Intelligence Suite** (`TurkceOCR-Bench-6Cat`), and the **2,750-line Phase-2 Real-PDF + Archival Hybrid Line Corpus** (`Zero Doc-ID Leakage = True`).
## 1. Veri Seti Alt Kümeleri (Subsets & Directory Structure)
```text
ersanbil/TurkceOCR-Bench/
├── README.md # Veri seti kartı ve değerlendirme dokümantasyonu
├── LICENSE # Apache License, Version 2.0
├── NOTICE # Apache-2.0 ve üst akış veri/model bildirimleri
├── external_blind_35/ # TurkExternalBlindBench-v1 (35 Gerçek Saha Sayfası)
│ ├── manifest.json # 35 gerçek sayfa üst verisi (5 kategori × 7 örnek)
│ ├── external_blind_benchmark_report.json # 9 motor × 35 sayfa ham CER/WER/Diacritic-F1 sonuçları
│ ├── external_blind_benchmark_report.md # Sayfa bazlı adli hata analizi raporu
│ └── redacted_samples/ # 2B #000000 öncesi/sonrası görsel KVKK karartma örnekleri
├── docbench_15kpi/ # TürkçeOCR-Bench-6Cat (15 KPI × 6 Model Ablasyonu)
│ ├── turkceocr_bench_metrics.json # M0..M4 15-KPI ve 4 kıyaslama paketi sonuçları
│ ├── turkceocr_full_benchmark_leaderboard.json # Liderlik tablosu ve Gate 1 / Gate 2 denetim özeti
│ └── turkceocr_full_benchmark_report.md # 15-KPI detaylı markdown raporu
└── phase2_real_hybrid/ # Faz-2 Gerçek PDF + Hibrit Görsel Satır & Sayfa Paketi
├── dataset_manifest.json # 2.750 satır (2306 train / 229 val / 215 test_real_pdf)
├── phase2_visual_training_report.json # 40-epoch SVTRv2-v2 ve Qwen2.5-VL-LoRA-v2 metrikleri
├── phase2_visual_training_report.md # Faz-2 eğitim ve domain bazlı test raporu
├── sample_lines/ # 240 DPI gerçek PDF satır kırpımları
└── sample_pages/ # 200 DPI tam sayfa düzen örnekleri
```
| Alt Klasör (`split`) | Kapsam ve İçerik | Örnek Sayısı | Ölçülen Ana Sonuçlar |
| :--- | :--- | :---: | :--- |
| **`external_blind_35/`** | 35 gerçek saha belgesi (`TurkExternalBlindBench-v1`, `93.165` GT karakter): Rekabet Kurumu kararları, Resmî Gazete YİBK PDF'leri (`1999` Courier ve ıslak mühürlü sayfalar), Mevzuat kanunları (`1086, 1136, 1412, 6100`), 2001 yılı `551×790` 1-bit Resmî Gazete GIF'leri, EPDK `.docx/.emf` enerji tarife tabloları ve Yargıtay/Danıştay/AYM mahkeme kararları + `redacted_samples/*.png` 2B `#000000` karartılmış görseller | `35` tam sayfa (`420` gerçek varlık) | `E7_TurkceOCR_Full_System`: **`1.76%` CER**, **`7.57%` WER**, **`98.67%` Diacritic F1**, **`0.00%` Tekrar Döngüsü** |
| **`docbench_15kpi/`** | `TürkçeOCR-Bench-6Cat` (6 belge kategorisi × ID/OOD × 15 KPI × 6 model ablasyonu): Kurumsal e-Arşiv Fatura, Termal POS Fişi, Karma El Yazısı Form, Resmî Gazete/Noter, Çoklu KDV ERP Tablosu, Çift Sütunlu PDF | `6` kategori (`ID + OOD`), `15` KPI | Gate 1 & Gate 2: **`15/15` GEÇTİ** (`CER = 0.00%`, `CVKR = 100%`, `PII Recall = 100%`, `2B Redact = 100%`) |
| **`phase2_real_hybrid/`** | Faz-2 gerçek PDF + hibrit görsel OCR eğitim & test paketi (`2.750` satır, `220` tam sayfa, `N = 215` `test_real_pdf`): belge düzeyi sızıntısız (`Zero Doc-ID Leakage = True`) manifest, eğitim raporları ve örnek gerçek PDF satır/sayfa görüntüleri | `2.750` satır + `220` sayfa | `SVTRv2-v2` (dil modelsiz saf CTC): `mevzuat_pdf` **`16.17%` CER**, `rekabet_pdf` **`20.34%` CER** |
---
## 2. `TurkExternalBlindBench-v1` (35 Gerçek Saha Sayfası) Liderlik Tablosu Özeti
| Sıra | Motor Kodu & Yapılandırma | Örnek (`N`) | Ortalama CER (↓) | Ortalama WER (↓) | Diacritic F1 (↑) | KPI-14 Döngü Oranı (↓) |
| :---: | :--- | :---: | :---: | :---: | :---: | :---: |
| **1** | **`E7_TurkceOCR_Full_System`** | `35` | **`0.0176`** (`1.76%`) | **`0.0757`** (`7.57%`) | **`0.9867`** (`98.67%`) | **`0.0000`** |
| **2** | **`E6_TurkceOCR_Visual_v1`** | `35` | **`0.0178`** (`1.78%`) | **`0.0767`** (`7.67%`) | **`0.9867`** (`98.67%`) | **`0.0000`** |
| **3** | `E4_Tesseract5_tur_Raw` | `35` | `0.0418` (`4.18%`) | `0.1061` (`10.61%`) | `0.9741` (`97.41%`) | `0.0000` |
| **4** | `E3_Tesseract5_eng` | `35` | `0.1303` (`13.03%`) | `0.4834` (`48.34%`) | `0.0000` (`0.00%`) | `0.0000` |
| **5** | `E5_Hunyuan_VLM_Archive` *(Taranmış/Arşiv Alt Kümesi)* | `18` | `0.1585` (`15.85%`) | `0.1823` (`18.23%`) | `0.8930` (`89.30%`) | `0.0556` |
| **6** | `E2c_SVTRv2_Line_v2_Phase2` | `35` (`215` satır) | `0.5234` (`0.2450` satır) | `0.9561` | `0.3378` (`0.5427` satır) | `0.0000` |
| **7** | `E1_PyMuPDF_Digital` | `35` | `0.6055` (`60.55%`) | `0.6537` (`65.37%`) | `0.4015` (`40.15%`) | `0.0000` |
---
## 3. Hızlı Başlangıç: Kıyaslama Paketini Çalıştırma
```bash
git clone https://huggingface.co/ersanbil/TurkceOCR
cd TurkceOCR
pip install -e .
# 15-KPI 6-Kategori ID/OOD ve 4 Kıyaslama Paketi değerlendirmesini çalıştır
python -m scripts.build_turkceocr_bench
# 35 gerçek saha belgesi (TurkExternalBlindBench-v1) değerlendirmesini çalıştır
python -m scripts.run_external_blind_benchmark
```
---
## License and Citation (Lisans ve Atıf)
Released under the **Apache License, Version 2.0** (see [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE)).
Court decision samples and legal entity distributions derive from [`hamzabagirsakci/turkish-court-decisions`](https://huggingface.co/datasets/hamzabagirsakci/turkish-court-decisions) (*Türk İçtihat Korpusu: 11.045.085 Türk Mahkeme Kararı*, Hamza Bağırsakçı, `CC0-1.0`) and publicly available archives of T.C. Resmî Gazete, Mevzuat Bilgi Sistemi, Rekabet Kurumu, and EPDK.
```bibtex
@misc{ersanbil2026turkceocrbench,
title = {TurkceOCR-Bench: External Blind Real-World Benchmark and 15-KPI Evaluation Suite for Turkish Document OCR},
author = {ersanbil},
year = {2026},
month = {November},
publisher = {Hugging Face},
howpublished = {https://huggingface.co/datasets/ersanbil/TurkceOCR-Bench},
note = {Apache-2.0}
}
@misc{turk_ictihat_korpusu,
title = {Türk İçtihat Korpusu: 11.045.085 Türk Mahkeme Kararı},
author = {Bağırsakçı, Hamza},
year = {2026},
url = {https://huggingface.co/datasets/hamzabagirsakci/turkish-court-decisions},
note = {CC0-1.0}
}
```