{"id":13617478,"url":"https://github.com/sjvasquez/handwriting-synthesis","last_synced_at":"2025-05-14T19:05:29.085Z","repository":{"id":29825723,"uuid":"122881430","full_name":"sjvasquez/handwriting-synthesis","owner":"sjvasquez","description":"Handwriting Synthesis with RNNs ✏️","archived":false,"fork":false,"pushed_at":"2024-01-11T22:04:19.000Z","size":41172,"stargazers_count":4478,"open_issues_count":58,"forks_count":616,"subscribers_count":89,"default_branch":"master","last_synced_at":"2025-04-06T08:09:38.439Z","etag":null,"topics":["handwriting-generation","handwriting-synthesis","recurrent-neural-networks","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjvasquez.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-02-25T21:59:38.000Z","updated_at":"2025-04-05T16:07:34.000Z","dependencies_parsed_at":"2022-06-26T12:01:42.294Z","dependency_job_id":"3d516011-d7cc-47ce-be64-44e3035efa6d","html_url":"https://github.com/sjvasquez/handwriting-synthesis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjvasquez%2Fhandwriting-synthesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjvasquez%2Fhandwriting-synthesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjvasquez%2Fhandwriting-synthesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjvasquez%2Fhandwriting-synthesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjvasquez","download_url":"https://codeload.github.com/sjvasquez/handwriting-synthesis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710407,"owners_count":21149185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["handwriting-generation","handwriting-synthesis","recurrent-neural-networks","tensorflow"],"created_at":"2024-08-01T20:01:42.411Z","updated_at":"2025-04-13T11:46:08.929Z","avatar_url":"https://github.com/sjvasquez.png","language":"Python","funding_links":[],"categories":["Python","Repos"],"sub_categories":[],"readme":"![](img/banner.svg)\n# Handwriting Synthesis\nImplementation of the handwriting synthesis experiments in the paper \u003ca href=\"https://arxiv.org/abs/1308.0850\"\u003eGenerating Sequences with Recurrent Neural Networks\u003c/a\u003e by Alex Graves.  The implementation closely follows the original paper, with a few slight deviations, and the generated samples are of similar quality to those presented in the paper.\n\nWeb demo is available \u003ca href=\"https://seanvasquez.com/handwriting-generation/\"\u003ehere\u003c/a\u003e.\n\n## Usage\n```python\nlines = [\n    \"Now this is a story all about how\",\n    \"My life got flipped turned upside down\",\n    \"And I'd like to take a minute, just sit right there\",\n    \"I'll tell you how I became the prince of a town called Bel-Air\",\n]\nbiases = [.75 for i in lines]\nstyles = [9 for i in lines]\nstroke_colors = ['red', 'green', 'black', 'blue']\nstroke_widths = [1, 2, 1, 2]\n\nhand = Hand()\nhand.write(\n    filename='img/usage_demo.svg',\n    lines=lines,\n    biases=biases,\n    styles=styles,\n    stroke_colors=stroke_colors,\n    stroke_widths=stroke_widths\n)\n```\n![](img/usage_demo.svg)\n\nCurrently, the `Hand` class must be imported from `demo.py`.  If someone would like to package this project to make it more usable, please [contribute](#contribute).\n\nA pretrained model is included, but if you'd like to train your own, read \u003ca href='https://github.com/sjvasquez/handwriting-synthesis/tree/master/data/raw'\u003ethese instructions\u003c/a\u003e.\n\n## Demonstrations\nBelow are a few hundred samples from the model, including some samples demonstrating the effect of priming and biasing the model.  Loosely speaking, biasing controls the neatness of the samples and priming controls the style of the samples. The code for these demonstrations can be found in `demo.py`.\n\n### Demo #1:\nThe following samples were generated with a fixed style and fixed bias.\n\n**Smash Mouth – All Star (\u003ca href=\"https://www.azlyrics.com/lyrics/smashmouth/allstar.html\"\u003elyrics\u003c/a\u003e)**\n![](img/all_star.svg)\n\n### Demo #2\nThe following samples were generated with varying style and fixed bias.  Each verse is generated in a different style.\n\n**Vanessa Carlton – A Thousand Miles (\u003ca href=\"https://www.azlyrics.com/lyrics/vanessacarlton/athousandmiles.html\"\u003elyrics\u003c/a\u003e)**\n![](img/downtown.svg)\n\n### Demo #3\nThe following samples were generated with a fixed style and varying bias.  Each verse has a lower bias than the previous, with the last verse being unbiased.\n\n**Leonard Cohen – Hallelujah (\u003ca href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"\u003elyrics\u003c/a\u003e)**\n![](img/give_up.svg)\n\n## Contribute\nThis project was intended to serve as a reference implementation for a research paper, but since the results are of decent quality, it may be worthwile to make the project more broadly usable.  I plan to continue focusing on the machine learning side of things.  That said, I'd welcome contributors who can:\n\n  - Package this, and otherwise make it look more like a usable software project and less like research code.\n  - Add support for more sophisticated drawing, animations, or anything else in this direction.  Currently, the project only creates some simple svg files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjvasquez%2Fhandwriting-synthesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjvasquez%2Fhandwriting-synthesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjvasquez%2Fhandwriting-synthesis/lists"}