Depth Estimation
Transformers
Safetensors
video_depth_anything
feature-extraction
video-depth-anything
video
custom_code
Instructions to use bigshanedogg/Metric-Video-Depth-Anything-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigshanedogg/Metric-Video-Depth-Anything-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="bigshanedogg/Metric-Video-Depth-Anything-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigshanedogg/Metric-Video-Depth-Anything-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download processing_video_depth_anything.py from bigshanedogg/Metric-Video-Depth-Anything-Base: direct link, hf CLI and curl.
- Browser
- Download file 694 Bytes
-
https://huggingface.co/bigshanedogg/Metric-Video-Depth-Anything-Base/resolve/main/processing_video_depth_anything.py
- Command line
-
hf download hf://bigshanedogg/Metric-Video-Depth-Anything-Base/processing_video_depth_anything.py
-
curl -L -o processing_video_depth_anything.py https://huggingface.co/bigshanedogg/Metric-Video-Depth-Anything-Base/resolve/main/processing_video_depth_anything.py
694 Bytes
| """Video Depth Anything processor: ``VideoDepthAnythingImageProcessor`` (the official per-frame transform) as its only part.""" | |
| from transformers.processing_utils import ProcessorMixin | |
| class VideoDepthAnythingProcessor(ProcessorMixin): | |
| attributes = ["image_processor"] | |
| def __init__(self, image_processor=None, **kwargs): | |
| super().__init__(image_processor, **kwargs) | |
| def __call__(self, videos=None, **kwargs): | |
| return self.image_processor(videos, **kwargs) | |
| def post_process_depth_estimation(self, outputs, target_sizes=None): | |
| return self.image_processor.post_process_depth_estimation(outputs, target_sizes) | |
| __all__ = ["VideoDepthAnythingProcessor"] | |