Self-supervised Deep LiDAR Odometry for Robotic Applications

Overview

DeLORA: Self-supervised Deep LiDAR Odometry for Robotic Applications

Overview

This is the corresponding code to the above paper ("Self-supervised Learning of LiDAR Odometry for Robotic Applications") which is published at the International Conference on Robotics and Automation (ICRA) 2021. The code is provided by the Robotics Systems Lab at ETH Zurich, Switzerland.

** Authors:** Julian Nubert ([email protected]) , Shehryar Khattak , Marco Hutter

title_img

Copyright IEEE

Python Setup

We provide a conda environment for running our code.

Conda

The conda environment is very comfortable to use in combination with PyTorch because only NVidia drivers are needed. The Installation of suitable CUDA and CUDNN libraries is all handle by Conda.

  • Install conda: link
  • To set up the conda environment run the following command:
conda env create -f conda/DeLORA-py3.9.yml

This installs an environment including GPU-enabled PyTorch, including any needed CUDA and cuDNN dependencies.

  • Activate the environment:
conda activate DeLORA-py3.9
  • Install the package to set all paths correctly:
pip3 install -e .

ROS Setup

For running ROS code in the ./src/ros_utils/ folder you need to have ROS installed (link). We recommend Ubuntu 20.04 and ROS Noetic due to its native Python3 support. For performing inference in Python2.7, convert your PyTorch model with ./scripts/convert_pytorch_models.py and run an older PyTorch version (<1.3).

ros-numpy

In any case you need to install ros-numpy if you want to make use of the provided rosnode:

sudo apt install ros-<distro>-ros-numpy

Datasets and Preprocessing

Instructions on how to use and preprocess the datasets can be found in the ./datasets/ folder. We provide scripts for doing the preprocessing for:

  1. general rosbags containing LiDAR scans,
  2. and for the KITTI dataset in its own format.

Example: KITTI Dataset

LiDAR Scans

Download the "velodyne laster data" from the official KITTI odometry evaluation ( 80GB): link. Put it to <delora_ws>/datasets/kitti, where kitti contains /data_odometry_velodyne/dataset/sequences/00..21.

Groundtruth poses

Please also download the groundtruth poses here. Make sure that the files are located at <delora_ws>/datasets/kitti, where kitti contains /data_odometry_poses/dataset/poses/00..10.txt.

Preprocessing

In the file ./config/deployment_options.yaml make sure to set datasets: ["kitti"]. Then run

preprocess_data.py

Custom Dataset

If you want to add an own dataset please add its sensor specifications to ./config/config_datasets.yaml and ./config/config_datasets_preprocessing.yaml. Information that needs to be added is the dataset name, its sequences and its sensor specifications such as vertical field of view and number of rings.

Deploy

After preprocessing, for each dataset we assume the following hierarchical structure: dataset_name/sequence/scan (see previous dataset example). Our code natively supports training and/or testing on various datasets with various sequences at the same time.

Training

Run the training with the following command:

run_training.py

The training will be executed for the dataset(s) specified in ./config/deployment_options.yaml. You will be prompted to enter a name for this training run, which will be used for reference in the MLFlow logging.

Custom Settings

For custom settings and hyper-parameters please have a look in ./config/.

By default loading from RAM is disabled. If you have enough memory, enable it in ./config/deployment_options.yaml. When loading from disk, the first few iterations are sometimes slow due to I/O, but it should accelerate quite quickly. For storing the KITTI training set entirely in memory, roughly 50GB of RAM are required.

Continuing Training

For continuing training provide the --checkpoint flag with a path to the model checkpoint to the script above.

Visualizing progress and results

For visualizing progress we use MLFlow. It allows for simple logging of parameters, metrics, images, and artifacts. Artifacts could e.g. also be whole TensorBoard logfiles. To visualize the training progress execute (from DeLORA folder):

mlflow ui 

The MLFlow can then be visualized in your browser following the link in the terminal.

Testing

Testing can be run along the line:

run_testing.py --checkpoint <path_to_checkpoint>

The checkpoint can be found in MLFlow after training. It runs testing for the dataset specified in ./config/deployment_options.yaml.

