How to retrain a model in Transkribus
Retraining a text recognition model in Transkribus is one of the most effective ways to generate accurate transcriptions. Whether you're working with historical documents, handwritten diaries, or unique typefaces, retraining allows your model to learn from each cycle of corrections, driving down error rates and enhancing reliability.
In this post, we’ll walk you through the retraining process in Transkribus, explaining why retraining is valuable, what steps are involved, and answering common questions about model retraining.
Why should you retrain a model?
You've trained your first Transkribus model, and it's delivering decent results. But what if you’re aiming for even greater accuracy?
Retraining models is the best way to achieve optimal accuracy. Each time you retrain your model, you add more Ground Truth data to it, giving the model more material to learn from. And the more your model learns, the more likely it is to produce accurate transcriptions. That’s why retraining is one of the best ways to improve the Character Error Rate (CER) of a model.
However, while we talk about “retraining a model,” the process doesn’t actually involve updating the old model, but rather creating a new version of it. Each time you retrain your model, you will create a whole new model. Users often label these successive models by version number, such as “Wolpi Model v1.0,” “Wolpi Model v2.0,” and so on, making it easy to track each step in the model's evolution.
What is the workflow for retraining a model?
Let’s say you want to transcribe an 800-page handwritten diary in English. You manually transcribed 50 pages, and used these pages as Ground Truth to train a model: Diary Model v1.0. You use Diary Model v1.0 to recognise the other 750 pages and find that while the accuracy is good, you think you can do better. So you decide to retrain it and create a new version.
The retraining workflow can be broken down into the following steps:
- Recognise more pages. The first step is to use the first version of your model to recognise more pages from your collection. In this case, we would use Diary Model v1.0 to recognise another 20 pages from the diary.
- Accurately correct the text. Take the automatic transcriptions generated by the model and manually correct them to make sure they are 100% accurate. The more accurate your transcriptions are, the more accurate your model will be.
- Save the pages as Ground Truth. Once your transcriptions are finalised, save them as Ground Truth. In addition to the 50 pages you used to train Diary Model v1.0, you should now have 70 pages of Ground Truth.
- Train a new version of the model. Use those 70 pages of Ground Truth to train a new model — Diary Model v2.0. If there is a relevant public model that fits your collection, then you can use this as a base model. However, do not select the previous version of your model as the base model, as this will confuse Transkribus and produce poorer results.
- Recognise more pages. Once you’ve trained the new and improved version of your model, you’re ready to start the whole process again. Use Diary Model v2.0 to recognise another 20 pages from the diary, manually correct them to create more Ground Truth, and then train a new version of the model with these 90 pages. This process can be repeated as many times as you need until you no longer see any improvements in accuracy.
It is important to remember that a model will not improve until you train a new version of it. People who are new to model training sometimes mistakenly believe that correcting the transcriptions will automatically improve the model. However, only by following the steps above and actively training a new version of the model can you increase its accuracy.
How long does this process take?
Reading the description above, it may seem like retraining a model is quite a time-consuming process. However, bear in mind that each new version of your model should be more accurate than the last, and so each retraining should produce more accurate transcriptions that require less manual correction.
In the example above, it might take a few hours to correct the transcriptions produced by Diary Model v2.0. But by the time you’ve trained Diary Model v5.0, the transcriptions might be so accurate that they barely need any correction at all.
How many pages of Ground Truth should I add each time?
This is a difficult question to answer as it depends on many factors, such as the number of hands in the collection and the complexity of the handwriting.
As a general rule, we recommend adding 20 pages of Ground Truth every time you retrain a smaller model (as in the diary example above) and between 50 and 100 new pages with larger models. However, it may be good to experiment with adding different amounts of Ground Truth and see which is most effective for your model.
How many times can you retrain a model?
When it comes to how many you should retrain your model, there is no minimum or maximum. At the start of the retraining process, you should find that the CER of your model improves each time.
However, after a while, you will find that retraining your model stops having an effect on its CER. This happens because the model has already captured most of the information it can learn from the data, and additional data no longer leads to meaningful gains. At this point, you should stop retraining your model and take the most accurate version as the final version of your model.
Where can I find out more about retraining models?
If you want more information about training text recognition models, Transkribus offers plenty of resources to help you deepen your understanding. For example, the Transkribus Help Center has extensive guides on training different types of models, as well as on all the other tools Transkribus offers.
We also host regular free webinars on model training, transcription, layout analysis, and many other topics. Check out the Events page on the Transkribus website to register for these valuable sessions—they’re an excellent way to ask experts questions directly and learn best practices.
Final thoughts
Retraining a text recognition model in Transkribus might sound like a technical challenge, but once you’re familiar with the process, it becomes a useful way of continually improving the accuracy of your transcriptions. Each new version is a step closer to perfection, especially when you work with diverse, accurate Ground Truth data. Over time, you’ll be able to create a model that tackles even the most complex handwriting or unusual typefaces, helping to unlock your historical documents and preserve them in digital form.