LiheYoung / depth_anything_vitb14

huggingface.co
Total runs: 1.0K
24-hour runs: 0
7-day runs: 123
30-day runs: -40.4K
Model's Last Updated: January 25 2024
depth-estimation

Introduction of depth_anything_vitb14

Model Details of depth_anything_vitb14

Depth Anything model, base

The model card for our paper Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data .

You may also try our demo and visit our project page .

Installation

First, install the Depth Anything package:

git clone https://github.com/LiheYoung/Depth-Anything
cd Depth-Anything
pip install -r requirements.txt
Usage

Here's how to run the model:

import numpy as np
from PIL import Image
import cv2
import torch

from depth_anything.dpt import DepthAnything
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
from torchvision.transforms import Compose

model = DepthAnything.from_pretrained("LiheYoung/depth_anything_vitb14")

transform = Compose([
        Resize(
            width=518,
            height=518,
            resize_target=False,
            keep_aspect_ratio=True,
            ensure_multiple_of=14,
            resize_method='lower_bound',
            image_interpolation_method=cv2.INTER_CUBIC,
        ),
        NormalizeImage(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
        PrepareForNet(),
    ])

image = Image.open("...")
image = np.array(image) / 255.0
image = transform({'image': image})['image']
image = torch.from_numpy(image).unsqueeze(0)

depth = model(image)

Runs of LiheYoung depth_anything_vitb14 on huggingface.co

1.0K
Total runs
0
24-hour runs
-69
3-day runs
123
7-day runs
-40.4K
30-day runs

More Information About depth_anything_vitb14 huggingface.co Model

depth_anything_vitb14 huggingface.co

depth_anything_vitb14 huggingface.co is an AI model on huggingface.co that provides depth_anything_vitb14's model effect (), which can be used instantly with this LiheYoung depth_anything_vitb14 model. huggingface.co supports a free trial of the depth_anything_vitb14 model, and also provides paid use of the depth_anything_vitb14. Support call depth_anything_vitb14 model through api, including Node.js, Python, http.

depth_anything_vitb14 huggingface.co Url

https://huggingface.co/LiheYoung/depth_anything_vitb14

LiheYoung depth_anything_vitb14 online free

depth_anything_vitb14 huggingface.co is an online trial and call api platform, which integrates depth_anything_vitb14's modeling effects, including api services, and provides a free online trial of depth_anything_vitb14, you can try depth_anything_vitb14 online for free by clicking the link below.

LiheYoung depth_anything_vitb14 online free url in huggingface.co:

https://huggingface.co/LiheYoung/depth_anything_vitb14

depth_anything_vitb14 install

depth_anything_vitb14 is an open source model from GitHub that offers a free installation service, and any user can find depth_anything_vitb14 on GitHub to install. At the same time, huggingface.co provides the effect of depth_anything_vitb14 install, users can directly use depth_anything_vitb14 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

depth_anything_vitb14 install url in huggingface.co:

https://huggingface.co/LiheYoung/depth_anything_vitb14

Url of depth_anything_vitb14

depth_anything_vitb14 huggingface.co Url

Provider of depth_anything_vitb14 huggingface.co

LiheYoung
ORGANIZATIONS

Other API from LiheYoung