https://github.com/commaai/speedchallenge
-
all the following methods use a cropped ROI instead of the whole image
-
use two consecutive frames (concatenated) as input of a CNN, do regression, MSE converge at ~30 (network too simple/not enough iteration)
-
use two consecutive frames to calculate dense optical flow first, then use the flow image as input to a CNN, do regression, MSE converge at 15~20 (dense optical flow seems noisy)
-
choose a trapezoidal ROI and map it to rectangle using perspective transform, then use simple sliding window method to calculate the displacement between frames, then fit this disp to velocity, best training MSE ~6.3 with smoothing
-
replace sliding window method in 3) with SURF feature matching to calculate displacement of consecutive frames, then do linear fitting, best training MSE ~3.3 with smoothing
-
(future work) use the warped trapezoidal ROI for dense optical flow calculation (hopefully less noisy) and do regression using a CNN
- make sure train.mp4 and test.mp4 are in ./data/
- cd ./v_by_surf/
- python map_roi.py
- python velocity_by_surf.py to obtain pixelwise displacement (disp)
- postprocess (smoothing) and fit in matlab, with v=disp*0.9915+0.9294 (coefficients calculated from training set)