X-rayLaser / pytorch-handwriting-synthesis-toolkit

Handwriting generation and handwriting synthesis as described in Alex Graves's paper https://arxiv.org/abs/1308.0850. Pytorch implementation.
MIT License
66 stars 11 forks source link

Making output hair-thin #4

Closed daphna-kaplan closed 1 year ago

daphna-kaplan commented 1 year ago

Is there a way to control the thickness of the text? I haven't found a parameter for that, but I saw other implementations that did include this option. any tips on how hard would it be to implement it and where to start?

X-rayLaser commented 1 year ago

You are right. I guess I forgot to add this argument. I am working on it. That should be trivial to do.

daphna-kaplan commented 1 year ago

Thank you! I found the relevant change and it is indeed very easy to implement. I am also working on adding an "export to svg" option, I will create a request when it's ready. By the way, I wanted to thank you personally for the GREAT documentation! I understood the project right away and managed to navigate it easily.

X-rayLaser commented 1 year ago

You are welcome! I am glad that you found this project useful. That "export to svg" option sounds good.

X-rayLaser commented 1 year ago

I have just pushed the changes. The new optional argument is called thickness. I have also updated the commands section in the Readme file to include this new option.

mattlevine32 commented 1 year ago

+1 on SVG export @daphna-kaplan, thanks for working on it! I have a use case where I need the SVG output to ideally only be a single SVG strokes (not a filled outline of the letters). i.e the just traces out the exact shape of the letter. Does that happen to be the same as what you're doing?

daphna-kaplan commented 1 year ago

@mattlevine32 I just pushed a pr, let's see what the author thinks :) I think you can achieve your goal with the .svg export + the new thickness parameter (I have the same need of a single line svg file)

X-rayLaser commented 1 year ago

@daphna-kaplan I have viewed the Pull Request. It looks good, but there are 3 tiny fixes required :). I have left comments near relevant lines describing the issues. Let me know if you have any question.

Once those issues are taken care of, I will happily merge the changes into the main branch. Thank you for your contribution!

daphna-kaplan commented 1 year ago

@X-rayLaser Pushed the changes, good calls! thank you :)