Convert a static image into a smooth drawing animation using Manim.
This project takes a doodle, photo, or sketch, converts it into an SVG vector graphic, and renders it into an animated MP4 video with Manim.
It also prepends the last frame to the start of the video, creating a short pause for a more polished look.
- Image → Sketch → SVG → Animated MP4
- Adjustable animation parameters:
- Animation duration (seconds)
- Subpath delay ratio (fractional delay between subpaths)
- Scale factor (zoom in/out)
- Drawing style (
linear,smooth,there_and_back,wiggle)
- High-quality vector rendering powered by Manim
- Automatic last-frame prepend for a smooth intro
- Simple Gradio web interface
git clone https://github.com/yourusername/sketch-to-motion.git
cd Sketch2MotionMake sure you have Python 3.9+ installed.
pip install -r requirements.txtKey dependencies:
Install Manim:
Install ffmpeg:
- Windows: Download from official site and add
binfolder to PATH - macOS:
brew install ffmpeg - Linux:
sudo apt install ffmpegor use your package manager
python app.pyAccess the app at:
http://127.0.0.1:7880
- Upload a doodle/photo as the Input image.
- Click Generate sketch to convert it to SVG.
- Adjust Animation duration, Subpath delay ratio, Scale factor, and Drawing style.
- Click Generate video to render and preview the animation.
- Download the generated MP4.
