Label-Free Handwritten Text Recognition Learner
It is a toolkit providing a set of tools for training a neural net to recognize handwritten words. No labeled data is needed. The toolkit achieves this in two phases:
- pre-train the model on synthetic handwriting images
- fine-tune the model on a dataset of real unlabeled handwriting images via a self-training technique.
This implementation is based on the following paper: Self-Training of Handwritten Word Recognition for Synthetic-to-Real Adaptation.
Possible use cases
Offline Handwritten Word Recognition converts an image that contains a handwritten word into a machine-readable representation (text). So it is Image-to-Text technology. A pre-trained handwritten word/line recognizer usually gets used as a part of a complete pipeline. For example, the full-page recognition system will apply handwritten text segmentation to split the page image into lines and individual words. Then, a handwritten word recognition neural net will transcribe these tightly cropped word images into text.
Why use this toolkit
Training a neural net for handwriting recognition requires large amounts of handwriting data. Collecting the data is a laborious and time-consuming process. On the other hand, generating synthetic handwritten images is cheap due to the abundance of handwritten fonts.
It turns out that training the model on purely synthetic images already gives a decent performance. A follow-up synthetic-to-real adaptation (fine-tuning) can significantly improve the accuracy of the final system. It can also help the model adapt to the style of a particular writer.
The toolkit enables one to build a handwriting recognizer using only unlabeled data. Moreover, pretraining on purely synthetic images requires no data at all.
What can it do
Concretely, the toolkit implements the following tasks:
- extracting probability distribution from text corpora
- generating synthetic handwritten word images
- training on synthetic images
- fine-tuning on real (handwritten word) images
- evaluating a pretrained model by computing metrics (loss, CER, WER, etc.)
- using the pretrained model to recognize handwritten words
- saving/retrieving model checkpoints
What is needed
To make it work, the toolkit expects a developer to provide:
- handwritten fonts
- text corpora
- real unlabeled images of handwritten words
- optionally, real labeled images of handwritten words (see the note)
Note: although transcriptions aren't required, a small subset of transcribed/labeled images will help estimate metrics.
Documentation
You can find a documentation at here
Support
If you find this repository useful, consider starring it by clicking at the ★ button. It will be much appreciated.
Metadata
Release files for lafhterlearn 0.7.1
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 |
|---|---|---|---|---|
| lafhterlearn-0.7.1.tar.gz | 39.3 kB | Without provenance | Details for lafhterlearn-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lafhterlearn-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for lafhterlearn-0.7.1-py3-none-any.whl |
Total release size: 87.9 kB
Release files / lafhterlearn-0.7.1.tar.gz
| Download URL | lafhterlearn-0.7.1.tar.gz |
|---|---|
| Size | 39.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25833b5f705013e67b5a1e0c4c95edbc3b89fb38fcab77d0e31418b40ad2190
|
|
BLAKE2b-256 checksum How to use checksums |
fc4119af45d9f6413b503cee6614212baafc806710e6995803544393d909f863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.9
|
Release files / lafhterlearn-0.7.1-py3-none-any.whl
| Download URL | lafhterlearn-0.7.1-py3-none-any.whl |
|---|---|
| Size | 48.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1571f402409ad95ab8f211a73fd715a431e714999f0e1f0c52f7c9d63382360a
|
|
BLAKE2b-256 checksum How to use checksums |
012dd1ea363f87005f29049e946d310a426c01e2e5936b5986f2d073006ab3a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.9
|
Security for lafhterlearn 0.7.1
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.