Video Depth Anything
Video Depth Anything, by ByteDance, puts a temporal head on the Depth Anything V2 encoder so depth stays consistent from frame to frame. LibreYOLO runs a list of frames, a folder, a video or a stream as one sequence and returns one depth map per frame, all on one relative scale.
- Задачи
- depth
- Размеры
- s, b, l at 518 px
- Установка
pip install libreyolo- Уровень поддержки
- Только инференс, начиная с v1.8.0. Только предсказание, валидация и экспорт. Функции обучения неприменимы.
- Исходный проект
- Video Depth Anything от ByteDance, Apache-2.0 (Small checkpoint); CC-BY-NC-4.0 (Base and Large checkpoints). Статья, исходный код
- Лицензии
- Код: Apache-2.0, веса: Apache-2.0 (s); CC-BY-NC-4.0 (b, l). Коммерческое использование
Install
Video Depth Anything needs no optional extra.
pip install libreyoloPredict
Weights download from the LibreYOLO Hugging Face mirrors on first use.
from libreyolo import LibreYOLO model = LibreYOLO("LibreVideoDepthAnythings-depth.pt") # One result per frame, streamed with at most one window of lag.for result in model("clip.mp4", stream=True): depth = result.depth_map.data # (H, W) relative inverse depthfrom libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreVideoDepthAnythings-depth.pt")result = model(SAMPLE_IMAGE, save=True) # a one-frame sequenceprint(result.depth_map.data.shape)libreyolo predict model=LibreVideoDepthAnythings-depth.pt source=clip.mp4 save=TrueAny multi-image source is one sequence: a list of frames, a directory sorted
by name, a video file or a stream. N frames give N results, each with a
result.depth_map on that frame's canvas. Inside, frames run in upstream's
overlapping 32-frame windows, and each window is scale and shift aligned to
the ones before it, so the whole sequence shares one relative scale. A single
image is a one-frame sequence; upstream pads it to a full window with copies
of itself.
The output follows LibreYOLO's shared depth contract: relative inverse depth, where higher values are closer and the values have no metric unit. The input size is upstream's default of 518 for every encoder; frames wider than 16:9 run proportionally smaller, as upstream does. See the depth estimation task page for the payload.
Variants
Three encoder sizes, s, b and l, one checkpoint each. The licence
differs by size (see below), so s is the one to use in a commercial
product. Upstream's metric-depth checkpoints are not hosted, and the
converter refuses them.
Training is not offered: train() raises. Convert an upstream relative-depth
checkpoint with weights/convert_video_depth_anything_weights.py in the
library.
Export
| Задача | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | Axelera | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Depth | Depth to ONNX: не поддерживается | Depth to TorchScript: не поддерживается | Depth to ExecuTorch: не поддерживается | Depth to TensorRT: не поддерживается | Depth to OpenVINO: не поддерживается | Depth to Paddle: не поддерживается | Depth to MNN: не поддерживается | Depth to RKNN: не поддерживается | Depth to Axelera: не поддерживается | Depth to ncnn: не поддерживается | Depth to TFLite: не поддерживается | Depth to CoreML: не поддерживается | Depth to Core AI: не поддерживается |
Export is not supported. The network reads a 32-frame window and the windows
are stitched on the host, which the single-image depth export contract does
not describe, so export() raises.
Checkpoints
| Файл | Лицензия весов |
|---|---|
| Depth | |
| LibreVideoDepthAnythings-depth.pt | apache-2.0 |
| LibreVideoDepthAnythingb-depth.pt | cc-by-nc-4.0 |
| LibreVideoDepthAnythingl-depth.pt | cc-by-nc-4.0 |
Все перечисленные выше файлы уже доступны в организации LibreYOLO и скачиваются при первом использовании.
Licensing
Проверяйте лицензию в репозитории конкретных весов на Hugging Face. Она указана для каждого чекпойнта в организации LibreYOLO и может различаться даже внутри одного семейства. Этот репозиторий считается авторитетным источником, а сводка ниже описывает условия на момент последней проверки страницы.
Это описание соответствующих лицензий, а не юридическая консультация. Если ответ важен для коммерческого использования, прочитайте лицензии самостоятельно и проконсультируйтесь с юристом.
- Оригинальная работа
- Video Depth Anything, ByteDance
- Лицензия исходного проекта
- Apache-2.0 (Small checkpoint); CC-BY-NC-4.0 (Base and Large checkpoints)
- Исходный код проекта
- github.com/DepthAnything/Video-Depth-Anything
- Код LibreYOLO
- MIT
- Веса
- Apache-2.0 (s); CC-BY-NC-4.0 (b, l), повторно опубликованы на huggingface.co/LibreYOLO
- Толкование
- The licence depends on the size. The s checkpoint (Video-Depth-Anything-Small) is Apache-2.0, a permissive license that allows commercial and closed-source use if you keep the license text and notices. The b and l checkpoints (Base and Large) are CC BY-NC 4.0: attribution is required and commercial use is not allowed. The vendored code is Apache-2.0 from DepthAnything/Video-Depth-Anything at commit 4f5ae23172ba60fd7bc11ef671cca678842c7072 (Copyright ByteDance), including a motion module from AnimateDiff and attention code from Hugging Face diffusers, both Apache-2.0; the DINOv2 encoder and DPT head are shared with LibreYOLO's Depth Anything V2 family, and LibreYOLO's own adapter and streaming stitcher are MIT (libreyolo/models/video_depth_anything/NOTICE). LibreYOLO mirrors the converted checkpoints, tensors unchanged, as LibreYOLO/LibreVideoDepthAnything{s,b,l}-depth with the licence of each upstream size, not gated; metric checkpoints are not hosted.
Video Depth Anything is by ByteDance (DepthAnything/Video-Depth-Anything). The vendored code is Apache-2.0. The licence of the weights depends on the size:
s(Video-Depth-Anything-Small): Apache-2.0, commercial use allowed.bandl(Base and Large): CC BY-NC 4.0, non-commercial only. They ship with a non-commercial notice.
LibreYOLO mirrors the converted checkpoints, tensors unchanged, as
LibreYOLO/LibreVideoDepthAnything{s,b,l}-depth, not gated.
Citation
@article{video_depth_anything,
title={Video Depth Anything: Consistent Depth Estimation for Super-Long Videos},
author={Chen, Sili and Guo, Hengkai and Zhu, Shengnan and Zhang, Feihu and Huang, Zilong and Feng, Jiashi and Kang, Bingyi},
journal={arXiv:2501.12375},
year={2025}
}Скопировано из блока цитирования авторов на странице github.com/DepthAnything/Video-Depth-Anything#citation.