Skip to content

Commit

Permalink
Update get_depth_map
Browse files Browse the repository at this point in the history
  • Loading branch information
lucataco committed Sep 12, 2023
1 parent 6c93b5b commit 6d137da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Binary file modified output.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def get_depth_map(self, image):
with torch.no_grad(), torch.autocast("cuda"):
depth_map = self.depth_estimator(image).predicted_depth

height, width = image.shape[2], image.shape[3]

depth_map = torch.nn.functional.interpolate(
depth_map.unsqueeze(1),
size=(1024, 1024),
size=(height, width),
mode="bicubic",
align_corners=False,
)
Expand Down
Binary file added salon.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6d137da

Please sign in to comment.