/ Модель

Характеристики

Лицензия
Apache 2.0
Архитектура
depth_anything_v1 · dense
Базовая модель
depth_anything_vitb14
Библиотека
transformers
Опубликована
27 окт 2026

Depth-Anything-V1-Base

Оценка глубиныИзображение → depth_map3 профессии

Неофициальный перенос Depth Anything v1 Base в Transformers для оценки глубины сцены по изображению и выдачи карты глубины.

36скачиваний за 30 дней0лайковвеса обновлены27 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Это неофициальный перенос базовой модели Depth Anything v1 в формат Transformers, созданный автором репозитория bigshanedogg на основе весов Lihe Young и соавторов. Архитектура объединяет DINOv2 ViT-B/14 и голову DPT и оценивает глубину сцены по изображению, возвращая карту глубины в predicted_depth.

Модель подходит для получения карты глубины из фотографии или другого изображения, а также для постобработки результата до исходного размера изображения. README сообщает о побитном совпадении результатов с официальным кодом на проверенных изображениях в fp32 и fp16 autocast. Репозиторий использует библиотеку Transformers и загрузку с trust_remote_code.

Код и веса заявлены под лицензией Apache-2.0; в README также отмечено, что в репозитории исходных весов лицензия отдельно не указана, а конверсия тех же весов опубликована под Apache-2.0.

Сценарии применения

  • получение карты глубины из фотографии
  • оценка глубины объектов и сцены на изображении
  • постобработка карты глубины до исходного размера изображения

Ограничения

Для загрузки требуется trust_remote_code. Модель предсказывает глубину по отдельному изображению; README не заявляет метрическую калибровку глубины.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Depth-Anything-V1-Base — transformers format (original code)

Unofficial transformers port of Depth Anything (v1) Base (LiheYoung/depth_anything_vitb14) that runs the original code. Loads with trust_remote_code. model.safetensors holds the tensors of the released pytorch_model.bin under their original names (converted by save_pretrained, every tensor checked equal).

Not an official release. Depth Anything was created by Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng and Hengshuang Zhao — https://github.com/LiheYoung/Depth-Anything, paper "Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data" (CVPR 2024, arXiv 2401.10891).

What it is

DepthAnythingV1ForDepthEstimation holds the official DPT_DINOv2's submodules (pretrained: DINOv2 ViT-B/14, depth_head: DPT), computes depth with the official DPT_DINOv2.forward and returns the standard DepthEstimatorOutput (predicted_depth). DINOv2 is the repo's local torchhub copy of facebookresearch/dinov2, built with the hub's arguments (the official class calls torch.hub.load(..., source="local")). Code vendored from LiheYoung/Depth-Anything @ 1d033367 into dav1_dinov2.py / dav1_dpt.py; edits: imports, and Block → NestedTensorBlock where the original imported NestedTensorBlock as Block. DepthAnythingV1Processor (processing_depth_anything_v1.py, processor_config.json) wraps DepthAnythingV1ImageProcessor, the transform of the official run.py.

Verified against the official code (same process, V100, 3 images incl. non-square): preprocessing, predicted_depth (also as a tuple) in fp32 and under fp16 autocast, the hidden states, and the post-processing to the original size are bit-identical.

Usage

import torch
from PIL import Image
from transformers import AutoModelForDepthEstimation, AutoProcessor

model = AutoModelForDepthEstimation.from_pretrained("Depth-Anything-V1-Base", trust_remote_code=True).eval().cuda()
processor = AutoProcessor.from_pretrained("Depth-Anything-V1-Base", trust_remote_code=True)
image = Image.open("image.jpg")                                   # or a path (read with cv2, as run.py)
inputs = processor(images=image, return_tensors="pt").to("cuda")
with torch.no_grad():
    outputs = model(**inputs)                                     # outputs.predicted_depth: (1, H', W') relative inverse depth
depth = processor.post_process_depth_estimation(outputs, target_sizes=[image.size[::-1]])[0]["predicted_depth"]
  • AutoModel loads the same class. output_hidden_states=True adds the 4 DINOv2 features the DPT head reads; return_dict=False returns a tuple.
  • post_process_depth_estimation resizes as the original run.py (bilinear, align_corners=False), not with transformers' bicubic.

Runtime packages beyond torch / transformers: opencv-python, torchvision, huggingface_hub (as the original).

Licensing

  • Code and weights: Apache-2.0 — LICENSE (LiheYoung/Depth-Anything). The weight repo LiheYoung/depth_anything_vitb14 states no license itself; the repository is Apache-2.0 and the transformers conversion of the same weights in the same organisation (LiheYoung/depth-anything-base-hf) is published as Apache-2.0.
  • DINOv2 code (torchhub copy): Apache-2.0, Meta — LICENSE.dinov2.
  • Attribution, sources and the changes made here: NOTICE.

Citation

If you use this model, please cite the original work, as its authors ask:

@inproceedings{depthanything,
      title={Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data}, 
      author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
      booktitle={CVPR},
      year={2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · depth-estimation

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
DepthAnythingV1ForDepthEstimation
Ревизия весов
1e46918

0 моделей