OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Tsn Pytorch

Tsn Pytorch is a Python reimplementation of Temporal Segment Networks in PyTorch for training and testing video action-recognition models. It supports RGB, optical-flow and RGB-difference inputs and includes example UCF101 workflows.

Independent OpenViST project profile, based on linked sources.

Tsn Pytorch — Reproducing the documented RGB UCF101 experiment
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when working with TSN experiments and dataset lists, particularly when you need the repository's documented UCF101 training and checkpoint-evaluation workflows.

Who it is for

  • Researchers reproducing TSN video action-recognition experiments.
  • Developers comparing RGB, optical-flow and RGB-difference model inputs.

Documented uses

  • Train TSN models from labeled video dataset lists.
  • Evaluate saved checkpoints using the standard TSN testing protocol.
  • Experiment with three documented input modalities.
Before you choose

Requirements & limits

  • Training examples use main.py; checkpoint evaluation uses test_models.py.
  • Optical-flow extraction and video-list generation require the original TSN codebase.
  • A recursive clone is needed for the inception-series architectures.
  • The maintainers characterize this repository as historical and recommend MMAction as its successor.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and test an RGB TSN model on UCF101

Follow the documented RGB example to train a TSN model and evaluate its saved checkpoint.

Before you start

  • A recursive clone of the repository.
  • UCF101 RGB training and validation lists.
  • The repository's Python and PyTorch environment.

Steps

  1. Clone the repository with its submodules using the command below.

    Documented command
    git clone --recursive https://github.com/yjxiong/tsn-pytorch
  2. Run the README's main.py UCF101 RGB training command with the dataset train and validation lists and the documented BNInception settings.

  3. Use test_models.py with the RGB validation list and the resulting checkpoint to evaluate it using the standard TSN testing protocol.

Expected outcome

A trained RGB TSN checkpoint and a standard-protocol evaluation whose scores can be saved to a file.

Guide limitations

  • The documented command is an example configured for UCF101 and BNInception.
  • Recursive cloning is required for inception-series architectures.
Source-based practical guide

Train and test an optical-flow TSN model

Use the documented flow-model workflow to train and evaluate a TSN checkpoint.

Before you start

  • A recursive clone of the repository.
  • Optical-flow data and UCF101 flow train and validation lists.
  • Optical-flow extraction and video-list generation using the original TSN codebase.

Steps

  1. Prepare optical-flow data and video lists using the original TSN codebase.

  2. Run the README's main.py UCF101 Flow example with the flow train and validation lists and the documented BNInception settings.

  3. Pass the resulting checkpoint and validation list to test_models.py, using the documented flow prefix and score-file option.

Expected outcome

A trained optical-flow TSN checkpoint evaluated with the standard TSN testing protocol.

Guide limitations

  • Optical-flow extraction and video-list generation are outside this repository and require the original TSN codebase.
  • The documented training example uses UCF101 and BNInception.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
4 November 2026
Original website title
yjxiong/tsn-pytorch · Official homepage title · retained in its source language

Related options

MMAction — The maintainers recommend MMAction as the successor toolbox; they state it includes TSN and other action-understanding frameworks.