PointTrack
Introduction
Object tracking algorithm based on cloud of points using segmentation masks. It was improved in case of speed using GPU-based preprocessing and numba-based assinging algorithm.
This branch works with PyTorch 1.10.0.
πͺIntroduction | π οΈInstallation | πRun | πContents | πDocs
Installation
Requirements
git-lfs
docker
nvidia-jetpack-4.5 (L4T R32.5.0) #if you are using NVIDIA edge devices
Environment installation
git clone --branch indexing_fast https://gitlab.com/sdbcs-nio3/itl_mipt/segm_tracking/alg/tracking/pointtrack.git
cd pointtrack
git lfs fetch && git lfs pull
source docker/docker_names.sh
sh docker/build.sh
sh docker/start_devel.sh
See additional information in docs/docker.md
After that you will be in project directory. You will need to register the package manually using scripts below.
ROS package installation
cd ..
git clone https://gitlab.com/sdbcs-nio3/itl_mipt/ros_common/camera_objects_msgs.git
cd ..
source /opt/ros/noetic/setup.bash
catkin_make
source devel/setup.bash
Train environment installation
pip install -r requirements/train.txt
Run the project
ROS node
roslaunch pointtrack main.launch \
camera_ns:=/stereo/left \ # camera namespace
image_topic:=image_rect \ # colored image topic
objects_topic:=objects \ # topic with detection results (see camera object msgs)
objects_track_ids_topic:=track_ids \ # ouput topic name
print_stats:=1 \ # print or dont print stat params
stats_rate:=20 # how often will the information be printed
To train/test a model
See additional information in docs/point_track.md
Improvements
There were a lot of research on speedup vs quality of work. The original network structure was changed, accelerated using torch2trt. The dependence of the inference speed on the size of segmentation masks is investigated. Also the model has also been accelerated using Numba library. You can also set the maximum number of objects during tracking in order to accurately meet the allocated inference time. All of this improvements explained in docs/point_track_improvements.md
Contents
βββ docker <- Docker scripts and env setup.
βββ docs <- Markdown files which provides an additional information about package.
βββ launch <- Launch file for package params in the ROS namespace.
βββ requirements <- Directory with main requirements for train/infer stage.
βββ scripts <- Scripts for configuration, downloading weights.
β β
β ...
β βββ ros_node.py <- Entrypoint ros node file (inference).
β βββ train_tracker_with_val.py <- Entrypoint model file (training).
β βββ test_tracking.py <- Entrypoint model file (testing).
β
...
β
βββ weights <- pth-like files for the model storing in git lfs.
βββ README.md <- You are here.
βββ package.xml <- Main info about the package for ROS.
βββ config.yaml <- Main config for running the ROS node.
βββ requirements.txt <- Required libraries.