Handwriting-Transformers icon indicating copy to clipboard operation
Handwriting-Transformers copied to clipboard

Generate custom handwriting?

Open SB2020-eye opened this issue 2 years ago • 5 comments

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.

SB2020-eye avatar Mar 25 '22 16:03 SB2020-eye

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.

ankanbhunia avatar Mar 29 '22 08:03 ankanbhunia

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. 😃

SB2020-eye avatar Apr 01 '22 15:04 SB2020-eye

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.

sah1lga1kwad avatar Feb 02 '24 07:02 sah1lga1kwad

A new notebook file is added for custom handwriting (https://colab.research.google.com/github/ankanbhunia/Handwriting-Transformers/blob/main/demo_custom_handwriting.ipynb).

ankanbhunia avatar Feb 16 '24 17:02 ankanbhunia