Image-to-Text
Transformers
Safetensors
Turkish
English
ocr
turkish
document-intelligence
vision-language-model
svtrv2
qwen2.5-vl
kvkk
pii-redaction
legal-nlp
ictihat
financial-verification
visual-redaction
Eval Results (legacy)
Instructions to use ersanbil/TurkceOCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ersanbil/TurkceOCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="ersanbil/TurkceOCR")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ersanbil/TurkceOCR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download turkceocr/__init__.py from ersanbil/TurkceOCR: direct link, hf CLI and curl.
- Browser
- Download file 2.86 kB
-
https://huggingface.co/ersanbil/TurkceOCR/resolve/main/turkceocr/__init__.py
- Command line
-
hf download hf://ersanbil/TurkceOCR/turkceocr/__init__.py
-
curl -L -o __init__.py https://huggingface.co/ersanbil/TurkceOCR/resolve/main/turkceocr/__init__.py
2.86 kB
| """ | |
| TürkçeOCR (`turkceocr`) — İki Katmanlı Açık Kaynak Türkçe OCR, KVKK PII ve Doküman Zekası Ailesi. | |
| Bileşenler: | |
| - `TurkceOCRVL`: LightOnOCR-2 & PaddleOCR-VL çift omurgalı tam sayfa doküman VLM'i | |
| - `TurkceOCRLine`: SVTRv2 + Türkçe Morfolojik SGM satır/alan okuma motoru | |
| - `TurkceDegrade`: Kaşe, ıslak imza, termal POS fişi ve karma el yazısı bozulma motoru | |
| - `TurkceVerify`: TCKN, VKN, TR IBAN, KDV/Toplam ve Türkçe İ/ı sağlama destekli çıkarım | |
| - `TurkceOCRBenchEvaluator`: Gerçekçi Türkçe OCR değerlendirme ve kıyaslama paketi | |
| - `TurkceOCRPipeline`: Uçtan uca birleşik çıkarım hattı | |
| """ | |
| from turkceocr.benchmark import ( | |
| KPIGateVerdict, | |
| KPIGatekeeper, | |
| TurkceOCRBenchEvaluator, | |
| TurkceOCRBenchReport, | |
| compute_rlvr_verifiable_reward, | |
| ) | |
| from turkceocr.data import ( | |
| TurkishDocumentGenerator, | |
| TurkishOCRDatasetMixer, | |
| TurkishStampAndSignatureEngine, | |
| TurkceDegrade, | |
| attenuate_stamp_overlay, | |
| illumination_division_normalization, | |
| remove_table_grid_lines, | |
| ) | |
| from turkceocr.models import ( | |
| DiacriticFocalLoss, | |
| HighResDiacriticTiler, | |
| TurkishCharacterVocabulary, | |
| TurkishMorphologicalSGMLoss, | |
| TurkceOCRLine, | |
| TurkceOCRVL, | |
| TurkceOCRVLConfig, | |
| segment_page_lines_adaptive, | |
| ) | |
| from turkceocr.pipeline import TurkceOCRPageOutput, TurkceOCRPipeline | |
| from turkceocr.postprocess import ( | |
| OffsetMap, | |
| TurkishDiacriticRestorer, | |
| TurkishFinancialSolver, | |
| TurkceVerify, | |
| UnifiedTurkishEntityEngine, | |
| VisualRedactor, | |
| find_repetition_loop_index, | |
| fold_tr_isomorphic, | |
| truncate_repetition_loop, | |
| turkish_lower, | |
| turkish_title, | |
| turkish_upper, | |
| validate_tckn, | |
| validate_tr_iban, | |
| validate_vkn, | |
| ) | |
| __version__ = "2.0.0" | |
| __brand__ = "TürkçeOCR" | |
| __all__ = [ | |
| "__version__", | |
| "__brand__", | |
| "TurkceOCRPipeline", | |
| "TurkceOCRPageOutput", | |
| "TurkceOCRVL", | |
| "TurkceOCRVLConfig", | |
| "HighResDiacriticTiler", | |
| "TurkceOCRLine", | |
| "TurkishCharacterVocabulary", | |
| "DiacriticFocalLoss", | |
| "TurkishMorphologicalSGMLoss", | |
| "TurkceDegrade", | |
| "TurkishStampAndSignatureEngine", | |
| "TurkishDocumentGenerator", | |
| "TurkishOCRDatasetMixer", | |
| "TurkceVerify", | |
| "TurkishFinancialSolver", | |
| "TurkishDiacriticRestorer", | |
| "turkish_upper", | |
| "turkish_lower", | |
| "turkish_title", | |
| "validate_tckn", | |
| "validate_vkn", | |
| "validate_tr_iban", | |
| "TurkceOCRBenchEvaluator", | |
| "TurkceOCRBenchReport", | |
| "KPIGatekeeper", | |
| "KPIGateVerdict", | |
| "compute_rlvr_verifiable_reward", | |
| "UnifiedTurkishEntityEngine", | |
| "VisualRedactor", | |
| "OffsetMap", | |
| "fold_tr_isomorphic", | |
| "find_repetition_loop_index", | |
| "truncate_repetition_loop", | |
| "segment_page_lines_adaptive", | |
| "illumination_division_normalization", | |
| "remove_table_grid_lines", | |
| "attenuate_stamp_overlay", | |
| ] | |