Skip to main content

ocrd_froc

Perform font classification and text recognition (in one step) on historic documents.

> Open and deserialize PAGE input files and their respective images,
> iterating over the element hierarchy down to the text line level.

> Then for each line, retrieve the raw image and feed it to the font
> classifier and/or the  OCR.

> Annotate font predictions by name and score as a comma-separated
> list under ``./TextStyle/@fontFamily``, if any.

> Annotate the text prediction as a string under ``./TextEquiv``.

> If ``method`` is `adaptive`, then use `SelOCR` if font classification is confident
> enough, otherwise use `COCR`.

> Finally, produce a new PAGE output file by serialising the resulting hierarchy.

Installation

Models

Default

The default.froc model is composed of a SelOCR network and a COCR architecture, and is trained to classify and OCR textlines on the following 12 classes:

  • Antiqua

  • Bastarda

  • Fraktur

  • Textura

  • Schwabacher

  • Greek *

  • Italic

  • Hebrew *

  • Gotico-antiqua

  • Manuscript *

  • Rotunda

  • No class/Ignore

* Greek, Hebrew and Manuscript font groups do not currently provide good results due to a lack of training data.

Usage

OCR-D processor interface ocrd-froc

To be used with PAGE-XML documents in an OCR-D annotation workflow.

Parameters:

   "ocr_method" [string - "none"]
    The method to use for text recognition
    Possible values: ["none", "SelOCR", "COCR", "adaptive"]
   "replace_textstyle" [bool - true]
    Whether to replace existing textStyle
   "network" [string]
    The file name of the neural network to use, including sufficient path
    information. Defaults to the model bundled with ocrd_froc.
   "fast_cocr" [boolean - true]
    Whether to use optimization steps on the COCR strategy
   "adaptive_threshold" [number - 95]
    Threshold of certitude needed to use SelOCR when using the adaptive
    strategy
   "font_class_priors" [array - []]
    List of font classes which are known to be present on the data when
    using the adaptive/SelOCR strategies. If this option is specified,
    any font classes not included are ignored. If 'other' is
    included in the list, no font classification is output and
    a generic model is used for transcriptions.

Metadata

Release files for ocrd-froc 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocrd-froc 1.1.0
File Size Uploaded
ocrd_froc-1.1.0.tar.gz 81.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ocrd-froc 1.1.0
File Interpreter ABI Platform
ocrd_froc-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 162.2 MB

Release files / ocrd_froc-1.1.0.tar.gz

Download URL ocrd_froc-1.1.0.tar.gz
Size 81.1 MB
Tags Source
SHA-256 checksum
How to use checksums
d5c9b15d5571a00727154e95b1b3d2f4fd0c2bc0a39ae0e0292a224746f7939e
BLAKE2b-256 checksum
How to use checksums
0b7550dd9ac9475269199ae486fb59f0013f5d6dfd97d52582eecb0f186f9d63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / ocrd_froc-1.1.0-py3-none-any.whl

Download URL ocrd_froc-1.1.0-py3-none-any.whl
Size 81.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6048985d195887324adca3ef374e8e014336dd921de60b14a4b5cf0c19c6589e
BLAKE2b-256 checksum
How to use checksums
a36f8fe380ee48eb3a0665f0570df6c51b051709ab3fed3b7a782122ee7d0822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

0.6.1

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page