Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,12 +18,6 @@ from ppd.utils.depth2pcd import depth2pcd
|
|
| 18 |
from moge.model.v2 import MoGeModel
|
| 19 |
from ppd.models.ppd import PixelPerfectDepth
|
| 20 |
|
| 21 |
-
try:
|
| 22 |
-
import spaces
|
| 23 |
-
HUGGINFACE_SPACES_INSTALLED = True
|
| 24 |
-
except ImportError:
|
| 25 |
-
HUGGINFACE_SPACES_INSTALLED = False
|
| 26 |
-
|
| 27 |
css = """
|
| 28 |
#img-display-container {
|
| 29 |
max-height: 100vh;
|
|
@@ -112,8 +106,7 @@ def main(share=True):
|
|
| 112 |
tmp_ply = tempfile.NamedTemporaryFile(suffix='.ply', delete=False)
|
| 113 |
o3d.io.write_point_cloud(tmp_ply.name, pcd)
|
| 114 |
|
| 115 |
-
depth =
|
| 116 |
-
depth = depth.cpu().numpy()
|
| 117 |
|
| 118 |
# save raw depth (npy)
|
| 119 |
tmp_raw_depth = tempfile.NamedTemporaryFile(suffix='.npy', delete=False)
|
|
|
|
| 18 |
from moge.model.v2 import MoGeModel
|
| 19 |
from ppd.models.ppd import PixelPerfectDepth
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
css = """
|
| 22 |
#img-display-container {
|
| 23 |
max-height: 100vh;
|
|
|
|
| 106 |
tmp_ply = tempfile.NamedTemporaryFile(suffix='.ply', delete=False)
|
| 107 |
o3d.io.write_point_cloud(tmp_ply.name, pcd)
|
| 108 |
|
| 109 |
+
depth = cv2.resize(ppd_depth, (W, H), interpolation=cv2.INTER_LINEAR)
|
|
|
|
| 110 |
|
| 111 |
# save raw depth (npy)
|
| 112 |
tmp_raw_depth = tempfile.NamedTemporaryFile(suffix='.npy', delete=False)
|