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

UMAPing #19

Open
AlxJude opened this issue Jul 21, 2021 · 18 comments
Open

UMAPing #19

AlxJude opened this issue Jul 21, 2021 · 18 comments

Comments

@AlxJude
Copy link

AlxJude commented Jul 21, 2021

Hello again,

I have completed generating the styles.pkl using the generate.py.

Save styles using get_styles.py Then umap_styles.py styles.pkl [image dir]

Could you please tell the format and type of the files present in the image_dir and from where I can get these files. An ordered.txt is required.
Thank you for your help.

PS. import os is missing in umap_styles.py

@herobd
Copy link
Owner

herobd commented Jul 21, 2021

You can leave off the image directory argument. I believe it was to allow the images themselves to be plotted as points; I don't think I ever actually got it working properly.

@AlxJude
Copy link
Author

AlxJude commented Jul 21, 2021

Oh okay. Could you please guide me on how to generate a new handwritten image?

@herobd
Copy link
Owner

herobd commented Jul 21, 2021

That is what generate.py is for, sorry that wasn't clear in the README. It provides several different ways to generate.

@herobd
Copy link
Owner

herobd commented Jul 21, 2021

The f option (from-to) is probably the simplist as it doesn't require the style pickle.

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

I tried with the f option. Unfortunately, I'm getting blurred image for all the generated results.

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

Could you attach the style images and a generated image?

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

These are the images 1 and 2 and the generated image:

a01-000u-00

a01-000u-01

gen0_1

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

Are you using the pre-trained model?

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

No, I trained with IAM dataset.

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

Try the pre-trained model to be sure that works.

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

You are talking about this one, right?
https://github.com/herobd/handwriting_line_generation/releases/tag/w1.0

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

Unfortunately, I'm getting the #12 issue.

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

And you've pulled the latest code? All import mmd_hw_dataset should be gone...

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

I used the above link to download the IAM weights and the Source code
(tar.gz)

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

So that "realese" doesn't have the latest code. It's just a hack way of attaching the weights to the repo. Pull the latest code from the repo itself.

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

It works perfectly using the pre-trained.
I had performed some explicit type conversions before you pushed the #17
I will try training it again.

This is a wonderful project. You guys have done a brilliant job.

@herobd
Copy link
Owner

herobd commented Jul 22, 2021

Thanks!
During training it will save images every X iterations. Check these to be sure it's training correctly as something was going wrong before.
The parameters controlling this in the config are
print_dir: The directory it will save them to
print_every: Save new images after this many iterations (overwrites previous)
serperate_print_every: Saves images under a new directory so that they are not overwritten after this many iterations.

@AlxJude
Copy link
Author

AlxJude commented Jul 22, 2021

Thank you for mentioning the tracking parameters. Now I can see that the images are becoming more and more legible through iterations.

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

2 participants