Giter Club home page Giter Club logo

depthanything-ros's Introduction

DepthAnything-ROS

DepthAnything-ROS is ROS2 wrapper for Depth-Anything.

nuscenes_demo.mp4
  • Environment
    • Ubuntu 22.04.01, ROS2 Humble
    • CUDA 12.3, cuDNN 8.9.5.29-1+cuda12.2, TensorRT 8.6.1.6-1+cuda12.0

Get started

Set environment

  • Install ROS2

See ROS2 document.

To install ROS2 easily, I recommend to use ansible script of Autoware. In detail, please see the installation page.

  • Install dependency
sudo apt install libgflags-dev libboost-all-dev
  • Prepare your rosbag

If you don't have any rosbag, I recommend rosbag for Nuscenes dataset.

Set onnx files

Set onnx files for DepthAnything-ROS/data or set onnx_path parameter.

  <arg name="onnx_path" default="$(find-pkg-share depth_anything)/data/depth_anything_vitb14.onnx" />

Run below command to get the onnx files of pre-train model.

# Install gdown
pip install gdown
# Download onnx file
mkdir data && cd data
gdown 1jFTCJv0uJovPAww9PHCYAoek-KfeajK_

If you want to make onnx files at yourself, please use depth-anything-tensorrt.

Launch

ros2 launch depth_anything depth_anything.launch.xml

Interface

Input

  • input/image (sensor_msgs::msg::Image)

The input image.

Output

  • ~/output/depth_image (sensor_msgs::msg::Image)

The depth image made by DepthAnything.

Parameters

  • onnx_path (string)
    • Default parameter: "$(find-pkg-share depth_anything)/data/depth_anything_vitb14.onnx"

The path to onnx file.

  • precision (string)
    • Default parameter: "fp32"

The precision mode to use quantization. DepthAnything-ROS supports in "fp32" or "fp16" (#2) for now.

Note

Build for TensorRT engine

When you run on the first start up, you need to wait about 5 minutes for build step.

Performance

  • Performance
    • RTX4090 results is written in official code
Model Params RTX4090 TensorRT RTX2070 TensorRT
Depth-Anything-Small 24.8M 3 ms 27 ms, VRAM 300MB
Depth-Anything-Base 97.5M 6 ms 65 ms, VRAM 700MB
Depth-Anything-Large 335.3M 12 ms 200 ms, VRAM 1750MB

Reference

depthanything-ros's People

Contributors

scepter914 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

depthanything-ros's Issues

FP16

Hi,

cool package which works for us. Something that confused me was the following line in the README.md

DepthAnything-ROS supports in "fp32" for now.

Actually we tested FP16 and it works fine without any changes to the code, you just have to wait 4-5 minutes on the first start up.

Bests,
Till

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.