/ Модель

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

Лицензия
CC BY-NC 4.0
Библиотека
rfdetr
Опубликована
22 июл 2026

rfdetr-instance-segmentation-leibniz-manuscripts

Сегментация изображенийИзображение → mask3 профессии
0скачиваний за 30 дней0лайковвеса обновлены15 окт 2026

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

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

Модель сегментирует текстовые, графические и формульные зоны на сканах рукописей Лейбница для подготовки к автоматической транскрипции.

Модель разработала Denisa-Florina Bumba в рамках проекта ERC Philiumm в Laboratoire SPHERE при Université Paris Cité и CNRS. Это дообученная RF-DETR-Seg Nano для сегментации экземпляров и обнаружения зон на сканах рукописей Лейбница XVII–XVIII веков с использованием онтологии SegmOnto. Она выделяет основной и маргинальный текст, нумерацию, графические области, артефакты оцифровки и типы математических формул, помогая готовить рукописи к автоматической транскрипции и разметке в цифровой гуманитаристике.

Модель обучена на 1 026 изображениях, с отдельными наборами проверки и тестирования. Для лучшего обычного чекпойнта указана метрика сегментации mAP@50:95 0,4154; результаты по классам неоднородны, а небольшие классы формул распознаются слабее. Модель предназначена прежде всего для рукописей со сходной компоновкой; переносимость на документы других авторов и периодов не проверялась, качество зависит от изображения. Веса доступны по лицензии CC BY-NC 4.0, которая ограничивает коммерческое использование.

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

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

Ограничения

Модель дообучена на рукописях одного автора; её переносимость на документы других авторов и периодов не проверялась, а качество зависит от изображения. Небольшие классы формул распознаются заметно слабее структурных зон, а метка GraphicZone-formula объединяет формулы, не распределённые по более узким классам.

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Zone detection model for (17th–18th c.) manuscripts, trained on Leibniz's manuscripts using SegmOnto ontology.

This model was developed by Denisa-Florina BUMBA as part of the ERC Philiumm project (Grant ADG No. 101020985), at the Laboratoire SPHERE, Université Paris Cité – CNRS, France.

Fine-tuned RF-DETR-Seg (Nano) for instance segmentation and zone detection on scanned pages of Leibniz's manuscripts. The model detects zones such as main text, margin text, numbering, diagrams, digitization artifacts, and several classes of mathematical formulae using the SegmOnto controlled vocabulary, in order to support automatic transcription in the digital humanities. It is trained specifically on Leibniz's manuscripts, but may be applied to other historical manuscripts with similar layout.

Dataset

Available at : rfdetr-segmentation-leibniz-dataset

Classes

Class names follow the SegmOnto controlled vocabulary for manuscript layout annotation, which is widely used across the HTR/OCR and the digital humanities community (Kraken, eScriptorium, HTR-United).

ClassDescription
MainZoneMain body text region
MarginTextZoneMarginal additions
NumberingZonePage numbering
DigitizationArtefactZoneDigitization artefacts
GraphicZone-figureDiagrams, other graphic zones
GraphicZone-formulaCovers all mathematical formulae
GraphicZone-formula-complexComplex/multi-line formulae
GraphicZone-formula-inlineInline formulae within text
GraphicZone-formula-strikethroughStruck-through/deleted formulae

Training Data

SplitImagesPercentage
Train1,02694%
Validation404%
Test202%
Total1,086100%

Preprocessing:

  • Auto-orient applied
  • Resized (stretch) to 728×728

Augmentation (applied to the training set only, 3 augmented outputs generated per source image):

  • Horizontal and vertical flip
  • Rotation: ±3°
  • Shear: ±5° horizontal, ±5° vertical
  • Hue: ±15°
  • Brightness: ±15%
  • Noise: up to 1.49% of pixels

Training Parameters

ParameterValue
ModelRF-DETR Seg Nano
Epochs80
Batch size2
Gradient accumulation steps8
Learning rate1e-4
Encoder learning rate1.5e-4
LR schedulerCosine
Warmup epochs3
Weight decay1e-4
Resolution720 px (closest valid value to the 728×728 preprocessing target)
EMAEnabled
Early stoppingDisabled
Checkpoint intervalEvery 5 epochs
Seed42

The published weights are from epoch 43, the best raw checkpoint (segm_mAP_50:95 = 0.415), and from the best EMA checkpoint, at epoch 49 (segm_mAP_50:95 = 0.410).

Performance Metrics

CheckpointEpochsegm mAP@50:95
checkpoint_best_regular.pth43/800.4154
checkpoint_best_ema.pth49/800.4102

checkpoint_best_regular.pth (epoch 43) — Overall metrics

MetricValue
mAP@500.612
mAP@50:950.438
mAP@750.460
mAR0.530
Precision0.684
Recall0.639
F10.618
Segm mAP@500.608
Segm mAP@50:950.415

checkpoint_best_regular.pth (epoch 43) — Per-class AP (detection)

ClassAP
DigitizationArtefactZone0.936
MainZone0.890
MarginTextZone0.575
NumberingZone0.494
GraphicZone-figure0.484
GraphicZone-formula-complex0.271
GraphicZone-formula-inline0.111
GraphicZone-formula0.106
GraphicZone-formula-strikethrough0.073

checkpoint_best_ema.pth (epoch 49) — Overall metrics

MetricValue
EMA mAP@500.612
EMA mAP@50:950.437
EMA mAR0.541
EMA Segm mAP@500.603
EMA Segm mAP@50:950.410

Per-class AP is not available for checkpoint_best_ema.pth. Only per-class metrics were logged for the regular checkpoint during training.

Note on class imbalance: the model performs well on structural zones (main text, margin text, graphic zones, numbering) but is substantially weaker on the smaller formula classes (-inline, -strikethrough).

How to Get Started with the Model

from rfdetr import RFDETRSegNano
import cv2
from rfdetr.assets.coco_classes import COCO_CLASSES

model = RFDETRSegNano(pretrain_weights="checkpoint_best_regular.pth")

image = cv2.imread("image.jpg")

detections = model.predict(image, threshold=0.4)

labels = [f"{COCO_CLASSES[class_id]}" for class_id in detections.class_id]

annotated_image = sv.MaskAnnotator().annotate(detections.metadata["source_image"], detections)
annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)

cv2.imwrite("image_annotated.jpg", annotated_image)

Replace "image.jpg" with the path to your manuscript image.

The threshold can be changed, but we noticed that we have fair predictions with a value of 0,4. Under this value we start having overlapping regions and over this value we loose some correct predictions with low confidence score.

eScriptorium Pipeline

A preprocessing pipeline for preparing model outputs for import into eScriptorium is available here:

Pipeline RF-DETR-Seg to XML PAGE

It converts this model's zone predictions into the XML-Page format compatible with eScriptorium.

Limitations

  • Fine-tuned on manuscripts from a single author (16th–early 17th c.). Generalization to other authors or periods has not been tested.
  • Performance depends on image quality.
  • GraphicZone-formula is a generic label for formulae that weren't sorted into one of the three more specific classes (-complex, -inline, -strikethrough). Since annotations came from different practices and different annotators, not all formulae were manually reclassified. This is a known issue we plan to fix in a future version of the dataset.

Funding

This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme, Advanced Grant ADG No. 101020985.

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

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

GPU в ailist

Универсальный рантайм · rfdetr · image-segmentation

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

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

Ревизия весов
58851a7

0 моделей