Volver al ranking

yjxiong/tsn-pytorch

Python

Temporal Segment Networks (TSN) in PyTorch

action-recognitiondeep-learningvideo-understandingpytorchtemporal-segment-networks
Crecimiento de estrellas
Estrellas
1.1k
Forks
304
Crecimiento semanal
Issues
44
5001k
ago 2017jul 2020jul 2023jul 2026
ArtefactosPyPIpip install tsn-pytorch
README

TSN-Pytorch

We have released MMAction, a full-fledged action understanding toolbox based on PyTorch. It includes implementation for TSN as well as other STOA frameworks for various tasks. The lessons we learned in this repo are incorporated into MMAction to make it bettter. We highly recommend you switch to it. This repo will remain here for historical references.

Note: always use git clone --recursive https://github.com/yjxiong/tsn-pytorch to clone this project. Otherwise you will not be able to use the inception series CNN archs.

This is a reimplementation of temporal segment networks (TSN) in PyTorch. All settings are kept identical to the original caffe implementation.

For optical flow extraction and video list generation, you still need to use the original TSN codebase.

Training

To train a new model, use the main.py script.

The command to reproduce the original TSN experiments of RGB modality on UCF101 can be

python main.py ucf101 RGB <ucf101_rgb_train_list> <ucf101_rgb_val_list> \
   --arch BNInception --num_segments 3 \
   --gd 20 --lr 0.001 --lr_steps 30 60 --epochs 80 \
   -b 128 -j 8 --dropout 0.8 \
   --snapshot_pref ucf101_bninception_ 

For flow models:

python main.py ucf101 Flow <ucf101_flow_train_list> <ucf101_flow_val_list> \
   --arch BNInception --num_segments 3 \
   --gd 20 --lr 0.001 --lr_steps 190 300 --epochs 340 \
   -b 128 -j 8 --dropout 0.7 \
   --snapshot_pref ucf101_bninception_ --flow_pref flow_  

For RGB-diff models:

python main.py ucf101 RGBDiff <ucf101_rgb_train_list> <ucf101_rgb_val_list> \
   --arch BNInception --num_segments 7 \
   --gd 40 --lr 0.001 --lr_steps 80 160 --epochs 180 \
   -b 128 -j 8 --dropout 0.8 \
   --snapshot_pref ucf101_bninception_ 

Testing

After training, there will checkpoints saved by pytorch, for example ucf101_bninception_rgb_checkpoint.pth.

Use the following command to test its performance in the standard TSN testing protocol:

python test_models.py ucf101 RGB <ucf101_rgb_val_list> ucf101_bninception_rgb_checkpoint.pth \
   --arch BNInception --save_scores <score_file_name>

Or for flow models:

python test_models.py ucf101 Flow <ucf101_rgb_val_list> ucf101_bninception_flow_checkpoint.pth \
   --arch BNInception --save_scores <score_file_name> --flow_pref flow_
Repositorios relacionados
dmlc/gluon-cv

Gluon CV Toolkit

PythonPyPIApache License 2.0deep-learningcomputer-vision
gluon-cv.mxnet.io
5.9k1.2k
open-mmlab/mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark

PythonPyPIApache License 2.0action-recognitiontemporal-action-localization
mmaction2.readthedocs.io
5.1k1.4k
kenshohara/3D-ResNets-PyTorch

3D ResNets for Action Recognition (CVPR 2018)

PythonPyPIMIT Licensedeep-learningcomputer-vision
4k926
jinwchoi/awesome-action-recognition

A curated list of action recognition and related area resources

awesome-listawesome
4k718
open-mmlab/mmskeleton

A OpenMMLAB toolbox for human pose estimation, skeleton-based action recognition, and action synthesis.

PythonPyPIApache License 2.0action-recognitiondeep-learning
3.1k1.1k
ailia-ai/ailia-models

The collection of pre-trained, state-of-the-art AI models for ailia SDK

PythonPyPIdeep-learningface-recognition
2.4k361
OpenGVLab/InternVideo

[ECCV2024] Video Foundation Models & Data for Multimodal Understanding

PythonPyPIApache License 2.0foundation-modelsvideo-understanding
2.3k157
extreme-assistant/ICCV2023-Paper-Code-Interpretation

ICCV2021/2019/2017 论文/代码/解读/直播合集,极市团队整理

machine-learningcomputer-vision
bbs.cvmart.net
2.3k1.4k
axinc-ai/ailia-models

The collection of pre-trained, state-of-the-art AI models for ailia SDK

PythonPyPIdeep-learningface-recognition
2.1k340
open-mmlab/mmaction

An open-source toolbox for action understanding based on PyTorch

PythonPyPIApache License 2.0action-recognitionaction-detection
open-mmlab.github.io
1.9k347
MCG-NJU/VideoMAE

[NeurIPS 2022 Spotlight] VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training

PythonPyPIOtherself-supervised-learningaction-recognition
arxiv.org/abs/2203.12602
1.8k170
PaddlePaddle/PaddleVideo

Awesome video understanding toolkits based on PaddlePaddle. It supports video data annotation tools, lightweight RGB and skeleton based action recognition model, practical applications for video tagging and sport action detection.

PythonPyPIApache License 2.0video-recognitiontsm
1.7k387