Model Summary

norwegian-danish-htr-satrn-v1 is a handwritten text recognition (HTR) model with a SATRN architecture. It is trained on the Historical Danish Handwriting dataset from Aarhus City Archives and the NorHandV3 dataset.

The model is intended to be used for handwritten text recognition on textlines from Norwegian and Danish documents from the 1800s and 1900s. The model was trained using the MMOCR framework.

Model Details

Model Description

  • Developed by: The AI team at the National Archives of Norway
  • Model type: SATRN (Self-Attention Text Recognition Network)
  • Language(s) (NLP): Norwegian, Norwegian Bokmål, Danish
  • License: MIT

Uses

Intended use

This model is intended to be used as the text recognition step in a pipeline for digitizing handwritten documents in Norwegian and Danish from the 19th and 20th centuries. If dealing with documents that contain multiple lines of text, end-to-end use requires prior steps that segment the documents into appropriate regions and textlines.

Note that using this model on documents that differ from what the model was trained on will likely not yield good results. This includes:

  • Documents in other languages than Norwegian and Danish
  • Documents from other time periods than the 1800s and 1900s
  • Documents that are not handwritten or that do not contain running text
  • Documents with atypical layouts or handwriting styles

Bias, Risks, and Limitations

Any use on material outside of the scope of the model (as described in the previous section) is not recommended and may yield poor results. This model was trained on publicly available data that is believed not to contain sensitive information. Still, we can't guarantee that all training data was free of sensitive content. All users should perform quality control on any outputs produced by this model before using them in production or real-world applications. The authors and maintainers of this model are not responsible for any consequences arising if sensitive or incorrect outputs should be produced by the model.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to get started

Here is a code snippet to help you get started with inference using this model on the provided test image:

from mmocr.apis import MMOCRInferencer

infer = MMOCRInferencer(rec="satrn_600x48.py", rec_weights="model_state_dict.pth", device="cpu")
result = infer("test_image.png")
print(result["predictions"])

Training Details

See our published config file for an overview of the model architecture and detailed training parameters.

Evaluation

The model was trained on the combined Aarhus and NorHand datasets. These were the final evaluation metrics after training:

CER Char Precision Char Recall Word Acc (Ignore Case + Symbol) Word Acc (Ignore Case) Word Acc
0.0414 0.9705 0.9729 0.7173 0.5868 0.5737

License

This model is licensed under the MIT License.

The model files may contain code inserted by the model training library. Such code remains licensed under the terms of the original library.

Training was performed using the MMOCR library (https://github.com/open-mmlab/mmocr), which is licensed under the Apache License, Version 2.0.
All applicable Apache License 2.0 notices and terms are preserved.
A copy of the Apache License, Version 2.0 is available at: http://www.apache.org/licenses/LICENSE-2.0

Attribution

This model was trained using:

  • NorHand v3 / Dataset for Handwritten Text Recognition in Norwegian — CC BY 4.0 © Beyer, Y., & Solberg, P. E. (2023). dataset license
  • Historical Danish handwriting — CC BY 4.0 © Aarhus City Archives, Denmark. dataset license

Model Card Contact

kunstigintelligens@nasjonalarkivet.no

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ArkivML/norwegian-danish-htr-satrn-v1