Pytorch Headtrip
- Work in Progress
Single Deep Dreaming and Sequence Dreaming with Optical Flow and Depth Estimation in Pytorch.
Check out my article for the setup!
@aertist made a colab notebook:
Features:
- Sequence Dreaming with Optical Flow (Farneback or SpyNet)
- Depth Estimation with MiDas
- Supports multiple Pytorch Architectures
- Dream Single Class of ImageNet, check my post here
Install
Requirements
- Python 3.7
- Pytorch 1.7
- OpenCV
- Matplotlib
pip install -r requirements.txt
Depending on your cuda version, you might get an error installing pytorch in your env.
Usage
For inference you need a config file like the basicconf in the _configs folder.
python dream.py --config configs/basic_conf.yaml
Currently, its only possible to dream on a sequence of frames from a video that are extracted beforehand with e.g. ffmpeg
- The SpyNet Code is adapted from this github repository