BSD 2-Clause "Simplified" License

项目介绍

yjxiong/tsn-pytorch 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 BSD 2-Clause "Simplified" License 许可证,目前获得 1.1k 个 Star、298 次 Fork。

仓库全名
yjxiong/tsn-pytorch
开源许可证
BSD 2-Clause "Simplified" License
Star 数
1.1k
Fork 数
298
未关闭 Issue
44

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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

tsn-pytorch 用什么语言开发?

主要使用 Python 编写,采用 BSD 2-Clause "Simplified" License 许可证,目前有 1.1k 个 Star。

tsn-pytorch 可以免费商用吗?

仓库采用 BSD 2-Clause "Simplified" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 tsn-pytorch 的源码?

可以直接克隆仓库:git clone https://github.com/yjxiong/tsn-pytorch.git,默认分支为 master;安装与运行步骤见仓库 README。

tsn-pytorch 最近还在维护吗?

仓库最近一次更新为 2019年6月22日,当前有 44 个未关闭 Issue;Star 数为 1.1k,可作为社区活跃度的参考。

简要分析

热度分
1696
价值分
735
活跃状态
活跃

语言占比

Python

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_

评论

暂无评论