GithubHelp home page GithubHelp logo

aarora8 / deepwriting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emreaksan/deepwriting

0.0 1.0 0.0 1.08 MB

Code for `DeepWriting: Making Digital Ink Editable via Deep Generative Modeling` paper

License: MIT License

Python 100.00%

deepwriting's Introduction

DeepWriting

Code for DeepWriting: Making Digital Ink Editable via Deep Generative Modeling paper.

Watch the video

Implementation of conditional variational RNNs (C-VRNN).

Dataset

We collected data from 94 authors by using IAMOnDB corpus. After discarding noisy samples of IAMOnDB, we compiled a dataset of 294 authors, fully segmented. You can download our preprocessed data from project page.

The dataset is in compressed .npz format. Strokes, labels and statistics can be accessed by using <key, value> pairs. We split handwriting samples by end-of-characters such that each sample consists of ~300 strokes. Samples are then moved to the origin and represented by using the offset values between consecutive strokes.

For example, you can visualize validation samples with indices 1, 5 and 20 by running

python visualize_hw.py -D ./data/deepwriting_validation.npz -O ./data_images -S 1 5 20

If you use our data, we kindly ask you to cite our work, and also fill IAMOnDB's registration form and follow their citation requirements since our dataset extends IAMOnDB.

Training Model

  1. Training details and hyper-parameters are defined in config.py.
  2. Download training dataset and copy into data folder. Otherwise, don't forget to update training_data and validation_data entries in config.py.
  3. Set PYTHONPATH to include source.
export PYTHONPATH=$PYTHONPATH:./source
  1. Run training
python tf_train_hw.py -S <path_to_save_experiment>
  1. If you want to continue training
python tf_train_hw.py -S <path_to_save_experiment> -M <model_folder_name>

Evaluating Model

  1. You can either train a model or download our pretrained model from project page.
  2. You can run
python tf_evaluate_hw.py -S <path_to_save_experiment> -M <model_folder_name> -QL
  1. Evaluation options are defined in tf_evaluate_hw.py globally.

Dependencies

  1. numpy
  2. Tensorflow 1.2+ (not sure if earlier versions work.)
  3. matplotlib
  4. OpenCV (pip install opencv-python is enough)
  5. svgwrite

Missing

We are not planning to release demo interface.

Citation

If you use this code or dataset in your research, please cite us as follows:

@inproceedings{Aksan:2018:DeepWriting,
	author = {Aksan, Emre and Pece, Fabrizio and Hilliges, Otmar},
	title = {{DeepWriting: Making Digital Ink Editable via Deep Generative Modeling}},
	booktitle = {SIGCHI Conference on Human Factors in Computing Systems},
	series = {CHI '18},
	year = {2018},
	location = {Montr{\'}eal, Canada},
	publisher = {ACM},
	address = {New York, NY, USA},
}

deepwriting's People

Contributors

emreaksan 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.