All Projects → BannyStone → Video_classification_pytorch

BannyStone / Video_classification_pytorch

Video Classification based on PyTorch

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Video classification pytorch

Mmaction2
OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
Stars: ✭ 684 (+668.54%)
Mutual labels:  action-recognition
Chinesetrafficpolicepose
Detects Chinese traffic police commanding poses 检测中国交警指挥手势
Stars: ✭ 49 (-44.94%)
Mutual labels:  action-recognition
Tdn
[CVPR 2021] TDN: Temporal Difference Networks for Efficient Action Recognition
Stars: ✭ 72 (-19.1%)
Mutual labels:  action-recognition
Action recognition tf
Action recognition.基于C3D的视频动作识别
Stars: ✭ 16 (-82.02%)
Mutual labels:  action-recognition
Action Recognition Using 3d Resnet
Use 3D ResNet to extract features of UCF101 and HMDB51 and then classify them.
Stars: ✭ 32 (-64.04%)
Mutual labels:  action-recognition
Training toolbox caffe
Training Toolbox for Caffe
Stars: ✭ 51 (-42.7%)
Mutual labels:  action-recognition
Video Classification
Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
Stars: ✭ 543 (+510.11%)
Mutual labels:  action-recognition
Vidvrd Helper
To keep updates with VRU Grand Challenge, please use https://github.com/NExTplusplus/VidVRD-helper
Stars: ✭ 81 (-8.99%)
Mutual labels:  action-recognition
Okutama Action
Okutama-Action: An Aerial View Video Dataset for Concurrent Human Action Detection
Stars: ✭ 36 (-59.55%)
Mutual labels:  action-recognition
Hake Action
As a part of the HAKE project, includes the reproduced SOTA models and the corresponding HAKE-enhanced versions (CVPR2020).
Stars: ✭ 72 (-19.1%)
Mutual labels:  action-recognition
Hcn Prototypeloss Pytorch
Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning (PyTorch)
Stars: ✭ 17 (-80.9%)
Mutual labels:  action-recognition
Video Classification 3d Cnn Pytorch
Video classification tools using 3D ResNet
Stars: ✭ 874 (+882.02%)
Mutual labels:  action-recognition
Fight detection
Real time Fight Detection Based on 2D Pose Estimation and RNN Action Recognition
Stars: ✭ 65 (-26.97%)
Mutual labels:  action-recognition
Two Stream Action Recognition
Using two stream architecture to implement a classic action recognition method on UCF101 dataset
Stars: ✭ 705 (+692.13%)
Mutual labels:  action-recognition
Daps
This repo allocate DAPs code of our ECCV 2016 publication
Stars: ✭ 74 (-16.85%)
Mutual labels:  action-recognition
Action Detection
temporal action detection with SSN
Stars: ✭ 597 (+570.79%)
Mutual labels:  action-recognition
Resgcnv1
ResGCN: an efficient baseline for skeleton-based human action recognition.
Stars: ✭ 50 (-43.82%)
Mutual labels:  action-recognition
M Pact
A one stop shop for all of your activity recognition needs.
Stars: ✭ 85 (-4.49%)
Mutual labels:  action-recognition
Hake Action Torch
HAKE-Action in PyTorch
Stars: ✭ 74 (-16.85%)
Mutual labels:  action-recognition
Epic Kitchens 55 Action Models
EPIC-KITCHENS-55 baselines for Action Recognition
Stars: ✭ 68 (-23.6%)
Mutual labels:  action-recognition

Video-Classification-Pytorch

Still in development.

This is a repository containing 3D models and 2D models for video classification. The code is based on PyTorch 1.0. Until now, it supports the following datasets: Kinetics-400, Mini-Kinetics-200, UCF101, HMDB51

Results

Kinetics-400

We report the baselines with ResNet-50 backbone on Kinetics-400 validation set as below (all models are trained on training set). All the models are trained in one single server with 8 GTX 1080 Ti GPUs.

network pretrain data spatial resolution input frames sampling stride backbone top1 top5
ResNet50-SlowOnly ImageNet-1K 224x224 8 8 ResNet50 73.77 91.17

Get the Code

git clone --recursive https://github.com/BannyStone/Video_Classification_PyTorch.git

Preparing Dataset

Kinetics-400

cd data/kinetics400
mkdir access && cd access
ln -s $YOUR_KINETICS400_DATASET_TRAIN_DIR$ RGB_train
ln -s $YOUR_KINETICS400_DATASET_VAL_DIR$ RGB_val

Note that:

  • The reported models are trained with the Kinetics data provided by Xiaolong Wang.https://github.com/facebookresearch/video-nonlocal-net/blob/master/DATASET.md
  • In train and validation lists for all datasets, each line represents one video where the first element is the video frame directory, the second element is the number of frames and the third element is the index of class. Please prepare your own list accordingly because different video parsing method may lead to different frame numbers. We show part of Kinetics-400 train list as an example:
RGB_train/D32_1gwq35E 300 66
RGB_train/-G-5CJ0JkKY 250 254
RGB_train/4uZ27ivBl00 300 341
RGB_train/pZP-dHUuGiA 240 369
  • This code can read the image files in each video frame folder according to the image template argument image_tmpl, such as image_{:06d}.jpg.

Training

Execute training script:

./scripts/kinetics400_3d_res50_slowonly_im_pre.sh

We show script kinetics400_3d_res50_slowonly_im_pre.sh here:

python main.py \
kinetics400 \
data/kinetics400/kinetics_train_list_xlw \
data/kinetics400/kinetics_val_list_xlw \
--arch resnet50_3d_slowonly \
--dro 0.5 \
--mode 3D \
--t_length 8 \
--t_stride 8 \
--pretrained \
--epochs 110 \
--batch-size 96 \
--lr 0.02 \
--wd 0.0001 \
--lr_steps 50 80 100 \
--workers 16 \

Testing

python ./test_kaiming.py \
kinetics400 \
data/kinetics400/kinetics_val_list_xlw \
output/kinetics400_resnet50_3d_slowonly_3D_length8_stride8_dropout0.5/model_best.pth \
--arch resnet50_3d_slowonly \
--mode TSN+3D \
--batch_size 1 \
--num_segments 10 \
--input_size 256 \
--t_length 8 \
--t_stride 8 \
--dropout 0.5 \
--workers 12 \
--image_tmpl image_{:06d}.jpg \

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].