Demo of Corner Detection Model

This Python script allows you to visualize or evaluate a checkpoint (that can be obtained with train_corner_detection.py script) on event-based data (RAW, DAT or HDF5 file).

The code is based on this paper and both (the paper and the code) focus on detection of corner. At the moment the tracking part is kept very simple to evaluate/compare the accuracy of different detectors.

If you are targeting a specific application like odometry, you can implement some state of the art tracking for event based (e.g see here ) and combine it with our detector.

Expected Output

Corner detection demo:

  • a video of the events with detected corners

  • corners can be tracked or not

  • a CSV file containing corner locations in time and space with a tracking id

Setup & requirements

To run the script, you need:

  • path to the checkpoint. You can use:

    • a .ckpt file obtained with train_corner_detection.py

    • the pre-trained PyTorch model corner_detection_10_heatmaps.ckpt from our pre-trained models)

  • path to .dat file to evaluate

  • path to the output video

How to start

To run the script:

python demo_corner_detection.py /path/to/events.dat /path/to/checkpoint.ckpt --video-path /path/to/output_video.avi

To find the full list of options, run:

python demo_corner_detection.py -h

Note

This sample comes with an extra file eval_corner_detection.py which is a preprocessing script to be run on the Atis Corner Dataset preceding the script compute_homography_reprojection_error.py (part of corner_detection module). It will create CSV files of corner positions which can later be evaluated.