Since VoV3D is based on PySlowFast, we provide a installation guide based on the INSTALL.md of PySlowFast.
X3D and our VoV3D utilize depthwise Conv3D. However, the naïve implementation of channelwise 3D convolution in the current Pytoch is very slow.
In order to accelerate GPU runtime, we have to use the following pull request(pytorch1.6).
For simplicity, we install the custom 3d depthwise pytorch (3d-depthwise) by building from source.
We recommend anaconda environment.
- CUDA 10.1 & cudnn 7.0
- torch 1.6.0a0+4a03290
- torchvision 0.6.0a0+b68adcf
conda create --name pytorch1.6dw
conda activate pytorch1.6dw
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
conda install -c pytorch magma-cuda101 # or [ magma-cuda102 | magma-cuda100 | magma-cuda92 ] depending on your cuda version
git clone https://github.com/linziyi96/pytorch.git
cd pytorch
git submodule update --init --recursive
git checkout 3d-depthwise
python setup.py install
cd
# version check
conda list # check torch version
# or
python
# >>> import torch
# >>> torch.__version__
# '1.6.0a0+4a03290'
git clone https://github.com/pytorch/vision.git
git checkout tags/v0.6.0
python setup.py install
# version check
conda list # check torchvision version
# or
python
# >>> import torchvision
# >>> torchvision.__version__
# '0.6.0a0+b68adcf'
- Python >= 3.6
- Numpy
- fvcore:
pip install 'git+https://github.com/facebookresearch/fvcore'
You can install them together at pytorch.org to make sure of this. - simplejson:
pip install simplejson
- GCC >= 4.9
- PyAV:
conda install av -c conda-forge
- ffmpeg (4.0 is prefereed, will be installed along with PyAV)
- PyYaml: (will be installed along with fvcore)
- tqdm: (will be installed along with fvcore)
- iopath:
pip install -U iopath
orconda install -c iopath iopath
- psutil:
pip install psutil
- OpenCV:
pip install opencv-python
- tensorboard:
pip install tensorboard
- moviepy: (optional, for visualizing video on tensorboard)
conda install -c conda-forge moviepy
orpip install moviepy
- Detectron2:
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
git clone https://github.com/youngwanLEE/VoV3D.git
cd VoV3D
python setup.py build develop