OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Video Dataset Loading Pytorch

Video Dataset Loading Pytorch is a Python library providing VideoFrameDataset, a PyTorch Dataset implementation that loads labelled video clips from RGB frames stored as image files.

Independent OpenViST project profile, based on linked sources.

Video Dataset Loading Pytorch — Frame-based video datasets with one folder per video and text annotations
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when video data is stored as indexed RGB image frames and you want a PyTorch Dataset that samples clips for a DataLoader workflow.

Who it is for

  • PyTorch developers preparing video data for deep-learning training loops.
  • Action-recognition practitioners who need a frame-based video input pipeline.

Documented uses

  • Load labelled clips from a directory of extracted RGB frames.
  • Sample frames across videos of differing lengths and batch them with PyTorch DataLoader.
  • Apply supported Torchvision video-data augmentation in a training input workflow.
Before you choose

Requirements & limits

The repository is public and licensed under BSD-2-Clause.

  • Input videos must already be represented as RGB image frames in the expected folder structure.
  • Annotations must record each clip’s relative path, start and end frames, and class index.
  • Requirements listed by the project are Python 3.6+, PyTorch 1.7.0+ and Torchvision 0.8.0+.
  • The library’s core is the VideoFrameDataset class; PyTorch DataLoader is used alongside it for batching.

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

Prepare a custom frame-based dataset

Arrange RGB video frames and annotations in the format VideoFrameDataset expects.

Before you start

  • Python 3.6 or later, PyTorch 1.7.0 or later, and Torchvision 0.8.0 or later.
  • RGB video frames saved as consecutively indexed image files, with each video in its own folder under a dataset root.
  • Separate text annotation files for training, validation and testing.

Steps

  1. Place each video’s RGB image frames in its own folder beneath a root directory, using a consistent consecutive filename pattern.

  2. Create an annotation file with one space-separated row per clip: VIDEO_PATH START_FRAME END_FRAME CLASS_INDEX. Give VIDEO_PATH relative to the root.

  3. Create separate annotation files for the training, validation and testing datasets.

  4. Pass the root path, annotation file path and frame filename template when setting up VideoFrameDataset.

Expected outcome

A custom dataset arranged for VideoFrameDataset to load labelled video clips.

Guide limitations

  • The documented custom-dataset format describes one class label per sample; multi-label datasets require the repository’s separate guidance.
  • This guide covers dataset preparation and configuration, not a complete training run.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 November 2026
Original website title
RaivoKoot/Video-Dataset-Loading-Pytorch · Official homepage title · retained in its source language