SAVRN
Search Contact SAVRN

Open-weight model · Image segmentation

kraken-genizah-segmenter

by Isaac Godfried isaacmg/kraken-genizah-segmenter

kraken-genizah-segmenter is an open-weight model for image segmentation from Isaac Godfried, released under Apache License 2.0. Its published files total 15.2 MB.

A kraken 7 baseline-segmentation model fine-tuned on Cairo Genizah manuscript pages — the first Genizah-specific segmenter we know of that is publicly available.

Parameters—
Context—
Weights15.2 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Isaac Godfried, published under apache-2.0, revision 0f58d3f88bd0.

A kraken 7 baseline-segmentation model fine-tuned on Cairo Genizah manuscript pages — the first Genizah-specific segmenter we know of that is publicly available. Recognition models for these hands exist (the MiDRASH project published its recognizers on Zenodo), but line segmentation is where a generic model loses most of the text on Genizah fragments: tight columns, damaged edges, script far larger than the segmenter was trained on, marginal glosses and rotated scans. This model closes a large part of that gap. 10.5281/zenodo.22879549, Apache-2.0), a general print-and-handwriting segmenter trained on Latin, Arabic and Greek script corpora. Cairo Genizah, drawn from the KTIV project of the…

Read Isaac Godfried's full model card

Kraken baseline segmenter for Cairo Genizah fragments (fine-tuned from BLLA 2026)

Cairo Genizah AI Transcription — formal analysis and write-up of the project The full account of the methods, training data, benchmarks and error analysis behind the Cairo Genizah AI transcription models. Search the transcribed corpus at Cairo Genizah AI.

A kraken 7 baseline-segmentation model fine-tuned on Cairo Genizah manuscript pages — the first Genizah-specific segmenter we know of that is publicly available. Recognition models for these hands exist (the MiDRASH project published its recognizers on Zenodo), but line segmentation is where a generic model loses most of the text on Genizah fragments: tight columns, damaged edges, script far larger than the segmenter was trained on, marginal glosses and rotated scans. This model closes a large part of that gap.

  • Base: kraken's BLLA base model (Benjamin Kiessling, ALMAnaCH/Inria, 2026, 10.5281/zenodo.22879549, Apache-2.0), a general print-and-handwriting segmenter trained on Latin, Arabic and Greek script corpora.
  • Fine-tuning data: 2,000 pages of Hebrew, Aramaic and Judaeo-Arabic literary manuscripts from the Cairo Genizah, drawn from the KTIV project of the National Library of Israel (at most 3 pages per manuscript; 112 manuscripts held out for validation; manuscripts that overlap our evaluation benchmarks removed). Line targets were derived from the KTIV word coordinates with an ink-estimated baseline; writing KTIV does not transcribe was painted out so that no text is taught as background.
  • Files: ktivseg_e10.safetensors (the released model, epoch 10), plus the epoch-3 and epoch-9 checkpoints for comparison, and views.py, the test-time multi-view wrapper described below.

Results

Character error rate of the same recognizer (MiDRASH Gen_01) reading the lines each segmenter finds, on two held-out benchmarks: 140 religious (literary) pages with KTIV ground truth, and 131 documentary fragments from the Princeton Geniza Project. Lower is better; medians over pages.

segmenter religious CER two-column pages single-column pages documentary CER
kraken 4 default 0.680 0.504 0.654 0.358
BLLA 2026, binarised input 0.587 0.399 0.587 0.297
BLLA 2026 + multi-view 0.462 0.299 0.404 0.272
this model (RGB input) 0.409 0.314 0.461 0.264
this model + multi-view 0.336 0.248 0.361 0.253

For scale, MiDRASH's own published reads of the matched religious pages score 0.240 — so with multi-view this open model brings a stock kraken pipeline to within a tenth of a CER point of that, from 0.68.

In a two-reader consensus pipeline (kraken read vs. a vision-language-model read of the same page, 89 documentary pages), the share of lines on which both readers agree rose from 11.1 % (kraken 4) and 12.8 % (BLLA 2026) to 16.6 % with this model plus multi-view.

Training: val_bl_f1 0.935 (base) → 0.952 by epoch 4, flat through epoch 10; we stopped there and released epoch 10, the best of epochs 3/9/10 on both benchmarks.

Usage

Standard kraken 7 CLI (segment the RGB page, not a binarised one — the model was fine-tuned on colour pages):

pip install "kraken>=7.0"
kraken -i page.jpg lines.json segment -bl -i ktivseg_e10.safetensors
kraken -i page.jpg out.txt segment -bl -i ktivseg_e10.safetensors ocr -m <recognition_model>.mlmodel

Python:

from PIL import Image
from kraken import blla
from kraken.lib import vgsl

net = vgsl.TorchVGSLModel.load_model("ktivseg_e10.safetensors")
seg = blla.segment(Image.open("page.jpg").convert("RGB"), model=net)   # baselines + polygons

