Code and supplementary material for the paper "Robust Road Surface Normal and Pitch Estimation via IMU-Camera Fusion".
Project website: https://norbertmarko.github.io/ground-normal-prediction/
The commands below are Linux-based. To run the code, you can either use WSL2 with Ubuntu 22.04 or native Ubuntu (tested with 22.04).
Clone project (with submodules):
git clone --recurse-submodules https://github.com/norbertmarko/ground-normal-predictioncd ground-normal-predictiongit submodule update --init --recursiveCreate environment (you need miniconda for this).
Create conda environment and install dependencies:
cd ground-normal-predictionconda env create -f environment.yamlActivate conda environment (every new console used):
conda activate ground-normal-predictionInstall pandaset-devkit in the environment.
cd src/_ref/pandaset_devkitActivate your conda environment (this is where we pip install the devkit)
conda activate ground-normal-predictioncd into pandaset_devkit/python (assuming you are already in pandaset_devkit)
cd pythonInstall the devkit
pip install .You can find the example data on the following link.
- Download
PandaSet.zipfrom the link above and uncompress the data. - Modify the
data_rootvariable in thesrc/configs/paths/paths_panda.yamlfile in the repository. It should point to the uncompressedPandaSetdirectory. For example:"/media/norbert/T7/PandaSet" - Download the generated ground truth (
gt_panda.zip) from the link above and uncompress the data. - Put the uncompressed ground truth folder into the
resultsdirectory in the repository root.
💡 Before running any of the scripts, go into the repository root, and activate the conda environment as described above.
You can find the generated results in the results directory in the repository root (the sub-folder names should match the script names closely).
To run the algorithm described in the paper, use the main script:
python src/run_exp_hg_panda_ts.pyYou can also run the SOTA method, using the following python script:
python src/run_ref_gnf_panda.pyRun the evaluation script, after you ran both our method and the SOTA method for a certain sequence (default: 039):
python src/eval/eval.py- (optional) To avoid the following error:
[matplotlib.font_manager][WARNING] - findfont: Font family 'Arial' not found.Run the following command (move with the arrows and accept with enter when the license agreement appears in the console):sudo apt install ttf-mscorefonts-installer && rm -rf ~/.cache/matplotlib
- You can still see the evaluation at the top of the console without installing the fonts.
You can re-generate the ground truth (for any sequence) using the following script (set the data_root and seq_num in configs/paths/paths_panda.yaml):
python src/gt/gen_gt_normal_panda.py