GithubHelp home page GithubHelp logo

bunny3 / handwritten Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thesage21/handwritten

0.0 1.0 0.0 549 KB

Plain text to handwriting generator.

Home Page: http://thesage21.github.io/handwritten/

License: MIT License

Python 100.00%

handwritten's Introduction

Handwritten

Homework could have been so much easier if only it could be submitted as a typed copy.
Using Alex Graves' paper on handwriting generation is a step I liked. This script uses his amazing paper (actually the free service he has set up online) to generate handwritten homework for given text.

Requirements

  • python3.x
  • pip install requests
  • pip install pillow

Or you can do pipenv install --python3

Usage

usage: get_hand.py [-h] (-f FILE | -t TEXT) [-s STYLE] [-b BIAS] [-p POSITION]
                   [-c COLOR]

Plain text to handwriting generator.

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  text file to generate handwriting from (default: None)
  -t TEXT, --text TEXT  text to generate handwriting from (default: None)
  -s STYLE, --style STYLE
                        handwriting style from 0 to 5, where 5 is random style
                        (default: 5)
  -b BIAS, --bias BIAS  handwriting bias from 0.1 to 1 (default: 0.8)
  -p POSITION, --position POSITION
                        start at specific position (default: 0)
  -c COLOR, --color COLOR
                        add custom RGB color values to generated text
                        (default: 0,0,0)

Example

Generating handwritten text page from a file (with no more than 100 characters in each line) with handwriting style 4:

python get_hand.py -f desc.txt -s 4
python make_page.py

Now open pages/1.png:

sample handwriting

Generating handwritten text using a string in blue color & custom bias with handwriting style 2:

python get_hand.py -t "Homework could have been easier" -s 2 -c 0,0,200 -b 0.85

Now open images/0.png:

blue ink

More Info

The paper
The man behind it all. Alex Graves
What I am using

handwritten's People

Contributors

thesage21 avatar ritiek avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.