Skip to content

tomrunia/PyTorchConv3D

Repository files navigation

3D ConvNets in PyTorch

This repository contains PyTorch models of I3D and 3D-ResNets based on the following repositories:

Models: I3D, 3D-ResNet, 3D-DenseNet, 3D-ResNeXt
Datasets: UCF-101, Kinetics, ActivityNet, Charades

Installation

Clone and install:

git clone https://github.com/tomrunia/PyTorchConv3D.git
cd PyTorchConv3D
pip install -r requirements.txt
python setup.py install

Requirements

  • Python 2.7 or 3.5+ (developed with 3.7)
  • Numpy (developed with 1.15.0)
  • PyTorch >= 0.4.0
  • TensorboardX (optional)
  • PIL (optional)

Examples

Training ResNet-34 from scratch on UCF-101

python train.py --dataset=ucf101 --model=resnet --video_path=/home/tomrunia/data/UCF-101/jpg --annotation_path=/home/tomrunia/data/UCF-101/ucfTrainTestlist/ucf101_01.json --batch_size=64 --num_classes=101 --momentum=0.9 --weight_decay=1e-3 --model_depth=34 --resnet_shortcut=A --spatial_size=112 --sample_duration=16 --optimizer=SGD --learning_rate=0.01

References