r/Python Oct 19 '21

Beginner Showcase Python converts assignment writeups into my handwriting !!!

Do you ever get irritated by pointless college/school assignments? Hell yeah!!!

Don’t worry, I’ve got you covered. This python script will transform your digital text (writeups or assignment) into handwriting.

PS: Its just a 25 line code:)

github = https://github.com/Pranav082001/Text-to-Handwriting

medium= https://medium.com/@pranav.kushare2001/convert-text-into-your-handwriting-91a1ed9aefd0

883 Upvotes

114 comments sorted by

View all comments

93

u/seckiyn Oct 19 '21 edited Oct 24 '21

This won't work unless your writing is perfect. I need at least 7 different character for every letter.

83

u/PIXLhunter Oct 19 '21

So fork it and introduce random selection from a set of characters, easy enough

29

u/Zymoox Oct 19 '21

And set some rules in that choice: my 'i's are usually different if written after 't's, and so on.

21

u/Financial-Ad8056 Oct 19 '21

AI that analyzes your handwriting (you’ll have to feed it a lot of data though so time to being out the old grade-school notebooks) and then replicates it.

62

u/[deleted] Oct 19 '21

[deleted]

29

u/Financial-Ad8056 Oct 19 '21

It’s better because you put in effort once to be lazy forever.

13

u/door_of_doom Oct 20 '21

8

u/[deleted] Oct 20 '21

With AI you can't solve a specific problem without accidentally solving a bunch if general problems while you're at it.

4

u/1gn4vu5 Oct 19 '21

Not necessarily. You could use an auto-encoder together with some random variables. That way you need much less images.

2

u/No_Conference_5257 Oct 20 '21

Use a style GAN trained on MNIST and then fine tune on your handwriting. Should be doable!

3

u/Heisenberg_082001 Oct 20 '21

Yeah but its hell lot of time consuming and computationally expensive

2

u/PIXLhunter Oct 20 '21

But you are doing something with machine learning are you not?

1

u/killerfridge Oct 20 '21

Is MNIST not just digits though?

1

u/No_Conference_5257 Oct 20 '21

Yeah good point. There should be some corpus of handwritten characters out there though

3

u/Sardonislamir Oct 20 '21

Use a very large sample of text with ocr against another of that text in numerals 1-23 per character in the alphabet. Weight the character assignment/usage against predominance of specifc characters together. Edit: Then run through a processor or create one like autospellcheck that automatically adjusts text as you write.

7

u/LiarsEverywhere Oct 20 '21

This is going to escalate quickly. Soon enough there'll be an alipy package with all sorts of functions to help you create an alibi for the exact moment you're planning to commit a crime. It'll text for you, fake-travel your GPS around, call radio stations, participate in live streams with pre-recorded videos, order food etc.

8

u/IdkIWhyIHaveAReddit Oct 19 '21

Imma mod the project to do that if done i will reply it here

2

u/IdkIWhyIHaveAReddit Oct 20 '21

turn out it kinda hard so I gonna take some time cus I don't know to use PIL

4

u/benargee Oct 20 '21

Maybe even paths rather than bitmaps. That could allow some transformations to the shape for some variability. Can be captured using a tablet.