All Projects → yjxiong → dense_flow

yjxiong / dense_flow

Licence: MIT license
Tools to extract dense optical flow from videos, based on OpenCV

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
matlab
3953 projects
CMake
9771 projects

Please Note: This repository is no longer maintained. For extracting optical flow from videos please use this latest tool from Open-MMLAB.

Extracting dense flow field given a video.

Dependencies:

  • LibZip: to install on ubuntu apt-get install libzip-dev on mac brew install libzip

For OpenCV 3 Users

Please see the opencv-3.1 branch. Many thanks to @victorhcm for the contributions!

Install

git clone --recursive http://github.com/yjxiong/dense_flow
mkdir build && cd build
cmake .. && make -j

Usage

./extract_gpu -f=test.avi -x=tmp/flow_x -y=tmp/flow_y -i=tmp/image -b=20 -t=1 -d=0 -s=1 -o=dir
  • test.avi: input video
  • tmp: folder containing RGB images and optical flow images
  • dir: output generated images to folder. if set to zip, will write images to zip files instead.

Warp Flow

The warp optical flow is used in the following paper

@inproceedings{TSN2016ECCV,
  author    = {Limin Wang and
               Yuanjun Xiong and
               Zhe Wang and
               Yu Qiao and
               Dahua Lin and
               Xiaoou Tang and
               Luc {Van Gool}},
  title     = {Temporal Segment Networks: Towards Good Practices for Deep Action Recognition},
  booktitle   = {ECCV},
  year      = {2016},
}

To extract warp flow, use the command

./extract_warp_gpu -f test.avi -x tmp/flow_x -y tmp/flow_y -i tmp/image -b 20 -t 1 -d 0 -s 1 -o dir
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].