bartduis commited on
Commit
3671940
·
verified ·
1 Parent(s): f83a7e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -120,6 +120,12 @@ def rayst3r_to_glb(img,depth_dict,mask,max_total_points=10e6,rotated=False):
120
 
121
  rayst3r_points[:,1] = -rayst3r_points[:,1]
122
  rayst3r_points[:,2] = -rayst3r_points[:,2]
 
 
 
 
 
 
123
 
124
  # make all points red
125
  colors = colorize_points_with_turbo_all_dims(rayst3r_points)
@@ -154,8 +160,8 @@ def input_to_glb(outdir,img,depth_dict,mask,rotated=False):
154
 
155
  if rotated:
156
  pts_swapped = np.copy(pts)
157
- pts_swapped[:,0] = pts[:,1]
158
- pts_swapped[:,1] = pts[:,0]
159
  pts = pts_swapped
160
 
161
  pct = trimesh.PointCloud(pts, colors=col.reshape(-1,3))
 
120
 
121
  rayst3r_points[:,1] = -rayst3r_points[:,1]
122
  rayst3r_points[:,2] = -rayst3r_points[:,2]
123
+
124
+ if rotated:
125
+ pts_swapped = np.copy(rayst3r_points)
126
+ pts_swapped[:,0] = -rayst3r_points[:,1]
127
+ pts_swapped[:,1] = -rayst3r_points[:,0]
128
+ rayst3r_points = pts_swapped
129
 
130
  # make all points red
131
  colors = colorize_points_with_turbo_all_dims(rayst3r_points)
 
160
 
161
  if rotated:
162
  pts_swapped = np.copy(pts)
163
+ pts_swapped[:,0] = -pts[:,1]
164
+ pts_swapped[:,1] = -pts[:,0]
165
  pts = pts_swapped
166
 
167
  pct = trimesh.PointCloud(pts, colors=col.reshape(-1,3))