Skip to content

7.2 release

Latest

Choose a tag to compare

@mittagessen mittagessen released this 20 Nov 10:51
524733a

kraken 7.2

Highlights

  • New default BLLA segmentation model. It was retrained with the compound loss on a larger dataset of 11,200 pages, which adds print, photos from handheld devices and non-Latin scripts (mostly Arabic). The model card is at https://zenodo.org/records/22879549.
  • Faster baseline segmentation and polygonization. The Sato filter is now truncated and parallelized, and there is a torch version for GPUs using convolutions. Region boundary tracing is about 10x faster, and ROI calculation and line rotation are significantly faster too. Using GPU now actually offers significant speedup over CPU-only inference.
blla_speed - Python 3.14 support has been enabled.

Breaking changes

  • The long-deprecated add and both values for --resize in ketos train and ketos segtrain have been removed. Use union and new instead.

Changes

  • The legacy polygon extractor has been removed. --legacy-polygons (ketos train), --no-legacy-polygons (kraken ocr / ketos test) and the matching legacy_polygons / no_legacy_polygons config options are still accepted but do nothing. They will be removed in kraken 8. After running some more tests we saw that the change in predictions of recognition models between the extractor implementations is in-line with the inherent non-determinism of modern machine learning libraries.
  • segtrain now matches dataset classes to the model's classes by name before adapting the model. Fine-tuning with a different class mapping in union/new mode no longer changes the labels the model already has (#806).
  • New top-level wandb_project setting (ketos --wandb-project or YAML) for train, segtrain, rotrain and pretrain.
  • The tensorboard logger now also works with tensorboardX (#807).

Bug fixes

  • Polygonization near image borders is more robust: ROIs are built correctly at the edges (#825), ray intersection is fixed, coordinates are clamped, and baselines no longer need to be as smooth to compute the offset.
  • Fixed batches being dropped by the parallel recognizer when the last line of a batch gave an empty record.
  • Forced alignment now matches the recognition output.
  • Fixed the neural reading order with combined models.
  • ketos segtest now picks the right output channels and counts objects of merged classes correctly (#812).
  • Fixed a crash in legacy blla.segment() with model files that have no hyperparameters.
  • Segmentation no longer writes the full model repr to the log for every page.

Misc

  • Upgraded lightning to 2.6.6. Updated the CI actions and added Dependabot.

Thanks to Thibault Clérice, Stefan Weil and kobiljon for their contributions.