TouchDesigner implementation for Depth Anything and Depth Anything v2 with TensorRT monocular depth estimation.
- One click install and run script
- In-TouchDesigner inference
Tested with TouchDesigner 2023.11880 & Python 3.11
- Install Python 3.11;
- Install CUDA Toolkit 11.8;
- Install GIT;
- Clone TDDepthAnything repository
- Download Depth-Anything model or Depth-Anything v2 model
- Run
install.bat
. When prompted to select version of Python, type in "3.11" and hit "Enter"; - When installation will be finished, copy model to
checkpoints
folder
- Run
accelerate.bat
. - Select model version (1 - Depth-Anything, 2 - Depth-Anything v2)
- Select model size (s - small, b - base, l - large, g - giant)
- Select width & height (default is 518x518)
- Wait for acceleration to finish
- Add TDDepthAnything.tox to project
- On
Settings
page change path toTDDepthAnything
folder and click Re-init - On
Depth Anything
page select path to engine file (for ex.engines/depth_anything_vits14.engine
) and click Load Engine
Based on the following projects:
- Depth-Anything - Unleashing the Power of Large-Scale Unlabeled Data.
- Depth-Anything TensorRT C++ - Leveraging the TensorRT API for efficient real-time inference.
- TopArray - Interaction between Python/PyTorch tensor operations and TouchDesigner TOPs.