This toolkit is a python implementation for read, write, calculate, and visualize KITTI 2012 Optical Flow, which contains 200 training and 200 test image pairs each. Ground truth has been aquired by accumulating 3D point clouds from a 360 degree Velodyne HDL-64 Laserscanner according to Andreas Geiger [].
=================
- lib/kittitool.py : toolkit for KITTI optical flow dataset
- demo.py : demonstration on read and visualize KITTI optical flow data
- lib/flowlib.py : library for manipulate optical flow ...
- Python2.7
- Numpy and Scipy
- Matplotlib
- pypng package
You may want to get started on a Unix environment such as Ubuntu, or Linux OS, and use pip to manage python package installation. pip installation guide Briefly for Linux user:
python get-pip.py
sudo pip install scipy
sudo pip install numpy
pip install matplotlib
sudo pip install pypng
python demo.py
In your terminal, locate the root directory of this repository, type the following
cd scripts/
python plot_loss.py <YOUR TRAINING LOG FILE>
The plot will be saved with the same name of your logfile in .png format.
This program crops the original image data set into small patches specified by the input, by default the size is 384x512 (px). Please make sure that your input image is larger than the patches you want to get. The cropping distribution is uniform across the entire image.
python random_crop.py <name_of_dataset> <number_of_patches> --height <height_of_output_patch> --width <width_of_output_patch>
The patches will be generated at folder and the following files will be generated for CNN training:
- flo_list.txt
- img1_list.txt
- img2_list.txt
This program create three file lists that containing all the paths of the images/flow files from a dataset. The output of this program will be one single file "filelist.txt" that contains the file path you want to search in the dataset.
python create_filelist.py <file_format> --input_dir <path_of_dataset> --output_dir <output_path>
This program crops the image files and flow files from a dataset at a specific location.
python crop_flow.py <input_dir> <output_dir> <x> <y> <height_of_patch> <width_of_patch> --image_format <format_of_image> --flow_format <format_of_flow>
This script segment the flow into 9 classes according to the flow orientation. Each 45 degree will be recognized into one class starting from 0 degree on x axis.
python segment_flow.py <format_of_flowfile> <input_directory> --output_dir <output_directory>