depthstream-accelerator-ros2-integrated-monocular-depth-inference
DepthStream Accelerator: A TensorRT-optimized monocular depth estimation tool with ROS2 integration for C++. It offers high-speed, accurate depth perception, perfect for real-time applications in robotics, autonomous vehicles, and interactive 3D environments.
https://github.com/jagennath-hari/depthstream-accelerator-ros2-integrated-monocular-depth-inference
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords
Repository
DepthStream Accelerator: A TensorRT-optimized monocular depth estimation tool with ROS2 integration for C++. It offers high-speed, accurate depth perception, perfect for real-time applications in robotics, autonomous vehicles, and interactive 3D environments.
Basic Info
Statistics
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
DepthStream-Accelerator-ROS2-Integrated-Monocular-Depth-Inference
DepthStream Accelerator: A TensorRT-optimized monocular depth estimation tool with ROS2 integration for C++. It offers high-speed, accurate depth perception, perfect for real-time applications in robotics, autonomous vehicles, and interactive 3D environments.
🏁 Dependencies
1) NVIDIA Driver (Official Link) 2) CUDA Toolkit (Official Link) 3) cuDNN (Official Link) 4) TensorRT (Official Link) 5) OpenCV CUDA (Github Guide) 6) Miniconda (Official Link) 7) ROS 2 Humble (Official Link) 8) ZoeDepth (Official Link)
⚙️ Creating the Engine File
ONNX File
Create the onnx file cd monocular_depth/scripts/ZoeDepth/ && python trt_convert.py. The ONNX file gets saved in the working directory as zoe_nk.onnx, configure the input dimensions as per your input image dimensions (h, w).
You can download a prebuilt .onnx file from LINK.
TensorRT engine creation
Once you have the .onnx file created go into the tensorRT trtexec directory. Mostly this is cd /usr/src/tensorrt/bin/. Now it is time to create the engine file, this could take a few minutes to create. Run the command below,
./trtexec --onnx=zoe_nk.onnx --builderOptimizationLevel=3 --useSpinWait --useRuntime=full --useCudaGraph --precisionConstraints=obey --allowGPUFallback --tacticSources=+CUBLAS,+CUDNN,+JIT_CONVOLUTIONS,+CUBLAS_LT --inputIOFormats=fp32:chw --outputIOFormats=fp32:chw --sparsity=enable --layerOutputTypes=fp32 --layerPrecisions=fp32 --saveEngine=zoe_nk.trt
🖼️ Running Depth Estimation
Build the ROS2 workspace
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --parallel-workers $(nproc)
Inference
ros2 launch monocular_depth mono_depth.launch.py trt_path:=zoe_nk.trt image_topic:=/rgb/image_rect_color gui:=true With GUI.
ros2 launch monocular_depth mono_depth.launch.py trt_path:=zoe_nk.trt image_topic:=/rgb/image_rect_color gui:=false Without GUI.
GUI
DEPTH MAP
💬 ROS2 Message
The depth map gets published as sensor_msg/Image in the /mono_depth/depthMap topic
⚠️ Note
1) There is a know problem with MiDAS which doesnt allow tracing the network. 2) If the input image dimensions are changed, change the source code to match your image dimension inputs.
Owner
- Name: Jagennath Hari
- Login: jagennath-hari
- Kind: user
- Website: https://www.linkedin.com/in/jagennath-hari/
- Repositories: 2
- Profile: https://github.com/jagennath-hari
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Hari" given-names: "Jagennath" title: "DepthStream-Accelerator-ROS2-Integrated-Monocular-Depth-Inference" version: 1.0.0 date-released: 2023-11-10 url: "https://github.com/jagennath-hari/DepthStream-Accelerator-ROS2-Integrated-Monocular-Depth-Inference"
GitHub Events
Total
- Watch event: 8
- Push event: 5
Last Year
- Watch event: 8
- Push event: 5