/ Модель

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

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

Depth-Anything-V1-Small

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

Компактная модель Depth Anything V1 Small оценивает глубину сцены по изображению и возвращает карту глубины.

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

Бенчмарки

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

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

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

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

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

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

Это неофициальный перенос в формат Transformers компактной модели Depth Anything V1 Small, разработанной Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng и Hengshuang Zhao. Модель оценивает глубину сцены по одному изображению и возвращает карту предсказанной глубины. В основе архитектуры — DINOv2 ViT-S/14 и голова DPT.

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

Код и веса указаны под лицензией Apache-2.0; в репозитории также приведена лицензия Apache-2.0 для кода DINOv2. Это неофициальный порт, поэтому для загрузки требуется доверенный удалённый код.

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

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

Ограничения

Для загрузки через Transformers требуется включить `trust_remote_code`. Это неофициальный перенос; в README подтверждена идентичность результатов на ограниченном наборе проверок, а не на всех возможных входах.

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

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

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

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

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

Открыть на Hugging Face

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

Unofficial transformers port of Depth Anything (v1) Small (LiheYoung/depth_anything_vits14) 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-S/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-Small", trust_remote_code=True).eval().cuda()
processor = AutoProcessor.from_pretrained("Depth-Anything-V1-Small", 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_vits14 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-small-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
Ревизия весов
8611412

0 моделей