• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bonnet and then some! Deep Learning Framework for various Image Recognition Tasks. Photogrammetry and Robotics Lab, University of Bonn

Bonnetal!

Build Status

Example semantic segmentation of People vs Background using one of the included, real-time, architectures (running at 100FPS).

By Andres Milioto et.al @ University of Bonn.

In early 2018 we released Bonnet, which is a real-time, robotics oriented semantic segmentation framework using Convolutional Neural Networks (CNNs). Bonnet provides an easy pipeline to add architectures and datasets for semantic segmentation, in order to train and deploy CNNs on a robot. It contains a full training pipeline in Python using Tensorflow and OpenCV, and it also some C++ apps to deploy a CNN in ROS and standalone. The C++ library is made in a way which allows to add other backends (such as TensorRT).

Back then, most of my research was in the field of semantic segmentation, so that was what the framework was therefore tailored specifically to do. Since then, we have found a way to make things even more awesome, allowing for a suite of other tasks, like classification, detection, instance and semantic segmentation, feature extraction, counting, etc. Hence, the new name of this new framework: "Bonnetal", reflects that this is nothing but the old Bonnet, and then some. Hopefully, the explict et.al. will also spawn further collaboration and many pull requests! πŸ˜„

We've also switched to PyTorch to allow for easier mixing of backbones, decoders, and heads for different tasks. If you are still comfortable with just semantic segmentation, and/or you're a fan of TensorFlow, you can still find the original Bonnet here. Otherwise, keep on reading, and I'll try to explain why Bonnetal rules!

DISCLAIMER: I am currently bringing all the functionality out from a previously closed-source framework, so be patient if the task/weights are a placeholder, and send me an email to ask for a schedule on the particular part that you need.

Description

This code provides a framework to mix-match popular, imagenet-trained, backbones with different decoders to achieve different CNN-enabled tasks. All of these have pre-trained imagenet weights when used, that get downloaded by default if the conditions are met.

