Depth Estimation
Transformers
Safetensors
tipsv2_dpt
feature-extraction
vision
surface-normals
semantic-segmentation
dense-prediction
custom_code
Instructions to use google/tipsv2-so400m14-dpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv2-so400m14-dpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="google/tipsv2-so400m14-dpt", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("google/tipsv2-so400m14-dpt", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv2-so400m14-dpt", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Gabriele commited on
Commit ·
982002b
1
Parent(s): 4482ee7
Use cat photo, add print statements to code examples
Browse files
README.md
CHANGED
|
@@ -29,7 +29,7 @@ import requests
|
|
| 29 |
model = AutoModel.from_pretrained("google/tipsv2-so400m14-dpt", trust_remote_code=True)
|
| 30 |
model.eval().cuda()
|
| 31 |
|
| 32 |
-
url = "https://raw.githubusercontent.com/google-deepmind/tips/main/scenic/images/
|
| 33 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 34 |
transform = transforms.Compose([transforms.Resize((448, 448)), transforms.ToTensor()])
|
| 35 |
pixel_values = transform(image).unsqueeze(0).cuda()
|
|
|
|
| 29 |
model = AutoModel.from_pretrained("google/tipsv2-so400m14-dpt", trust_remote_code=True)
|
| 30 |
model.eval().cuda()
|
| 31 |
|
| 32 |
+
url = "https://raw.githubusercontent.com/google-deepmind/tips/main/scenic/images/example_image_2.jpg"
|
| 33 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 34 |
transform = transforms.Compose([transforms.Resize((448, 448)), transforms.ToTensor()])
|
| 35 |
pixel_values = transform(image).unsqueeze(0).cuda()
|