This project demonstrates how to use Depth Pro, foundation model for zero-shot metric monocular depth estimation, in a Node.js environment.
- Clone the repository:
git clone https://github.com/huggingface/transformers.js-examples.git
- Change directory to the
depth-pro-node
project:cd transformers.js-examples/depth-pro-node
- Install the dependencies:
npm install
- Run the example:
node index.js
The following images illustrate the input image and its corresponding depth map generated by the model:
Input Image | Depth Map |
---|---|
![]() |
![]() |