The main reason for the "lack" of variety of backbones so far is that imagenet pre-training takes a while, and it is pretty resource intensive. If you want a new backbone implemented we can talk about it, and you can share your resources to pretrain it πŸ˜ƒ (PR's welcome πŸ˜‰)

  • Tasks included are:

    • Full-image classification: /train, /deploy.
    • Semantic Segmentation: /train, /deploy.
    • More coming (but patience, since development is now a bit stagnant)...

The code is (like the original Bonnet) separated into a training part developed in Python, using Pytorch, and a deployment/inference part, which is fully written in C++, and contains the code to run on the robot, either using ROS or standalone.

Docker!

An nvidia-docker container is provided to run the full framework, and as a dependency check, as well as for the continuous integration. You can check the instructions to run the containers in /docker.

Training

/train contains Python code to easily mix and match backbones and decoders in order to train them for different image recognition tasks. It also contains helper scripts for other tasks such as converting graphs to ONNX for inference, getting image statistics for normalization, class statistics in the dataset, inference tests, accuracy assessment, etc, etc.

Deployment

/deploy contains C++ code for deployment on edge. Every task has its own library and namespace, and every package is a catkin package. Therefore, each task has 4 catkin packages:

  • A lib package that contains all inference files for the library.
  • A standalone package that shows how to use the library linked to a standalone C++ application.
  • A ros package that contains a node handler and some nodes to use the library with ROS for the sensor data message-passing, and
  • (optionally) a msg package that defines the messages required for a specific task, should this be required.

Inference is done either:

  • By generating a PyTorch traced model through the python interface that can be infered with the libtorch library, both on GPU and CPU, or
  • By generating an ONNX model through the python interface, that is later picked up by TensorRT, profiled in the individual computer looking at available memory and half precision capabilities, and inferer with the TensorRT engine. Notice that not all architectures are supported by TensorRT and we cannot take responsibility for this, so when you implement an architecture, do a quick test that it works with tensorRT before training it and it will make your life easier.

Pre-trained models

Imagenet pretrained weights for the backbones are downloaded directly to the backbones in first use, so they never start from scratch. Whenever you use a backbone for a task, if the image is RGB, then the weights from imagenet are downloaded into the backbone (unless a specific pretrained model is otherwise explicitly stated in the parameters).

These are the currently trained models we have:


License

Bonnetal: MIT

Copyright 2019, Andres Milioto, Cyrill Stachniss. University of Bonn.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Pretrained models: Model and Dataset Dependent

The pretrained models with a specific dataset maintain the copyright of such dataset.


Citations

If you use our framework for any academic work, please cite the original paper.

@InProceedings{milioto2019icra,
  author     = {A. Milioto and C. Stachniss},
  title      = {{Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics using CNNs}},
  booktitle  = {Proc. of the IEEE Intl. Conf. on Robotics \& Automation (ICRA)},
  year       = 2019,
  codeurl    = {https://github.com/Photogrammetry-Robotics-Bonn/bonnet},
  videourl   = {https://www.youtube.com/watch?v=tfeFHCq6YJs},
}

If you use our Instance Segmentation code, please cite its paper paper:

@InProceedings{milioto2019icra-fiass,
  author     = {A. Milioto and L. Mandtler and C. Stachniss},
  title      = {{Fast Instance and Semantic Segmentation Exploiting Local Connectivity, Metric Learning, and One-Shot Detection for Robotics }},
  booktitle  = {Proc. of the IEEE Intl. Conf. on Robotics \& Automation (ICRA)},
  year       = 2019,
}

Our networks are either built directly on top of, or strongly based on, the following architectures, so if you use them for any academic work, please give a look at their papers and cite them if you think proper:


Other useful GitHub's:

  • Sync Batchnorm. Allows to train bigger nets in multi-gpu setup with larger batch sizes so that batch norm doesn't diverge to something that doesn't represent the data.
  • Queueing tool: Very nice queueing tool to share GPU, CPU and Memory resources in a multi-GPU environment.
  • Pytorch: The backbone of everything.
  • onnx-tensorrt: ONNX graph to TensorRT engine for fast inference.
  • nvidia-docker: Docker that allows you to also exploit your nvidia GPU.

Internal Contributors (not present in open-source commits)


Acknowledgements

This work has partly been supported by the German Research Foundation under Germany's Excellence Strategy, EXC-2070 - 390732324 (PhenoRob). We also thank NVIDIA Corporation for providing a Quadro P6000 GPU partially used to develop this framework.

More Repositories

1

kiss-icp

A LiDAR odometry pipeline that just works
Python
1,479
star
2

depth_clustering

πŸš• Fast and robust clustering of point clouds generated with a Velodyne sensor.
C++
1,105
star
3

lidar-bonnetal

Semantic and Instance Segmentation of LiDAR point clouds for autonomous driving
Python
912
star
4

semantic_suma

SuMa++: Efficient LiDAR-based Semantic SLAM (Chen et al IROS 2019)
C++
902
star
5

semantic-kitti-api

SemanticKITTI API for visualizing dataset, processing data, and evaluating results.
Python
762
star
6

OverlapNet

OverlapNet - Loop Closing for 3D LiDAR-based SLAM (chen2020rss)
Python
649
star
7

LiDAR-MOS

(LMNet) Moving Object Segmentation in 3D LiDAR Data: A Learning-based Approach Exploiting Sequential Data (RAL/IROS 2021)
Python
574
star
8

vdbfusion

C++/Python Sparse Volumetric TSDF Fusion
C++
456
star
9

SHINE_mapping

🌟 SHINE-Mapping: Large-Scale 3D Mapping Using Sparse Hierarchical Implicit Neural Representations (ICRA 2023)
Python
443
star
10

puma

Poisson Surface Reconstruction for LiDAR Odometry and Mapping
Python
400
star
11

PIN_SLAM

πŸ“PIN-SLAM: LiDAR SLAM Using a Point-Based Implicit Neural Representation for Achieving Global Map Consistency [TRO' 24]
Python
341
star
12

bonnet

Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics.
Python
323
star
13

range-mcl

Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps (chen2021icra)
Python
278
star
14

overlap_localization

chen2020iros: Learning an Overlap-based Observation Model for 3D LiDAR Localization.
Python
270
star
15

rangenet_lib

Inference module for RangeNet++ (milioto2019iros, chen2019iros)
C++
238
star
16

refusion

ReFusion: 3D Reconstruction in Dynamic Environments for RGB-D Cameras Exploiting Residuals
C++
235
star
17

4DMOS

Receding Moving Object Segmentation in 3D LiDAR Data Using Sparse 4D Convolutions (RAL 2022)
Python
201
star
18

MapClosures

Effectively Detecting Loop Closures using Point Cloud Density Maps
Python
196
star
19

LiDiff

[CVPR'24] Scaling Diffusion Models to Real-World 3D LiDAR Scene Completion
Python
194
star
20

visual-crop-row-navigation

This is a visual-servoing based robot navigation framework tailored for navigating in row-crop fields. It uses the images from two on-board cameras and exploits the regular crop-row structure present in the fields for navigation, without performing explicit localization or mapping. It allows the robot to follow the crop-rows accurately and handles the switch to the next row seamlessly within the same framework.
C++
178
star
21

pole-localization

Online Range Image-based Pole Extractor for Long-term LiDAR Localization in Urban Environments
Python
167
star
22

online_place_recognition

Graph-based image sequences matching for the visual place recognition in changing environments.
C++
150
star
23

agribot

The mission of the project is to build an agricultural robot (AgriBot) from scratch with the aim of serving as a data-recording platform in fields. For further information about the design and purpose of the robot, please follow the About the AgriBot Project page
C++
143
star
24

LocNDF

LocNDF: Neural Distance Field Mapping for Robot Localization
Python
136
star
25

4dNDF

3D LiDAR Mapping in Dynamic Environments using a 4D Implicit Neural Representation (CVPR 2024)
Python
131
star
26

make_it_dense

Make it Dense: Self-Supervised Geometric Scan Completion of Sparse 3D LiDAR Scans in Large Outdoor Environments
Python
127
star
27

point-cloud-prediction

Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks
Python
125
star
28

ir-mcl

IR-MCL: Implicit Representation-Based Online Global Localization https://arxiv.org/abs/2210.03113
Python
120
star
29

MutiverseOdometry

Code for Simple But Effective Redundant Odometry for Autonomous Vehicles
C++
111
star
30

vpr_relocalization

The framework for visual place recognition in changing enviroments. Matches two sequence of images of arbitrary trajectory overlap.
C++
107
star
31

TARL

[CVPR'23] TARL: Temporal Consistent 3D LiDAR Representation Learning for Semantic Perception in Autonomous Driving
Python
99
star
32

lidar-visualizer

A LiDAR visualization tool for all your datasets
Python
96
star
33

deep-point-map-compression

Python
95
star
34

segcontrast

Python
92
star
35

auto-mos

Automatic Labeling to Generate Training Data for Online LiDAR-based Moving Object Segmentation
Python
91
star
36

3DUIS

Python
80
star
37

lidar_transfer

Code for Langer et al. "Domain Transfer for Semantic Segmentation of LiDAR Data using Deep Neural Networks", IROS, 2020.
Python
70
star
38

descriptor-dr

[ICRA 2023] Learning-Based Dimensionality Reduction for Computing Compact and Effective Local Feature Descriptors
Python
61
star
39

hsmcl

C++
60
star
40

SIMP

Python
59
star
41

ContMAV

[CVPR2024] Open-world Semantic Segmentation Including Class Similarity
Python
59
star
42

extrinsic_calibration

Motion Based Multi-Sensor Extrinsic Calibration
Python
57
star
43

vdbfusion_ros

ROS1 Wrapper for VDBFusion https://github.com/PRBonn/vdbfusion
C++
57
star
44

DCPCR

DCPCR: Deep Compressed Point Cloud Registration in Large-Scale Outdoor Environments
Python
55
star
45

HortiMapping

πŸ«‘ Panoptic Mapping with Fruit Completion and Pose Estimation for Horticultural Robots (IROS' 23)
Python
53
star
46

fast_change_detection

Fast Image-Based Geometric Change Detection Given a 3D Model
C++
44
star
47

contrastive_association

Contrastive Instance Association for 4D Panoptic Segmentation using Sequences of 3D LiDAR Scans
Python
43
star
48

retriever

Point Cloud-based Place Recognition in Compressed Map
Python
40
star
49

4d_plant_registration

Python
38
star
50

tmcl

Text Guided MCL
C++
34
star
51

dynamic-point-removal

Static Map Generation from 3D LiDAR Point Clouds Exploiting Ground Segmentation
Python
34
star
52

MaskPLS

Mask-Based Panoptic LiDAR Segmentation for Autonomous Driving, RA-L, 2023
Python
32
star
53

manifold_python

Python bindings for https://github.com/hjwdzh/Manifold
C++
30
star
54

PS-res-excite

Python
26
star
55

kppr

KPPR: Exploiting Momentum Contrast for Point Cloud-Based Place Recognition
Python
26
star
56

goPro-meta

App to sample images from goPro Hero 5 video and syncronize sensor frames to them. Output is yaml file and extracted images.
C++
25
star
57

geometrical_stem_detection

Code for fast and accurate geometrical plant stem detection
C++
24
star
58

PartiallyObservedInverseGames.jl

An inverse game solver for inferring objectives from noise-corrupted partial state observations of non-cooperative multi-agent interactions.
Julia
23
star
59

pybonirob

Set of tools to access bonirob datasets in Python
Python
23
star
60

phenobench-baselines

Baselines of the PhenoBench Dataset
Python
20
star
61

voxblox_pybind

Python bindings for the Voxblox library
C++
20
star
62

catkin_tools_fetch

πŸ• "fetch" and "update" dependencies of projects in your catkin workspace with a new verb "dependencies" for catkin_tools
Python
16
star
63

nuscenes2kitti

Python
16
star
64

StyleGenForLabels

StyleGAN-based generation of labels for crop-weed segmentation
Python
12
star
65

plants_temporal_matcher

This system can perform 3D point-to-point associations between plants' point clouds acquired in different session even in presence of highly repetitive structures and drastic changes.
Python
12
star
66

ipb_homework_checker

βœ”οΈ A generic homework checker that we use to automatically check students homework
Python
11
star
67

leaf_mesher

Precise 3D Reconstruction of Plants from UAV Imagery Combining Bundle Adjustment and Template Matching
9
star
68

HAPT

Python
9
star
69

sigf

Image Matching for Crop Fields Using Similarity Invariant Geometric Feature
MATLAB
8
star
70

DG-CWS

Towards Domain Generalization in Crop and Weed Segmentation for Precision Farming Robots
Python
7
star
71

agri-pretraining

Python
7
star
72

leaf-plant-instance-segmentation

In-Field Phenotyping Based on Crop Leaf and Plant Instance Segmentation
Python
5
star
73

MinkowskiPanoptic

Panoptic segmentation baseline implemented based on the MinkowskiEngine library
Python
5
star
74

Unsupervised-Pre-Training-for-3D-Leaf-Instance-Segmentation

Official repository of Unsupervised Pre-Training for 3D Leaf Instance Segmentation by Roggiolani et al.
Python
5
star
75

vdb_to_numpy

Tool to convert VDB grids to numpy arrays.
Jupyter Notebook
4
star
76

g2o_catkin

:octocat: G2O meets catkin
CMake
3
star
77

ipb_workspace

An empty default workspace for development inside IPB lab
3
star
78

plant_pcd_segmenter

High Precision Leaf Instance Segmentation for Phenotyping in Point Clouds Obtained Under Real Field Conditions
2
star
79

cinderella-geometric-animations

Animations of geometric properties relevant to Photogrammetry, Computer Vision and Robotics created with Cinderella
HTML
1
star