Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate custom handwriting? #11

Open
SB2020-eye opened this issue Mar 25, 2022 · 5 comments
Open

Generate custom handwriting? #11

SB2020-eye opened this issue Mar 25, 2022 · 5 comments

Comments

@SB2020-eye
Copy link

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.

@ankanbhunia
Copy link
Owner

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.

@SB2020-eye
Copy link
Author

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

@sah1lga1kwad
Copy link

sah1lga1kwad commented Feb 2, 2024

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.

@ewan-m ewan-m mentioned this issue Feb 9, 2024
@ankanbhunia
Copy link
Owner

@mikecummings34
Copy link

mikecummings34 commented Oct 29, 2024

I am getting an index our of range error when trying to use a custom dataset.
I think it has something to do with only having one writer in my dataset?
The data set has 1 writer, with about 5000 examples.
When I print the length of the enumerated torch.dataloader, it shows length of 0.
If I get length of TextDatasetval.__get__item(0) I get a length of 7.
So I think my dataset is ok and formatted correctly. Any clarification would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants