A playground to test sequences from the kitti dataset http://www.cvlibs.net/datasets/kitti/
Download the tracking training sequences and labels from the kitti website or download a sample sequence from my google drive link. Note that Google Drive sometimes exhibits file preview issues, so do not download frames individually. Download the whole directory instead. If you want Mask-RCNN detections and masks you can download the compressed pickle results here
- Opencv
- matplotlib
- numpy
- glob
- ntpath
- pickle
- gzip
virtualenv --system-site-packages kitti-env
source kitti-env/bin/activate
pip install -r requirements.txt
Add flag --system-site-packages
to use TKinter
for matplotlib.plot
Run kitti_playground.py to see an example code
usage: kitti_playground.py [-h] labels_path images_path video_id
positional arguments:
labels_path Directory containing the labels, e.g. label_02/
images_path Directory containing the images, e.g. image_02/
video_id Video ID, e.g. 0000
optional arguments:
-h, --help show this help message and exit
Change video_id to match the names of the videos (0000, 0001, 0002, ...)
gen is a generator to obtain relevant data about each frame in the sequence. You can use loop=True to loop indefinitely over the video. You can pass to data_from_generator the types you want the generator to yield. Available types:
- 'img' -> the BGR frame
- 'annot' -> the ground truth data
- 'dets' -> Mask-RCNN detections
- 'masks' -> segmentation masks from Mask-RCNN
- 'feats' -> Mask-RCNN fc7 features for each detection box