lidavidsh commited on
Commit
680dd09
·
1 Parent(s): 2613ec1

further remove depth output from frontend logic

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -26,8 +26,6 @@ import io
26
  sys.path.append("vggt/")
27
 
28
  from visual_util import predictions_to_glb
29
- from vggt.utils.pose_enc import pose_encoding_to_extri_intri
30
- from vggt.utils.geometry import unproject_depth_map_to_point_map
31
 
32
  # Remote VGGT service host
33
  VGGT_HOST = os.getenv("VGGT_HOST", "134.199.133.34")
@@ -162,17 +160,8 @@ def run_model(target_dir, model=None) -> dict:
162
  else:
163
  predictions[key] = np.array(value)
164
 
165
- # Post-process predictions (same as before)
166
- print("Post-processing predictions...")
167
-
168
- # Generate world points from depth map if not already present
169
- if "world_points_from_depth" not in predictions and "depth" in predictions:
170
- print("Computing world points from depth map...")
171
- depth_map = predictions["depth"]
172
- world_points = unproject_depth_map_to_point_map(
173
- depth_map, predictions["extrinsic"], predictions["intrinsic"]
174
- )
175
- predictions["world_points_from_depth"] = world_points
176
 
177
  return predictions
178
 
 
26
  sys.path.append("vggt/")
27
 
28
  from visual_util import predictions_to_glb
 
 
29
 
30
  # Remote VGGT service host
31
  VGGT_HOST = os.getenv("VGGT_HOST", "134.199.133.34")
 
160
  else:
161
  predictions[key] = np.array(value)
162
 
163
+ # Backend has already computed world_points_from_depth
164
+ print("Received predictions from backend")
 
 
 
 
 
 
 
 
 
165
 
166
  return predictions
167