Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,7 @@ model = torch.hub.load('isl-org/ZoeDepth', "ZoeD_N", pretrained=True).to("cpu").
|
|
33 |
@spaces.GPU(enable_queue=True)
|
34 |
def save_raw_16bit(depth, fpath="raw.png"):
|
35 |
if isinstance(depth, torch.Tensor):
|
36 |
-
depth
|
37 |
-
= depth.squeeze().cpu().numpy()
|
38 |
|
39 |
assert isinstance(depth, np.ndarray), "Depth must be a torch tensor or numpy array"
|
40 |
assert depth.ndim == 2, "Depth must be 2D"
|
|
|
33 |
@spaces.GPU(enable_queue=True)
|
34 |
def save_raw_16bit(depth, fpath="raw.png"):
|
35 |
if isinstance(depth, torch.Tensor):
|
36 |
+
depth = depth.squeeze().cpu().numpy()
|
|
|
37 |
|
38 |
assert isinstance(depth, np.ndarray), "Depth must be a torch tensor or numpy array"
|
39 |
assert depth.ndim == 2, "Depth must be 2D"
|