The GIF is pretty large, might take a minute to load here on Github. Give it a few. You can also check out the video in the images folder (clip.mp4)
Was just scrolling through PyTorch docs and stumbled upon optical flow, figured I should try it out.
Video used is from blender see acknowledgements below
To set up your python environment to run the code in this repository, follow the instructions below.
-
Create (and activate) a new environment with Python 3.10.6.
- Linux or Mac:
conda create --name flow python=3.10.6 source activate flow
- Windows:
conda create --name flow python=3.10.6 activate flow
-
Clone the repository (if you haven't already!), and navigate to the
flow/
folder. Then, install several dependencies.
git clone https://github.com/mrdvince/flow.git
cd flow
pip install -r requirements.txt
- Run the thing
Incase your run out of memory try setting
to
a smaller number,
i.e e.g to=30 generates up to the 30th second of the clip
python flow.py --video <video source> --to <time in seconds you want the video to stop at>
Do note, running this on cuda will be much faster and using the M1 gpu doesn't work currently due to missing ops.