Depth Estimation
Transformers
Safetensors
tipsv2_dpt
feature-extraction
vision
surface-normals
semantic-segmentation
dense-prediction
custom_code
Instructions to use google/tipsv2-b14-dpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv2-b14-dpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="google/tipsv2-b14-dpt", trust_remote_code=True)# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("google/tipsv2-b14-dpt", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv2-b14-dpt", trust_remote_code=True) - 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.
- configuration_dpt.py +2 -2
configuration_dpt.py
CHANGED
|
@@ -22,7 +22,7 @@ class TIPSv2DPTConfig(PretrainedConfig):
|
|
| 22 |
neck_hidden_sizes=(96, 192, 384, 768),
|
| 23 |
fusion_hidden_size=256,
|
| 24 |
reassemble_factors=(4, 2, 1, 0.5),
|
| 25 |
-
|
| 26 |
num_depth_bins=256,
|
| 27 |
min_depth=1e-3,
|
| 28 |
max_depth=10.0,
|
|
@@ -39,7 +39,7 @@ class TIPSv2DPTConfig(PretrainedConfig):
|
|
| 39 |
self.channels = fusion_hidden_size
|
| 40 |
self.post_process_channels = list(neck_hidden_sizes)
|
| 41 |
self.block_indices = [out_index - 1 for out_index in out_indices]
|
| 42 |
-
self.readout_type =
|
| 43 |
self.num_depth_bins = num_depth_bins
|
| 44 |
self.min_depth = min_depth
|
| 45 |
self.max_depth = max_depth
|
|
|
|
| 22 |
neck_hidden_sizes=(96, 192, 384, 768),
|
| 23 |
fusion_hidden_size=256,
|
| 24 |
reassemble_factors=(4, 2, 1, 0.5),
|
| 25 |
+
readout_type="project",
|
| 26 |
num_depth_bins=256,
|
| 27 |
min_depth=1e-3,
|
| 28 |
max_depth=10.0,
|
|
|
|
| 39 |
self.channels = fusion_hidden_size
|
| 40 |
self.post_process_channels = list(neck_hidden_sizes)
|
| 41 |
self.block_indices = [out_index - 1 for out_index in out_indices]
|
| 42 |
+
self.readout_type = readout_type
|
| 43 |
self.num_depth_bins = num_depth_bins
|
| 44 |
self.min_depth = min_depth
|
| 45 |
self.max_depth = max_depth
|