<commit_before>
Sketch
------

[Eitz et al](http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/) asked non-expert humans to sketch objects of a given category and gather 20,000 unique sketches evenly distributed over 250 object categories.

    @article{eitz2012hdhso,
        author={Eitz, Mathias and <NAME> <NAME>},
        title={How Do Humans Sketch Objects?},
        journal={ACM Trans. Graph. (Proc. SIGGRAPH)},
        year={2012},
        volume={31},
        number={4},
        pages = {44:1--44:10}
    }

An example of the original sketches:

![original sketches](http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/teaser_siggraph.jpg)

The original sketch png files are converted to numpy npy files with 
[Sketch.ipynb](http://nbviewer.ipython.org/github/udibr/draw/blob/master/datasets/Sketch.ipynb)

The two npy files created should be placed in the directory binarized_sketch in fuel data directory

To learning and generating images works like this

    cd ../draw
    python train-draw.py --name=sketch --attention=2,5 --niter=64 --lr=3e-4 --epochs=100
    python sample.py --size=56 sketch-r2-w5-t64-enc256-dec256-z100-lr34_log_model.pkl
    convert -delay 5 -loop 1 -negate samples-*.png sketch.gif
    
This is the best result I got so far

 ![generated sketches](../doc/sketch-r2-w5-t64-enc256-dec256-z100-lr34.gif)

(not so good so far...)<commit_msg>link to sketch tarball<commit_after>
Sketch
------

[Eitz et al](http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/) asked non-expert humans to sketch objects of a given category and gather 20,000 unique sketches evenly distributed over 250 object categories.

    @article{eitz2012hdhso,
        author={<NAME> Hays, <NAME> <NAME>},
        title={How Do Humans Sketch Objects?},
        journal={ACM Trans. Graph. (Proc. SIGGRAPH)},
        year={2012},
        volume={31},
        number={4},
        pages = {44:1--44:10}
    }

An example of the original sketches:

![original sketches](http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/teaser_siggraph.jpg)

The original sketch png files are converted to numpy npy files with 
[Sketch.ipynb](http://nbviewer.ipython.org/github/udibr/draw/blob/master/datasets/Sketch.ipynb).
You can downlad a tar ball of the npy files from [here](https://s3.amazonaws.com/udidraw/binarized_sketch.tgz).

The two npy files created should be placed in the directory binarized_sketch in fuel data directory

To learn and generate images do

    cd ../draw
    python train-draw.py --name=sketch --attention=2,5 --niter=64 --lr=3e-4 --epochs=100
    python sample.py --size=56 sketch-r2-w5-t64-enc256-dec256-z100-lr34_log_model.pkl
    convert -delay 5 -loop 1 -negate samples-*.png sketch.gif
    
This is the best result I got so far

 ![generated sketches](../doc/sketch-r2-w5-t64-enc256-dec256-z100-lr34.gif)

(not so good...)
{'fraction_non_alphanumeric': 0.12465373961218837, 'fraction_numerical': 0.04813019390581717, 'mean_word_length': 3.3378378378378377, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7416659', 'n_tokens_mistral': 1079, 'n_tokens_neox': 960, 'n_words': 267}