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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ocrd_froc-1.1.0.tar.gz | 81.1 MB | Without provenance | Details for ocrd_froc-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocrd_froc-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for ocrd_froc-1.1.0-py3-none-any.whl |
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
|
Security for ocrd-froc 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.