百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

video-caption.pytorch

> 开发工具
开源

视频标题生成的 pytorch 实现

400 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

视频标题生成的 pytorch 实现

pytorch implementation of video captioning

recommend installing pytorch and python packages using Anaconda

requirements

  • cuda
  • pytorch 0.4.0
  • python3
  • ffmpeg (can install using anaconda)

python packages

  • tqdm
  • pillow
  • pretrainedmodels
  • nltk

Data

MSR-VTT. Test video doesn't have captions, so I spilit train-viedo to train/val/test. Extract and put them in ./data/ directory

  • train-video: download link
  • test-video: download link
  • json info of train-video: download link
  • json info of test-video: download link

Options

all default options are defined in opt.py or corresponding code file, change them for your like.

Acknowledgements

Some code refers to ImageCaptioning.pytorch

Usage

(Optional) c3d features

you can use video-classification-3d-cnn-pytorch to extract features from video.

Steps

  1. preprocess videos and labels
bash
python prepro_feats.py --output_dir data/feats/resnet152 --model resnet152 --n_frame_steps 40  --gpu 4,5

python prepro_vocab.py
  1. Training a model
bash

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 4096
  1. test

    opt_info.json will be in same directory as saved model.

bash
python eval.py --recover_opt data/save/opt_info.json --saved_model data/save/model_1000.pth --batch_size 100 --gpu 1

TODO

  • lstm
  • beam search
  • reinforcement learning
  • dataparallel (broken in pytorch 0.4)

Acknowledgements

Some code refers to ImageCaptioning.pytorch

Issues· 25 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythondeep-learningpytorchvideo-captioning

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具