/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
torchocr
Опубликована
6 окт 2026

torchocr-weights

Описание изображенийИзображение → текст7 профессий
0скачиваний за 30 дней0лайковвеса обновлены5 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Набор контрольных точек torchocr для обнаружения, распознавания и ориентации текста на изображениях документов и уличных сцен.

BryanBradfo/torchocr-weights — набор предобученных контрольных точек для библиотеки torchocr, созданный разработчиками torchocr на PyTorch. В репозитории представлены модели DBNet для обнаружения текста, CRNN для распознавания текста и PPLCNet для определения ориентации страниц; размеры отдельных моделей варьируются от 0,60 до 12,4 млн параметров. Веса подключаются через перечисления *_Weights и обычно загружаются библиотекой автоматически.

Набор предназначен для OCR в сценах и документах: обнаружения текстовых областей, чтения слов после их вырезания, конвейерного преобразования изображений в текст и определения ориентации страниц. Оценки приведены для ICDAR-2015, Total-Text, FUNSD и DocLayNet; качество зависит от контрольной точки и этапа OCR. Для некоторых сценариев описаны ограничения, в частности снижение точности на изогнутом тексте и отсутствие гарантии сохранения распознавания китайских символов у одного дообученного распознавателя.

Модели принимают изображения и выдают текст, области текста или метки ориентации в зависимости от выбранной контрольной точки. Обучение и оценки ориентированы преимущественно на латинский текст; язык тегами явно не задан. Лицензия репозитория — Apache-2.0.

Сценарии применения

  • поиск текстовых областей на фотографиях вывесок
  • распознавание слов на уличных изображениях
  • извлечение текста из сканированных форм
  • определение поворота страницы перед OCR
  • сборка конвейера OCR для документов

Ограничения

Качество зависит от контрольной точки и протокола обработки; оценки на приведённых наборах не гарантируют такие же результаты на других данных. Для распознавателя ICDAR2015 китайская точность не гарантируется, а классификатор ориентации предназначен для страниц документов, не фотографий сцен.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Для каких профессий подходит7

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

torchocr weights

Pretrained checkpoints for torchocr, a PyTorch-native, torchvision-style OCR library. You normally never download these files by hand: each one backs a member of a *_Weights enum, and torch.hub fetches it on first use and checks the SHA-256 prefix embedded in the file name.

from torchocr import DBPostProcessor
from torchocr.models import DBNet_ResNet18_VD_Weights, dbnet_resnet18_vd

weights = DBNet_ResNet18_VD_Weights.ICDAR2015
model = dbnet_resnet18_vd(weights=weights).eval()
preprocess = weights.transforms()
postprocess = DBPostProcessor(**weights.meta["postprocess"])

Checkpoints

Weights enumFileParamsICDAR-2015 test
DBNet_ResNet18_VD_Weights.ICDAR2015dbnet_resnet18_vd_ic15-d803cec9.pth12.4 MP 0.849 · R 0.774 · hmean 0.809
DBNet_MobileNetV3_Large_05_Weights.ICDAR2015dbnet_mobilenet_v3_large_05_ic15-d9d17ae7.pth0.60 MP 0.785 · R 0.689 · hmean 0.734
DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_ENdbnet_mobilenet_v3_large_05_ppocr_v3_en-9bfd3b59.pth0.60 Mhmean 0.441 ¹
DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_CHdbnet_mobilenet_v3_large_05_ppocr_v3_ch-fc000d1e.pth0.60 Mhmean 0.422 ¹
DBNet_ResNet18_VD_Weights.PPOCR_SERVER_V2dbnet_resnet18_vd_ppocr_server_v2-59d99b11.pth12.4 Mhmean 0.414 ¹
CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19crnn_resnet34_vd_synth-513c0334.pth (+ LM charlm6_scene-883dd7cd.json)27.9 Mword acc. 0.799 · Total-Text 0.819 ³
CRNN_ResNet34_VD_Weights.ICDAR2015_TOTALTEXT_MLT19crnn_resnet34_vd_scene-38393899.pth (+ LM charlm6_scene-883dd7cd.json)27.9 Mword acc. 0.791 · Total-Text 0.802 ³
CRNN_ResNet34_VD_Weights.ICDAR2015crnn_resnet34_vd_ic15-da0782b5.pth27.9 Mword acc. 0.738 · CER 0.101 ²
CRNN_ResNet34_VD_Weights.PPOCR_SERVER_V2crnn_resnet34_vd_ppocr_server_v2-803ba4c9.pth27.9 Mword acc. 0.665 ²

Page orientation (0, 90, 180 or 270 degrees), scored on the 4999 DocLayNet test pages, each fed upright and turned three ways (references/orientation/evaluate.py):

Weights enumFileParamsDocLayNet test
PPLCNet_x1_0_Weights.PPOCR_DOC_ORIENTATIONpplcnet_x1_0_doc_ori-ba9045e4.pth1.68 Maccuracy 0.985 · at min_confidence=0.7: 0.24% of upright pages turned, 97.5% of turned pages set upright ⁴

⁴ The threshold was chosen on DocLayNet validation and applied once to test. Weakest on manuals (0.973) and laws (0.979). Meant for document pages, not scene photos.

¹ Line-level detectors converted from PaddleOCR. ICDAR-2015 scores word boxes, so adjacent words merged into one line count as misses: these numbers compare checkpoints, they are not the accuracy you will see on documents. ² 2077 alphanumeric care words of ICDAR-2015 test cropped from the full images with torchocr.ops.crop_quads on their ground-truth quads, case-insensitive (not the official Task 4.3 crops). Axis-aligned crops of the same words score 0.579. ³ Decoded with its declared CTC beam search (width 10) and 6-gram character language model; 0.750 with greedy decoding (0.757 for the MJSynth checkpoint). Same ground-truth-quad protocol; Total-Text curved words use their minimum-area rectangle.

