Handwriting-Transformers
Handwriting-Transformers copied to clipboard
Generate custom handwriting?
Could this be used to reproduce one particular handwriting style? (That is, one not in the IAM database -- such as my own handwriting, or the handwriting of a famous historical figure.)
If so, could you please walk me through how to do that? I would be very appreciative.
I haven't tried with custom handwritting. However, you can refer to the demo.ipynb file. Cross-dataset evaluation (ie. CVL trained model tested on IAM test set) is shown in the script. The results were satisfactory. I guess, the model will perform well on the custom handwritting as well.
You can use the function page_val = model._generate_page()
(refer to demo.ipynb) and input your custom handwriting (resized and padded to [1, 15, 32, 192]; 15=no number of words, 32=height, 192=padded width). Don't forget to do necessary preprocessing.
Thanks so much for replying.
I imagine that you answered my question very well. Regrettably, I am too much of a novice to understand how exactly to do what you are describing. If you're willing to elaborate and walk through the steps like someone would for a beginner, that would be immensely appreciated. If not, I know that one's time is valuable and would totally understand. 😃
Thanks so much for replying.
I imagine that you answered my question very well. Regrettably, I am too much of a novice to understand how exactly to do what you are describing. If you're willing to elaborate and walk through the steps like someone would for a beginner, that would be immensely appreciated. If not, I know that one's time is valuable and would totally understand. 😃
Use this -> https://github.com/Shambu-K/handwriting-generator-model
This is the implementation of custom handwriting using this Github Repo If you need help executing, message here.
A new notebook file is added for custom handwriting (https://colab.research.google.com/github/ankanbhunia/Handwriting-Transformers/blob/main/demo_custom_handwriting.ipynb).