-
直接下载或者使用指令下载:
$ git clone --recursive https://github.com/milkcat0904/video-dataset-to-optical-flow.git
-
$ unzip video-dataset-to-optical-flow-master.zip
build opencv 2.4.13 和 dense_flow 环境
$ bash build_all.sh
终端输出"All tools built. Happy experimenting!" 表示build成功
$ bash scripts/extract_optical_flow.sh DATASET_PATH OUT_PATH NUMBER_OF_WORKER
DATASET_PATH : 数据集的地址
OUT_PATH :生成光流图的地址
NUMBER_OF_WORKER :工作的显卡数量,一般设置为2
- 将
tools/build_of.py
的第89行--flow_type
的默认值改为warped_tv11
:
parser.add_argument("--flow_type", type=str, default='warped_tvl1', choices=['tvl1', 'warp_tvl1'])
- $ bash scripts/extract_optical_flow.sh DATASET_PATH OUT_PATH NUMBER_OF_WORKER