Depth Estimation
Transformers
Safetensors
tipsv2_dpt
feature-extraction
vision
surface-normals
semantic-segmentation
dense-prediction
custom_code
Instructions to use google/tipsv2-l14-dpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv2-l14-dpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="google/tipsv2-l14-dpt", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("google/tipsv2-l14-dpt", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv2-l14-dpt", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Remove image_encoder.py and update configuration_dpt.py
Browse filesRemoves the unused image_encoder.py file and uploads configuration_dpt.py.
21 unmodified lines2223242526272810 unmodified lines3940414243444521 unmodified linesneck_hidden_sizes=(96, 192, 384, 768),fusion_hidden_size=256,reassemble_factors=(4, 2, 1, 0.5),readout_act="gelu_pytorch_tanh",num_depth_bins=256,min_depth=1e-3,max_depth=10.0,10 unmodified linesself.channels = fusion_hidden_sizeself.post_process_channels = list(neck_hidden_sizes)self.block_indices = [out_index - 1 for out_index in out_indices]self.readout_type = "project"self.num_depth_bins = num_depth_binsself.min_depth = min_depthself.max_depth = max_depth21 unmodified lines2223242526272810 unmodified lines3940414243444521 unmodified linesneck_hidden_sizes=(96, 192, 384, 768),fusion_hidden_size=256,reassemble_factors=(4, 2, 1, 0.5),readout_type="project",num_depth_bins=256,min_depth=1e-3,max_depth=10.0,10 unmodified linesself.channels = fusion_hidden_sizeself.post_process_channels = list(neck_hidden_sizes)self.block_indices = [out_index - 1 for out_index in out_indices]self.readout_type = readout_typeself.num_depth_bins = num_depth_binsself.min_depth = min_depthself.max_depth = max_depth
configuration_dpt.py+2-2