/awesome-video-feature-extractor

Video feature extractor in PyTorch.

Primary LanguagePythonApache License 2.0Apache-2.0

awesome-video-feature-extractor

python-image pytorch-image lic-image

Video feature extracor for your own datasets.

Environment

  • Ubuntu 16.04
  • CUDA 9.0
  • cuDNN 7.5.1
  • Python 3.x

Usage

Video DownLoad (optional)

Download videos from urls and put them in to a directory, such as:

python3 ./tools/video_download.py ./datasets/video_urls \
    --video-dir ./datasets/video \
    --video-type 'mp4' \
    --threads 8 \

Video CutFrame (optional)

Extract frames from video. Such as extract 1 frames per second and using 8 threads:

python3 ./tools/video2frame.py ./datasets/video_list \
    --frame-dir ./datasets/frame \
    --fps 1 \
    --threads 8

Extract Features

Extract features from videos, such as:

python3 main.py \
    --video-dpath ./datasets/video \
    --model resnet50 \
    --batch-size 32 \
    --save-dir ./datasets/feature

References