Update Model Card: Use `DepthProImageProcessor` instead of `DepthProImageProcessorFast`
#7
by geetu040 - opened
README.md
CHANGED
|
@@ -66,14 +66,14 @@ Use the code below to get started with the model.
|
|
| 66 |
import requests
|
| 67 |
from PIL import Image
|
| 68 |
import torch
|
| 69 |
-
from transformers import
|
| 70 |
|
| 71 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 72 |
|
| 73 |
url = 'https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg'
|
| 74 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 75 |
|
| 76 |
-
image_processor =
|
| 77 |
model = DepthProForDepthEstimation.from_pretrained("apple/DepthPro-hf").to(device)
|
| 78 |
|
| 79 |
inputs = image_processor(images=image, return_tensors="pt").to(device)
|
|
|
|
| 66 |
import requests
|
| 67 |
from PIL import Image
|
| 68 |
import torch
|
| 69 |
+
from transformers import DepthProImageProcessor, DepthProForDepthEstimation
|
| 70 |
|
| 71 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 72 |
|
| 73 |
url = 'https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg'
|
| 74 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 75 |
|
| 76 |
+
image_processor = DepthProImageProcessor.from_pretrained("apple/DepthPro-hf")
|
| 77 |
model = DepthProForDepthEstimation.from_pretrained("apple/DepthPro-hf").to(device)
|
| 78 |
|
| 79 |
inputs = image_processor(images=image, return_tensors="pt").to(device)
|