Depth Estimation
Transformers
Safetensors
camera_depth_model
feature-extraction
camera-depth-model
rgbd
robotics
custom_code
Instructions to use bigshanedogg/Camera-Depth-Model-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigshanedogg/Camera-Depth-Model-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="bigshanedogg/Camera-Depth-Model-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigshanedogg/Camera-Depth-Model-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download processing_camera_depth_model.py from bigshanedogg/Camera-Depth-Model-Base: direct link, hf CLI and curl.
- Browser
- Download file 714 Bytes
-
https://huggingface.co/bigshanedogg/Camera-Depth-Model-Base/resolve/main/processing_camera_depth_model.py
- Command line
-
hf download hf://bigshanedogg/Camera-Depth-Model-Base/processing_camera_depth_model.py
-
curl -L -o processing_camera_depth_model.py https://huggingface.co/bigshanedogg/Camera-Depth-Model-Base/resolve/main/processing_camera_depth_model.py
714 Bytes
| """Camera Depth Model processor: ``CameraDepthModelImageProcessor`` (infer.py load_images + image2tensor) as its only part.""" | |
| from transformers.processing_utils import ProcessorMixin | |
| class CameraDepthModelProcessor(ProcessorMixin): | |
| attributes = ["image_processor"] | |
| def __init__(self, image_processor=None, **kwargs): | |
| super().__init__(image_processor, **kwargs) | |
| def __call__(self, images=None, depth=None, **kwargs): | |
| return self.image_processor(images, depth=depth, **kwargs) | |
| def post_process_depth_estimation(self, outputs, target_sizes=None): | |
| return self.image_processor.post_process_depth_estimation(outputs, target_sizes) | |
| __all__ = ["CameraDepthModelProcessor"] | |