Transfer optical flow from one video to an image.
You’ll need a working installation of Python 3, and FFmpeg. Make sure they are in PATH.
Download or clone this repository:
git clone https://github.com/ychalier/datamoshing.git
cd datamoshing/optical-flow-transfer/
Install the requirements:
pip -m install requirements.txt
Simply execute the main script:
python optical_flow_transfer.py <source-video> <source-image> <output-video>
I wrote some details on my blog.
Here is a web demonstration where you may try different video sources (such as the webcam) and image sources to perform optical flow transfer.