Multi-view reading (recommended for large script and rotated scans)

BLLA resizes every page to a fixed input height (1,800 px), so the size of the writing at the model input depends only on how tall the page is relative to its text. A third of the religious benchmark reaches the model with writing larger than 97 % of the training pages, and recovery collapses there. views.py builds views of a page — the page scaled to the model height and padded at the bottom so the text shrinks by a factor 0.5 or 0.33, plus 90°/270° rotations for vertically running scans — segments each view, maps the geometry back to full resolution, and lets the best-reading view win (recognition always runs on the full-resolution page). It is pure PIL geometry with no kraken dependency; the production wiring is in src/services/kraken_microservice/k7/ of the code repository below.

Limitations

  • Trained on literary Genizah hands via KTIV; documentary hands (letters, legal deeds) improve too but were not in the fine-tuning set.
  • Like the base model it detects baselines rather than top-lines for Hebrew; recognition models trained on kraken baselines (MiDRASH Gen_01 included) expect exactly that.
  • Pages wider than 2,600 px were excluded from training for memory reasons; very large scans are best read through the multi-view wrapper.
  • The KTIV images and transcriptions used for fine-tuning are not redistributed here; only the weights are.

Provenance and credits

  • Base model: Kiessling, B. (2026). BLLA base model. Zenodo. https://doi.org/10.5281/zenodo.22879549 (Apache-2.0). kraken: https://kraken.re
  • Fine-tuning pages: National Library of Israel, KTIV — the International Collection of Digitized Hebrew Manuscripts (images and transcriptions). Documentary evaluation: the Princeton Geniza Project.
  • Recognizer used in all evaluations: MiDRASH Gen_01 (Zenodo).
  • Training recipe, PageXML exporter, evaluation harness and the two-reader pipeline: https://github.com/AIStream-Peelout/historical-document-analysis (src/finetuning/kraken/segtrain_ktiv.sh, export_ktiv_pagexml.py; evaluation write-up in docs/kraken7_segmenter_ab.md).

If you use this model, please cite the base model above and credit NLI KTIV for the manuscripts.

Identity and Version

Repository
isaacmg/kraken-genizah-segmenter
Publisher
Isaac Godfried
Task
Image segmentation
Modality
Image
Library
Not stated by the source
Parameters
Not stated by the source
Languages
he, arc, jrb, ar
Revision
0f58d3f88bd0c5a17a493ebd1dde2ba3712952ae
First published
2026-09-28
Last updated
2026-10-05

Files and Weights

6 files, 15.2 MB in total. The weights are 3 files totalling 15.2 MB in safetensors.

Weights3 files · 15.2 MB
Configuration1 file · 4.7 KB
Documentation1 file · 6.6 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
ktivseg_e03.safetensorsWeights5.1 MB c8cf082535e7
ktivseg_e09.safetensorsWeights5.1 MB 49bc18029e62
ktivseg_e10.safetensorsWeights5.1 MB c4d29e841c2f
views.pyConfiguration4.7 KB —
README.mdDocumentation6.6 KB —
.gitattributesRepository1.5 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
15.2 MB
Download from Isaac Godfried

Released by Isaac Godfried through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published15.2 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About kraken-genizah-segmenter

Can I use kraken-genizah-segmenter commercially?

Yes. kraken-genizah-segmenter is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image segmentation

segformer-b2-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b3-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

oneformer_ade20k_swin_large

SHI Labs

OneFormer model trained on the ADE20k dataset (large-sized version, Swin backbone). It was introduced in the paper OneFormer: One Transformer to Rule Universal Image Segmentation by Jain et al. and first released in this repository. OneFormer is the first multi-task universal image segmentation framework. It needs to be trained only once with a single universal architecture, a single model, and on a single dataset, to outperform existing specialized models across semantic, instance, and panoptic segmentation tasks. OneFormer uses a task token to condition the model on the task in focus, making the architecture task-guided for training, and task-dynamic for inference, all with a single…

Open weights mit transformers

Model · Image segmentation

segformer-b1-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b0-finetuned-ade-512-512

Joshua

https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Example: Image segmentation with Xenova/segformer-b0-finetuned-ade-512-512. You can visualize the outputs with: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights transformers.js

Model · Image segmentation

DelineateAnything

Mykola Lavreniuk

Delineate Anything v2 extends Delineate Anything into a globally representative, resolution-agnostic foundation model that scales agricultural field boundary detection to a planetary level from any imagery source. Trained on FBIS-73M, a massive 73-million-instance dataset spanning 61 countries with diverse imagery sources ranging from 0.25m to 10m resolution, built through a resolution-specific curation pipeline that solves the parcel-versus-field mismatch, Delineate Anything v2 sets a new state-of-the-art in global zero-shot delineation. It delivers a +103.3% relative gain in [email protected] over Delineate Anything while maintaining extreme efficiency, mapping all of Ukraine (603,000 km²) in 5.4…

Open weights agpl-3.0 ultralytics