Giter Club home page Giter Club logo

ksm26 / ros-based-3d-detection-tracking Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 94.71 MB

Deployment of 3D-Detection and Tracking pipeline in simulation based on rosbags and real-time.

License: Apache License 2.0

Python 62.48% CMake 1.25% C++ 26.50% C 1.21% C# 1.10% Java 0.33% Cuda 2.59% Objective-C++ 0.15% Shell 0.40% Dockerfile 0.17% Jupyter Notebook 3.76% Makefile 0.02% CSS 0.01% Batchfile 0.02%
3d-detection deployment detection-model lidar lidar-point-cloud ml-deployment mmdeploy onnx openpcdet pointpillars

ros-based-3d-detection-tracking's Introduction

ROS-based-3D-detection-Tracking

Implementation results on rosbags

Image 1 Description Image 2 Description

Scenario 1: Detecting multiple objects in the scene Scenario 2: Accurately retaining detection and track ids

Image 3 Description
Scenario 3: Detecting objects in the reverse direction

Image 4 Description
Scenario 4: Detecting a virtual vehicle on point-cloud data


Deployment results

Image 6 Description Image 7 Description

Scene: Pointpillar + Regnet Scene: Pointpillar (TensorRT)

Backbone mAP (nuScenes) FPS Memory (GPU)
Pointpillars 39.26 8.88 3.5 Gb
Pointpillars (TensorRT) ---- 15.15 4.5 Gb
Pointpillar + Regnet 48.2 7.76 3.5 Gb

Installation

  1. Create virtual environment
conda create --name rosdeploy python=3.8
conda activate rosdeploy
  1. Install pytorch conda install pytorch from https://pytorch.org/ according to cuda version or lower for eg.
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  1. Clone this repository
git clone [email protected]:ksm26/ROS-based-3D-detection-Tracking.git
  1. Install steps
pip install -U openmim
mim install mmcv-full
mim install mmdet
mim install mmsegmentation
  1. Install mmdetection3d
cd mmdetection3d
pip install -e .
  1. Install mmdeploy
cd mmdeploy 
pip install -e .
  1. Install tf and jsk tf tutorial Bounding box visualization ROS jsk_visualization jsk_recognition_msgs
sudo apt-get install ros-melodic-jsk-recognition-msgs 
sudo apt-get install ros-melodic-jsk-rviz-plugins
sudo apt-get install ros-melodic-jsk-rqt-plugins
sudo apt-get install ros-melodic-jsk-visualization
  1. Install tensorrt
pip install nvidia-tensorrt
python3 -m pip install --upgrade tensorrt

Additional installation

Error with rospy.init_node(): An error with ros packages installation into conda environment. Run the above ros_python_environment.yml using:

pip install scikit-build
conda env update --file ros_python_environment.yml

import tf: Error
Import tf does not work with python 3 as it is compiled for python 2. Solution: Recompile with python3 in catkin_workspace
To be able to work with python interpreter (pycharm,visual studio) add the compile path as below:

sys.path.append("~/Desktop/ROS-tracker/catkin_ws/src:/opt/ros/melodic/share")

Source catkin envrionment after tf installation and creation of new catkin workspace

source ~/catkin_ws/devel/setup.bash

Benchmark and Model Zoo

Download the checkpoint for 3D-detection model-zoo. This repository evaluates the performance of Pointpillars and Regnet models pretrained on nuScences dataset.
Test by running a rosbag and subscribe to appropriate rostopics

rosbag play rosbag_name.bag
python3 mmdetection3d/demo/pcd_demo_class.py

Convert the checkpoint into ONNX file and than to tensorRT .engine file

python3 mmdeploy/tools/deploy.py

ONNX file can be visualized using NETRON.


Licence

This project is released under the Apache 2.0 license.

Reference

ros-based-3d-detection-tracking's People

Contributors

ksm26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.