Depth Estimation
Transformers
Safetensors
prompt_depth_anything
prompt-depth-anything
metric-depth
custom_code
Instructions to use bigshanedogg/Prompt-Depth-Anything-Small-Transparent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigshanedogg/Prompt-Depth-Anything-Small-Transparent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="bigshanedogg/Prompt-Depth-Anything-Small-Transparent", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForDepthEstimation processor = AutoImageProcessor.from_pretrained("bigshanedogg/Prompt-Depth-Anything-Small-Transparent", trust_remote_code=True) model = AutoModelForDepthEstimation.from_pretrained("bigshanedogg/Prompt-Depth-Anything-Small-Transparent", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download processing_prompt_depth_anything.py from bigshanedogg/Prompt-Depth-Anything-Small-Transparent: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/bigshanedogg/Prompt-Depth-Anything-Small-Transparent/resolve/main/processing_prompt_depth_anything.py
- Command line
-
hf download hf://bigshanedogg/Prompt-Depth-Anything-Small-Transparent/processing_prompt_depth_anything.py
-
curl -L -o processing_prompt_depth_anything.py https://huggingface.co/bigshanedogg/Prompt-Depth-Anything-Small-Transparent/resolve/main/processing_prompt_depth_anything.py
585 Bytes
| """Prompt Depth Anything processor: ``PromptDepthAnythingImageProcessor`` (the official load_image / load_depth) as its | |
| only part.""" | |
| from transformers.processing_utils import ProcessorMixin | |
| class PromptDepthAnythingProcessor(ProcessorMixin): | |
| attributes = ["image_processor"] | |
| def __init__(self, image_processor=None, **kwargs): | |
| super().__init__(image_processor, **kwargs) | |
| def __call__(self, images=None, prompt_depth=None, **kwargs): | |
| return self.image_processor(images, prompt_depth=prompt_depth, **kwargs) | |
| __all__ = ["PromptDepthAnythingProcessor"] | |