Skip to content
intesarjawadPublic

About

Give your child's drawing your dog's walk. Experimental animation that keeps the original strokes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Copypaw

Your child's creature. Your dog's walk.

Copypaw animates a four-legged drawing with motion from a side-on pet video, keeping the original strokes.

A child's four-legged creature moves over a filmed dog on a light table, with both sets of steps visible together.

Experimental: the drawing uses the tracked motion, but how closely it copies the pet's gait has not been measured.

Try your drawing. The command-line version runs on a laptop CPU, without a GPU or an account.

Or install the command line:

uv tool install git+https://github.com/intesarjawad/copypaw

Two ways to use it

Either way, the strokes stay the child's own: the drawing is deformed, never redrawn.

In a browser tab. The page rigs your drawing, lets you drag its joints and animates it with the bundled dog walk. Nothing leaves your machine. It cannot track your own pet yet, and it saves no files.

On the command line. Film your pet from the side and the drawing takes the tracked joint motion. Three commands take the clip to a side-by-side video and GIF:

uv run copypaw capture copypaw/selftest/dog_walk.mp4 -o out/motion
uv run copypaw rig copypaw/selftest/dragon.png -o out/dragon
uv run copypaw animate out/dragon out/motion/motion.npz --clip copypaw/selftest/dog_walk.mp4 -o out/result

Each step with its real output is in docs/cli.md. For a clip that tracks well, read the filming guide.

How it works

  1. Mask. The drawing is separated from its page. A page that holds more than one creature stops with a message and a link to examples.
  2. Joints. A four-legged template of 16 joints is fitted to the mask, and you can drag any joint afterwards.
  3. Mesh. The outline becomes a triangle mesh with about 1000 interior vertices, deformed as rigidly as possible so the texture stays the drawing's.
  4. Pet pose. YOLOX finds the animal and ViTPose reads 17 joints per frame on the CPU. Left and right swaps are fixed, and paw contacts and the ground line are found.
  5. Retarget. The motion is baked onto the drawing's own leg lengths, then adjusted until planted paws touch the ground.

The deformation and rendering engine is AnimatedDrawings, vendored. The full walk-through is in docs/how_it_works.md.

Known limits

  • Gait is unmeasured. The bundled sample measures paw-contact timing, not how closely the drawing copies a pet's gait, and no eligible gait example exists in the bundled material (evaluation).
  • Film from the side. Front and rear views lose legs.
  • Tails are stiff. A tail follows a share of the hind legs' swing and has no motion of its own.
  • It is slow. See the timings below.

The rest are in docs/limits.md.

Speed

uv run python scripts/bench.py --write-readme times each stage on the packaged five-second clip in balanced mode. This run was on an Apple M5, CPU only, on 2026-11-12: single wall times on a shared machine, not performance budgets.

Measurement Result
Detect, per frame 3331.9 ms
Pose, per frame 2118.1 ms
Identity, per frame 2.4 ms
Smoothing, per frame 0.0 ms
Capture, no flip test 305.7 s
Capture, flip test 401.8 s
Animate, including video/GIF exports 125.1 s
Capture → rig → animate, cached models 390.9 s
Gallery motion render n/a

What each row includes is in docs/evaluation.md.

Run it locally

Python 3.12, 3.13 or 3.14, uv 0.13.7, and Node.js 24 with npm for source builds.

make setup
uv run copypaw doctor
uv run copypaw models fetch --mode balanced
make check

models fetch downloads the weights once and verifies each SHA-256. Rendering needs OpenGL: a graphical session on a Mac. The Linux headless fallback has not been run yet (ADR-004).

Where it fits

AnimatedDrawings animates human figures from any motion file, and Copypaw vendors its engine. Viggle generates new video and redraws the pixels. Procreate Dreams is a full animation studio. Copypaw covers one narrow job: a four-legged drawing that keeps its strokes and takes its motion from a pet clip. How they compare.

Licences

Code is MIT (LICENSE). The vendored engine and the downloaded model weights keep their own licences, and the licence of the YOLOX detector weights is unconfirmed: read docs/licences.md before you redistribute them. Photos and clips you process stay on your machine.

Contributing

Read CONTRIBUTING.md before sending a change and SECURITY.md for private vulnerability reporting.

About

Give your child's drawing your dog's walk. Experimental animation that keeps the original strokes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages