Update README.md
Browse files
README.md
CHANGED
@@ -29,7 +29,7 @@ from depth_anything.dpt import DepthAnything
|
|
29 |
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
|
30 |
from torchvision.transforms import Compose
|
31 |
|
32 |
-
model = DepthAnything.from_pretrained("LiheYoung/
|
33 |
|
34 |
transform = Compose([
|
35 |
Resize(
|
@@ -45,8 +45,9 @@ transform = Compose([
|
|
45 |
PrepareForNet(),
|
46 |
])
|
47 |
|
48 |
-
|
49 |
-
image =
|
|
|
50 |
image = torch.from_numpy(image).unsqueeze(0)
|
51 |
|
52 |
depth = model(image)
|
|
|
29 |
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
|
30 |
from torchvision.transforms import Compose
|
31 |
|
32 |
+
model = DepthAnything.from_pretrained("LiheYoung/depth_anything_vitl14")
|
33 |
|
34 |
transform = Compose([
|
35 |
Resize(
|
|
|
45 |
PrepareForNet(),
|
46 |
])
|
47 |
|
48 |
+
image = Image.open("...")
|
49 |
+
image = np.array(image) / 255.0
|
50 |
+
image = transform({'image': image})['image']
|
51 |
image = torch.from_numpy(image).unsqueeze(0)
|
52 |
|
53 |
depth = model(image)
|