sniklaus/3d-ken-burns
an implementation of 3D Ken Burns Effect from a Single Image using PyTorch
What it solves
Still photos are static, but this project makes them feel alive by simulating a 3D camera movement. Instead of a flat pan or zoom, it adds motion parallax — objects at different depths move at different speeds — so the result looks like a real video shot from a moving camera.
How it works
This is a reference implementation of the 3D Ken Burns effect from a single image. It first estimates the depth of every pixel in the image (how far away each part is). Then, using that depth map, it renders new frames from slightly different virtual camera positions during a scan and zoom. The code uses PyTorch and some CUDA-accelerated functions (via CuPy). The project provides scripts for fully automatic generation, for a web interface to manually adjust the camera path, and for depth estimation and benchmarking.
Who it’s for
Researchers, photographers, and video creators who want to turn a single still photo into a short cinematic clip. Because it is licensed for non-commercial use only, it is best suited for academic study, personal experimentation, or as a basis for further research. Users need a CUDA-capable GPU and some familiarity with Python command-line tools.
Highlights
- Fully automatic animation from a single image (
autozoom.py) - Interactive web interface to manually define the camera path
- Depth estimation script with detailed benchmarks
- Large dataset of synthetic scenes with color, depth, and normal maps (updated with varying focal lengths)
- Camera poses extracted from the engine save files
- Multiple community-provided Colab notebooks for running in the cloud without local setup
Related
- Project
- Project
- Project
- Project