Spaces:
Running
on
Zero
Running
on
Zero
fix input of inference
Browse files
app.py
CHANGED
@@ -20,9 +20,9 @@ import time
|
|
20 |
|
21 |
from visual_util import predictions_to_glb
|
22 |
from streamvggt.models.streamvggt import StreamVGGT
|
23 |
-
from
|
24 |
-
from
|
25 |
-
from
|
26 |
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
|
@@ -73,8 +73,9 @@ def run_model(target_dir, model) -> dict:
|
|
73 |
|
74 |
frames = []
|
75 |
for i in range(images.shape[0]):
|
|
|
76 |
frame = {
|
77 |
-
"img":
|
78 |
}
|
79 |
frames.append(frame)
|
80 |
|
|
|
20 |
|
21 |
from visual_util import predictions_to_glb
|
22 |
from streamvggt.models.streamvggt import StreamVGGT
|
23 |
+
from streamvggt.utils.load_fn import load_and_preprocess_images
|
24 |
+
from streamvggt.utils.pose_enc import pose_encoding_to_extri_intri
|
25 |
+
from streamvggt.utils.geometry import unproject_depth_map_to_point_map
|
26 |
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
|
|
|
73 |
|
74 |
frames = []
|
75 |
for i in range(images.shape[0]):
|
76 |
+
image = images[i].unsqueeze(0)
|
77 |
frame = {
|
78 |
+
"img": image
|
79 |
}
|
80 |
frames.append(frame)
|
81 |
|