End to end (OCRPipeline.from_pretrained, image → text; a word counts when it is detected and read correctly, case-insensitive, generic vocabulary; references/end2end/evaluate.py), with DBNet_ResNet18_VD_Weights.ICDAR2015 and each scene recognizer, min_text_score=0.8:

Test setDetection hmean…ICDAR2015_TOTALTEXT_MLT19 (v0.3)…MJSYNTH_ICDAR2015_TOTALTEXT_MLT19
ICDAR-2015 (street scenes)0.8090.6490.665
Total-Text (curved text)0.6960.5850.585
FUNSD (scanned forms)0.8260.7150.722

Without min_text_score, the v0.3 recognizer scores 0.621 / 0.566 / 0.711.

min_text_score=0.8 drops regions read with low confidence; the value maximizes end-to-end hmean on the ICDAR-2015 training split. The converted PaddleOCR weights reach 0.219 on ICDAR-2015 and 0.17–0.18 detection hmean on FUNSD, whose word-level boxes do not match their line-level output.

from torchocr import OCRPipeline, load_image

pipeline = OCRPipeline.from_pretrained(
    "DBNet_ResNet18_VD_Weights.ICDAR2015", "CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19", device="cuda"
)  # the recognizer's beam search + language model is set up automatically
pipeline.min_text_score = 0.8
doc = pipeline(load_image("photo.jpg"))  # doc.text, doc.polygons

Evaluation protocol

Detection: official ICDAR-2015 IoU protocol (one-to-one greedy matching at IoU > 0.5, ### don't-care filtering) on rotated quads, implemented by torchocr.metrics.DetectionHmean and verified identical to PaddleOCR's DetectionIoUEvaluator. Pre/post-processing is exactly weights.transforms() and weights.meta["postprocess"]. Every number is reproducible with:

python references/detection/evaluate.py --root <icdar2015> --weights <enum>
python references/recognition/evaluate.py --root <icdar2015> --weights CRNN_ResNet34_VD_Weights.PPOCR_SERVER_V2

The ICDAR2015 checkpoints

All were fine-tuned by torchocr on training splits only (ICDAR-2015, plus Total-Text and MLT-2019 for the recognizer noted below); reported weights are the last epoch and no checkpoint or hyper-parameter was selected on the test set.

  • DBNet_ResNet18_VD_Weights.ICDAR2015: PPOCR_SERVER_V2 fine-tuned 300 epochs with the recipe below; box_thresh = 0.5 maximizes train-split hmean (0.794 with PaddleOCR's 0.6).
  • CRNN_ResNet34_VD_Weights.ICDAR2015: PPOCR_SERVER_V2 fine-tuned 30 epochs on the 4467 legible training words, cropped with crop_quads from jittered ground-truth quads (references/recognition/train.py). It keeps PaddleOCR's Chinese + Latin charset but saw only Latin scene text, so Chinese accuracy is no longer guaranteed.
  • CRNN_ResNet34_VD_Weights.ICDAR2015_TOTALTEXT_MLT19: PPOCR_SERVER_V2 fine-tuned 10 epochs (bf16) on 66k Latin scene words (ICDAR-2015 train ×2, Total-Text train, MLT-2019 Latin crops). Its language model (charlm6_scene-883dd7cd.json) is a case-insensitive 6-gram character model built from those training transcriptions only; beam width and LM weight were chosen on Total-Text training words.
  • CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19: the checkpoint above fine-tuned 6 more epochs (bf16), each drawing 370k words at random: the 66k real words once on average plus 300k of the 7.2M MJSynth synthetic words (14 undecodable images skipped). Same decoder and language model.
  • DBNet_MobileNetV3_Large_05_Weights.ICDAR2015, described next.

DBNet_MobileNetV3_Large_05_Weights.ICDAR2015

PPOCR_V3_EN fine-tuned for 300 epochs on the 1000 ICDAR-2015 training images (references/detection/train.py, PaddleOCR's augmentation recipe, 640 px crops, AdamW 1e-3 with warmup + cosine, ~80 min on one laptop GPU). The reported weights are the last epoch: no checkpoint was selected on the test set. box_thresh = 0.45 maximizes hmean on the training split (references/detection/calibrate.py) and was applied once to the test split; with PaddleOCR's default box_thresh = 0.6 the same checkpoint scores 0.688.

Intended inputs: incidental scene text in street-level photos, Latin script, evaluated at 736 × 1280. Expect lower recall on dense documents and on non-Latin scripts.

Provenance and licenses

  • PPOCR_* checkpoints are converted from PaddleOCR releases (Apache-2.0) using the build-time converters in torchocr's scripts/, whose recipes are adapted from PaddleOCR2Pytorch (Apache-2.0). The PP-OCRv3 files hold the Student network that PaddleOCR exports for inference. PPLCNet_x1_0_Weights.PPOCR_DOC_ORIENTATION is PaddleOCR's PP-LCNet_x1_0_doc_ori (Apache-2.0), converted by scripts/convert_paddle_pplcnet.py. It is evaluated on DocLayNet (CDLA-Permissive-1.0), not trained on it.
  • The ICDAR2015 checkpoint derives from PPOCR_V3_EN (Apache-2.0) and was fine-tuned on the ICDAR 2015 Incidental Scene Text training set, which its organizers release for research use. Check that your use complies with those terms.
  • CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19 was additionally trained on MJSynth (Jaderberg et al., 2014), released by the Oxford Visual Geometry Group for research use.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · torchocr

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
2159b7f

0 моделей