sparkfish / augraphy

Augmentation pipeline for rendering synthetic paper printing, faxing, scanning and copy machine processes
https://github.com/sparkfish/augraphy
MIT License
354 stars 46 forks source link

Handwritten, word-based scribbles/blurbs based on provided text input #139

Closed kwcckw closed 1 year ago

kwcckw commented 2 years ago

From this discussion https://github.com/sparkfish/augraphy/issues/76, we would need word based scribble effect.

Initially, i think we may improve current scribble augmentation to accept text file or user input. Then we need to draw those words by using certain font type (which i have no idea yet) so that it looks like a scribble. Along with the drawing process, we may need some other effect such as rotation, scaling and shifting too. Or is there any other better way to do this?

proofconstruction commented 2 years ago

We might be able to use this: https://github.com/builtree/handwrite

kwcckw commented 2 years ago

We might be able to use this: https://github.com/builtree/handwrite

Thanks, will look into that after this.

jboarman commented 1 year ago

If we can find a good way to convert SVG to a rasterized image, then we could use this handwriting generator:

https://github.com/sjvasquez/handwriting-synthesis https://www.calligrapher.ai/

kwcckw commented 1 year ago

If we can find a good way to convert SVG to a rasterized image, then we could use this handwriting generator:

https://github.com/sjvasquez/handwriting-synthesis https://www.calligrapher.ai/

Yes, that should be possible. In this discussion they did mention on converting svg into numpy: https://stackoverflow.com/questions/55440483/how-can-i-optimize-the-palette-image-size-with-pil/55442505#55442505

kwcckw commented 1 year ago

This is now resolved in this update: https://github.com/sparkfish/augraphy/pull/278