Metadata-Version: 2.1
Name: singleline-models
Version: 0.0.2
Summary: ML Models for Single-Line Drawings
Home-page: https://github.com/andrewlook/singleline_models
Author: Andrew Look
Author-email: andrew.m.look@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: fastcore
Requires-Dist: torch
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: Pillow
Requires-Dist: einops
Requires-Dist: fastprogress
Requires-Dist: wandb
Requires-Dist: onnx
Requires-Dist: transformers
Provides-Extra: dev
Requires-Dist: jupyterlab ; extra == 'dev'

# singleline_models

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install singleline_models
```

## Models

### Sketch RNN

[PyTorch](https://pytorch.org) implementation of the SketchRNN paper, [A
Neural Representation of Sketch
Drawings](https://arxiv.org/abs/1704.03477).

Sketch RNN learns to reconstruct stroke-based drawings, by predicting a
series of strokes. It uses a sequence-to-sequence LSTM model, with
gaussian mixture heads to produce a sequence of stroke coordinates.

![seq2seq model](https://i.ibb.co/4F4HbPB/sketchnn-model.png)

### Datasets

- `data/quickdraw/`: Sample data from [Quick, Draw!
  Dataset](https://github.com/googlecreativelab/quickdraw-dataset)
- `data/look/`: Custom dataset of single-line drawings by @andrewlook

All data is stored in stroke-3 format, meaning a list with three
columns:

- `delta_x`
- `delta_y`
- `lift_pen` (if `1`, “lift the pen” and start a new stroke; otherwise
  `0`)

![stroke-3 turtle](https://i.ibb.co/NLBL4v0/stroke3-turtle.png)

### Acknowledgements

- [PyTorch Sketch
  RNN](https://github.com/alexis-jacq/Pytorch-Sketch-RNN) project by
  [Alexis David Jacq](https://github.com/alexis-jacq)
- [Annotated Sketch RNN in
  PyTorch](https://nn.labml.ai/sketch_rnn/index.html) by
  [LabML](https://nn.labml.ai/)
- [Tensorflow
  SketchRNN](https://github.com/magenta/magenta/blob/main/magenta/models/sketch_rnn/README.md)
  by [Magenta Team](https://magenta.tensorflow.org/) and [David
  Ha](https://github.com/hardmaru)
- [sketch-rnn-datasets](https://github.com/hardmaru/sketch-rnn-datasets)
  by [David Ha](https://github.com/hardmaru)
- [SketchRNN-Pytorch](https://github.com/OhataKenji/SketchRNN-Pytorch)
  by [OhataKenji](https://github.com/OhataKenji)

### Improvements

- [x] Log epoch and learning rate
- [x] LR decay
- [x] ETA decay (for KL loss)
- [x] Dropout
- [x] Layer Normalization
- [x] Recurrent Dropout


