self-supervised-depth-completion icon indicating copy to clipboard operation
self-supervised-depth-completion copied to clipboard

Added generator for downsampled LIDAR

Open guivenca opened this issue 3 years ago • 1 comments

Adapted the original code used for the paper into the current repository structure after some cleanup and reorganization, while preserving mathematical operations.

The main new functionalities are in the folder "reduce", so there shouldn't be any breaking changes. You can create the downsampled LIDAR images via the command "python reduce/generate.py" after re-downloading the dataset (as more information is saved). For each velodyne bin file, it tries to generate downsampled LIDAR images based on the full resolution one, thus in timestamps when that information is not available (e.g. the first 5 or so timestamps) the process skips to the next file with the message "skip: no d". A single calibration file is used in line with the rest of the code

For documentation purposes, let me describe the procedure. The identification of lines is done based on the raw velodyne file, as lines are stored sequentially. After discarding some of the lines based on the donwsampling factor, the measurements are projected into the camera frame. As the exact code used by the dataset authors is not available, some small discrepancies would occur and thus the codes uses values from the corresponding pixel (or one very close to it) of the original LIDAR image

Since it was necessary to modify the download scripts, I took the liberty of merging them into a single file in order avoid repeated code. Now, the letter "t" identifies sequences used for "training", while "v" is used for "validation". Two new folders are kept: "data_oxts" and "data_velo"

An additional dependency is introduced as Pykitti is used to read some of the files. As a side note, it seems that OpenCV is listed as an optional dependency, but it's imported as part of dataloader/kitti_dataloader.py

I've tested it on Windows with Cygwin and Python 3.8.3 for a few sequences. Would appreciate feedback from other situations.

If the changes are approved, it would be reasonable to update the README file too

guivenca avatar Sep 01 '20 04:09 guivenca

Thanks @guivenca ! The MR looks great to me, except for two minor comments:

  1. The name "reduce" is a bit vague - can we change it to something along the line of "lidar_downsampling" to make it more explicit?
  2. Can we add a README file under the new folder to include your instructions?

fangchangma avatar Sep 01 '20 04:09 fangchangma