We provide an exemplary trained model in ./checkpoints/kitti_example.pth.

ROS-Node

This ROS-node takes the pretrained model at location <model_location> and performs inference; i.e. it predicts and publishes the relative transformation between incoming point cloud scans. The variable <dataset> should contain the name of the dataset in the config files, e.g. kitti, in order to load the corresponding parameters. Topic and frame names can be specified in the following way:

run_rosnode.py --checkpoint <model_location> --dataset <dataset> --lidar_topic=<name_of_lidar_topic> --lidar_frame=<name_of_lidar_frame>

The resulting odometry will be published as a nav_msgs.msg.Odometry message under the topic /delora/odometry .

Example: DARPA Dataset

For the darpa dataset this could look as follows:

run_rosnode.py --checkpoint ~/Downloads/checkpoint_epoch_0.pth --dataset darpa --lidar_topic "/sherman/lidar_points" --lidar_frame sherman/ouster_link

Comfort Functions

Additional functionalities are provided in ./bin/ and ./scripts/.

Visualization of Normals (mainly for debugging)

Located in ./bin/, see the readme-file ./dataset/README.md for more information.

Creation of Rosbags for KITTI Dataset

After starting a roscore, conversion from KITTI dataset format to a rosbag can be done using the following command:

python scripts/convert_kitti_to_rosbag.py

The point cloud scans will be contained in the topic "/velodyne_points", located in the frame velodyne. E.g. for the created rosbag, our provided rosnode can be run using the following command:

run_rosnode.py --checkpoint ~/Downloads/checkpoint_epoch_30.pth --lidar_topic "/velodyne_points" --lidar_frame "velodyne"

Convert PyTorch Model to older PyTorch Compatibility

Converion of the new model <path_to_model>/model.pth to old (compatible with < PyTorch1.3) <path_to_model>/model_py27.pth can be done with the following:

python scripts/convert_pytorch_models.py --checkpoint <path_to_model>/model

Note that there is no .pth ending in the script.

Time The Network

The execution time of the network can be timed using:

python scripts/time_network.py

Paper

Thank you for citing DeLORA (ICRA-2021) if you use any of this code.

@inproceedings{nubert2021self,
  title={Self-supervised Learning of LiDAR Odometry for Robotic Applications},
  author={Nubert, Julian and Khattak, Shehryar and Hutter, Marco},
  booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
  year={2021},
  organization={IEEE}
}

Dependencies

Dependencies are specified in ./conda/DeLORA-py3.9.yml and ./pip/requirements.txt.

Tuning

If the result does not achieve the desired performance, please have a look at the normal estimation, since the loss is usually dominated by the plane-to-plane loss, which is impacted by noisy normal estimates. For the results presented in the paper we picked some reasonable parameters without further fine-tuning, but we are convinced that less noisy normal estimates would lead to an even better convergence.

Owner
Robotic Systems Lab - Legged Robotics at ETH Zürich
The Robotic Systems Lab investigates the development of machines and their intelligence to operate in rough and challenging environments.
Robotic Systems Lab - Legged Robotics at ETH Zürich
Locally Most Powerful Bayesian Test for Out-of-Distribution Detection using Deep Generative Models

LMPBT Supplementary code for the Paper entitled ``Locally Most Powerful Bayesian Test for Out-of-Distribution Detection using Deep Generative Models"

1 Sep 29, 2022
NeurIPS workshop paper 'Counter-Strike Deathmatch with Large-Scale Behavioural Cloning'

Counter-Strike Deathmatch with Large-Scale Behavioural Cloning Tim Pearce, Jun Zhu Offline RL workshop, NeurIPS 2021 Paper: https://arxiv.org/abs/2104

Tim Pearce 169 Dec 26, 2022
Calibrate your listeners! Robust communication-based training for pragmatic speakers. Findings of EMNLP 2021.

Calibrate your listeners! Robust communication-based training for pragmatic speakers Rose E. Wang, Julia White, Jesse Mu, Noah D. Goodman Findings of

