Notebooks for the 2026 KABK workshop Generative Gestures
Find a file
2026-01-22 21:45:51 +01:00
datasets Generative Gestures helper functions 2026-01-12 16:57:47 +01:00
gg When packaging SVG's parse Curves and add some noise 2026-01-21 23:07:43 +01:00
images you.svg 2026-01-12 16:54:53 +01:00
models Generative Gestures helper functions 2026-01-12 16:57:47 +01:00
OUT OUT folder 2026-01-19 14:16:04 +01:00
sketch-rnn@253ea881aa Train optional params 2026-01-21 17:40:30 +01:00
.gitignore Sketch rnn sampling 2025-12-29 16:50:19 +01:00
.gitmodules remote fix 2026-01-16 15:07:39 +01:00
.python-version python version 2025-12-29 11:32:34 +01:00
01-prepare-data.ipynb Clean notebooks and descriptions 2026-01-22 21:45:51 +01:00
02-train-network.ipynb Clean notebooks and descriptions 2026-01-22 21:45:51 +01:00
03-generate-lines.ipynb Clean notebooks and descriptions 2026-01-22 21:45:51 +01:00
04-draw.ipynb Clean notebooks and descriptions 2026-01-22 21:45:51 +01:00
pyproject.toml When packaging SVG's parse Curves and add some noise 2026-01-21 23:07:43 +01:00
README.md Animation tip 2026-01-22 14:52:50 +01:00
uv.lock Should fix Mac x86 compatibility 2026-01-19 20:00:33 +01:00

Install

  1. Make sure to have git installed. See Git installation instructions
  2. Make sure you have uv installed. See uv installation instructions
  3. Clone this repository by opening Terminal (Mac/Linux) or PowerShell (Windows) and run:
    git clone --recurse-submodules https://git.rubenvandeven.com/r/2026-kabk-workshop-drawing-gestures.git
    
  4. Move into the directory with cd 2026-kabk-workshop-drawing-gestures
  5. Run jupyter to browse the different notebooks of the workshop:
    uv run jupyter lab --collaborative
    

Updating

  1. Make sure to cd into the 2026-kabk-workshop-drawing-gestures
  2. Stop Jupyter (ctrl+c followed by a y)
  3. Get the latest version of the code: git pull
  4. Make sure the submodules are updated as well: git submodule update
  5. Update dependencies: uv sync
  6. Now start again with uv run jupyter lab --collaborative

Tricks

Animate a list of shapes. Here, that is conditionals:

import time
output = display('', display_id="anim")
for i, shape in enumerate(conditionals):
    img = shape.as_svg(30, 'red', 3)
    output.update(img)
    time.sleep(.1)

Resources

Dataset preparation

  • The input images are SVG. Any SVG file can be converted to the required NPZ format by running package_images()
  • Every SVG file can contain multiple drawings: a set of paths grouped together is one shape.
    • Thus, the following SVG has two shapes, one with two strokes, the other with a single one:
      <svg><g><path /><path /></g><g><path /></g></svg>
      
  • Tracing with Inkscape, when tracing a line drawing make sure to use: Centerline tracing (autotrace)