Skip to content

Latest commit

 

History

History
135 lines (106 loc) · 4.76 KB

File metadata and controls

135 lines (106 loc) · 4.76 KB

Jetson-Example: Run Depth Anything V2 on NVIDIA Jetson Orin 🚀

This project provides an one-click deployment of the Depth Anything V2 monocular depth estimation model developed by Hong Kong University and ByteDance. The deployment is visualized on reComputer J4012 (Jetson Orin NX 16GB, 100 TOPS) and includes a WebUI for model conversion to TensorRT and real-time depth estimation.

WebUI

All models and inference engine implemented in this project are from the official Depth Anything V2.

🔥Features

  • One-click deployment for Depth Anything V2 models.

  • WebUI for model conversion and depth estimation.

  • Support for uploading videos/images or using the local camera

  • Supports S, B, L models of Depth Anything V2 with input sizes 518.

    🗝️WebUI Features

    • Choose model: Select from Depth Anything V2 models. (S, B, L)
    • Grayscale option: Option to use grayscale.
    • Choose source: Select the input source (Video, Image, Camera).
    • Export Model: Automatically download and convert the model from ONNX to TensorRT format.
    • Start Estimation: Begin depth estimation using the selected model and input source.
    • Stop Estimation: Stop the ongoing depth estimation process.

    Depthanything

🥳Getting Started

📜Prerequisites

  • reComputer J4012 (🛒Buy Here)
  • Docker installed on reComputer
  • USB Camera (optional)

Modify Docker Daemon Configuration (Optional)

To enhance the experience of quickly loading models in Docker, you need to add the following content to the /etc/docker/daemon.json file:

{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "path": "nvidia-container-runtime",
      "runtimeArgs": []
    }
  },
  "storage-driver": "overlay2",
  "data-root": "/var/lib/docker",
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m",
    "max-file": "3"
  },
  "no-new-privileges": true,
  "experimental": false
}

After modifying the daemon.json file, you need to restart the Docker service to apply the configuration:

sudo systemctl restart docker

🚀Installation

PyPI(recommend)

pip install jetson-examples

Linux (github trick)

curl -fsSL https://raw.githubusercontent.com/Seeed-Projects/jetson-examples/main/install.sh | sh

Github (for Developer)

git clone https://github.com/Seeed-Projects/jetson-examples
cd jetson-examples
pip install .

📋Usage

  1. Run code:

    reComputer run depth-anything-v2
  2. Open a web browser and input http://{reComputer ip}:5000. Use the WebUI to select the model and source.

  3. Click on Export Model to download and convert the model.

  4. Click on Start Estimation to begin the depth estimation process.

  5. View the real-time depth estimation results on the WebUI.

⛏️Applications

  • Security: Enhance surveillance systems with depth perception.

    Security

  • Autonomous Driving: Improve environmental sensing for autonomous vehicles.

    Autonomous Driving

  • Underwater Scenes: Apply depth estimation in underwater exploration.

    Underwater Scenes

  • Indoor Scenes: Use depth estimation for indoor navigation and analysis.

    Indoor Scenes

Further Development 🔧

🙏🏻Contributing

We welcome contributions from the community. Please fork the repository and create a pull request with your changes.

✅License

This project is licensed under the MIT License.

🏷️Acknowledgements