Rose E. Wang 3 Apr 02, 2022
A general python framework for single object tracking in LiDAR point clouds, based on PyTorch Lightning.

Open3DSOT A general python framework for single object tracking in LiDAR point clouds, based on PyTorch Lightning. The official code release of BAT an

Kangel Zenn 172 Dec 23, 2022
ML models and internal tensors 3D visualizer

The free Zetane Viewer is a tool to help understand and accelerate discovery in machine learning and artificial neural networks. It can be used to ope

Zetane Systems 787 Dec 30, 2022
Jingju baseline - A baseline model of our project of Beijing opera script generation

Jingju Baseline It is a baseline of our project about Beijing opera script gener

midon 1 Jan 14, 2022
Code to reproduce the results for Compositional Attention

Compositional-Attention This repository contains the official implementation for the paper Compositional Attention: Disentangling Search and Retrieval

Sarthak Mittal 58 Nov 30, 2022
Neural network for stock price prediction

neural_network_for_stock_price_prediction Neural networks for stock price predic

2 Feb 04, 2022
ElasticFace: Elastic Margin Loss for Deep Face Recognition

This is the official repository of the paper: ElasticFace: Elastic Margin Loss for Deep Face Recognition Paper on arxiv: arxiv Model Log file Pretrain

Fadi Boutros 113 Dec 14, 2022
Train Scene Graph Generation for Visual Genome and GQA in PyTorch >= 1.2 with improved zero and few-shot generalization.

Scene Graph Generation Object Detections Ground truth Scene Graph Generated Scene Graph In this visualization, woman sitting on rock is a zero-shot tr

Boris Knyazev 93 Dec 28, 2022
Industrial knn-based anomaly detection for images. Visit streamlit link to check out the demo.

Industrial KNN-based Anomaly Detection ⭐ Now has streamlit support! ⭐ Run $ streamlit run streamlit_app.py This repo aims to reproduce the results of

aventau 102 Dec 26, 2022
An introduction to bioimage analysis - http://bioimagebook.github.io

Introduction to Bioimage Analysis This book tries explain the main ideas of image analysis in a practical and engaging way. It's written primarily for

Bioimage Book 20 Nov 28, 2022
Python wrapper class for OpenVINO Model Server. User can submit inference request to OVMS with just a few lines of code

Python wrapper class for OpenVINO Model Server. User can submit inference request to OVMS with just a few lines of code.

Yasunori Shimura 7 Jul 27, 2022
Github for the conference paper GLOD-Gaussian Likelihood OOD detector

FOOD - Fast OOD Detector Pytorch implamentation of the confernce peper FOOD arxiv link. Abstract Deep neural networks (DNNs) perform well at classifyi

17 Jun 19, 2022
A tutorial on training a DarkNet YOLOv4 model for the CrowdHuman dataset

YOLOv4 CrowdHuman Tutorial This is a tutorial demonstrating how to train a YOLOv4 people detector using Darknet and the CrowdHuman dataset. Table of c

JK Jung 118 Nov 10, 2022
Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images

Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images This repository contains the implementation of the following paper

Seonggwan Ko 9 Jul 30, 2022
Automatic detection and classification of Covid severity degree in LUS (lung ultrasound) scans

Final-Project Final project in the Technion, Biomedical faculty, by Mor Ventura, Dekel Brav & Omri Magen. Subproject 1: Automatic Detection of LUS Cha

Mor Ventura 1 Dec 18, 2021
The official implementation of NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021]. https://arxiv.org/pdf/2101.12378.pdf

NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021] Release Notes The offical PyTorch implementation of NeMo, p

Angtian Wang 76 Nov 23, 2022
QAT(quantize aware training) for classification with MQBench

MQBench Quantization Aware Training with PyTorch I am using MQBench(Model Quantization Benchmark)(http://mqbench.tech/) to quantize the model for depl

Ling Zhang 29 Nov 18, 2022
This repo. is an implementation of ACFFNet, which is accepted for in Image and Vision Computing.

Attention-Guided-Contextual-Feature-Fusion-Network-for-Salient-Object-Detection This repo. is an implementation of ACFFNet, which is accepted for in I

5 Nov 21, 2022