Practical overview
When it fits
Use it when you want a code-based workflow for training a video-captioning model on prepared data or evaluating a saved checkpoint, rather than a hosted captioning tool.
Who it is for
- Researchers and developers building or studying video-captioning models.
- PyTorch users who can prepare video and caption datasets and work with a CUDA-based command-line workflow.
Documented uses
- Preprocess videos into ResNet152 features and build a vocabulary.
- Train an S2VT attention video-captioning model.
- Evaluate a saved model checkpoint on a test split.
- Optionally supply C3D features as an additional model input.
Requirements & limits
The repository is public and lists an MIT license. The README documents a self-hosted environment requiring CUDA, Python 3, PyTorch 0.4.0 and FFmpeg.
- The documented stack is specifically CUDA and PyTorch 0.4.0, with Python 3 and FFmpeg.
- The README provides example commands and says defaults can be changed in opt.py or corresponding code files.
- C3D features are optional, but the README does not give a complete extraction workflow.
- The README identifies beam search and data parallelism as TODO or broken in the stated PyTorch version.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Preprocess features and vocabulary for video captioning
Prepare video features and vocabulary before model training.
Before you start
- Python 3, CUDA, PyTorch 0.4.0 and FFmpeg.
- Install tqdm, Pillow, pretrainedmodels and nltk.
- Place the prepared videos and labels in the project's ./data/ directory.
Steps
Run the command below.
python prepro_feats.py --output_dir data/feats/resnet152 --model resnet152 --n_frame_steps 40 --gpu 4,5Run the command below.
python prepro_vocab.py
Expected outcome
The README's preprocessing stage creates ResNet152 video features and vocabulary for the subsequent training stage.
Guide limitations
- The example GPU selections and frame-step value are shown as command arguments; adjust options in opt.py or corresponding code files as needed.
Train the S2VT attention model
Train a video-captioning model using prepared ResNet152 features.
Before you start
- Complete video and label preprocessing and vocabulary preparation.
- Use the documented CUDA, Python 3, PyTorch 0.4.0, FFmpeg and Python package requirements.
Steps
Run the README's example command: the command below.
python train.py --gpu 0 --epochs 3001 --batch_size 300 --checkpoint_path data/save --feats_dir data/feats/resnet152 --model S2VTAttModel --with_c3d 1 --c3d_feats_dir data/feats/c3d_feats --dim_vid 4096For the example's C3D input, provide C3D features in the configured directory; the README describes C3D features as optional and points to a separate extraction project.
Expected outcome
The example configures training of S2VTAttModel and saves model artifacts under data/save.
Guide limitations
- The command is an example with specific GPU, epoch and batch-size settings, not a compatibility or successful-run guarantee.
- The README does not provide a complete C3D feature extraction procedure.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 November 2026
- Original website title
- xiadingZ/video-caption.pytorch · Official homepage title · retained in its source language

