Depth Estimation
Transformers
Safetensors
depth_anything_v1
feature-extraction
depth-anything
custom_code
Instructions to use bigshanedogg/Depth-Anything-V1-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigshanedogg/Depth-Anything-V1-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="bigshanedogg/Depth-Anything-V1-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigshanedogg/Depth-Anything-V1-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 670 Bytes
1e46918 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | """Depth Anything (v1) processor: ``DepthAnythingV1ImageProcessor`` (run.py's transform) as its only part."""
from transformers.processing_utils import ProcessorMixin
class DepthAnythingV1Processor(ProcessorMixin):
attributes = ["image_processor"]
def __init__(self, image_processor=None, **kwargs):
super().__init__(image_processor, **kwargs)
def __call__(self, images=None, **kwargs):
return self.image_processor(images, **kwargs)
def post_process_depth_estimation(self, outputs, target_sizes=None):
return self.image_processor.post_process_depth_estimation(outputs, target_sizes)
__all__ = ["DepthAnythingV1Processor"]
|