DAIN
Depth-Aware Video Frame Interpolation (CVPR 2019)
A Python research project that generates extra video frames to increase frame rate or create slow-motion effects, using depth estimation to handle objects at different distances cleanly.
DAIN (Depth-Aware video frame INterpolation) is a Python research project from a 2019 computer vision paper that creates new video frames between existing ones. When you have a video running at 30 frames per second, DAIN can generate intermediate frames to make it play at a higher frame rate, or to produce slow-motion effects.
The key difference from simpler frame interpolation approaches is that DAIN accounts for depth. Video frames contain objects at different distances from the camera, and when a closer object passes in front of a farther one, simpler methods can produce blurry or incorrect blends. DAIN estimates how far each part of the scene is from the camera and uses that information to decide which pixels belong where, giving it an advantage on standard benchmark tests.
To run it, you need a Linux system with an NVIDIA GPU, Python 3.6, PyTorch 1.0, and specific versions of CUDA and the GCC compiler. Setup involves cloning the repository and compiling several C and CUDA extension files from source. Pre-trained model weights are available to download so you do not need to train from scratch. A Google Colab notebook is also included for testing without a local GPU setup.
The project supports slow-motion video generation, testing against benchmarks like Middlebury and UCF101, and training new models on custom data. The authors reported state-of-the-art results on the Middlebury benchmark at the time of publication in 2019.
This is academic research code, written for other researchers familiar with Python deep learning tools and GPU compute environments.
Where it fits
- Convert a 30 fps video to a higher frame rate by generating intermediate frames with depth-aware interpolation
- Generate slow-motion video from a normal-speed clip without recording in high frame rate
- Test the DAIN model against the Middlebury or UCF101 frame interpolation benchmarks