hugoycj commited on
Commit
4f0052e
·
1 Parent(s): 1f11767

Fix small bugs

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,13 +29,13 @@ def plot_cameras(ax, cameras, color: str = "blue"):
29
  Plots a set of `cameras` objects into the maplotlib axis `ax` with
30
  color `color`.
31
  """
32
- cam_wires_canonical = get_camera_wireframe().cuda()[None]
33
  cam_trans = cameras.get_world_to_view_transform().inverse()
34
  cam_wires_trans = cam_trans.transform_points(cam_wires_canonical)
35
  plot_handles = []
36
  for wire in cam_wires_trans:
37
  # the Z and Y axes are flipped intentionally here!
38
- x_, z_, y_ = wire.detach().cpu().numpy().T.astype(float)
39
  (h,) = ax.plot(x_, y_, z_, color=color, linewidth=0.3)
40
  plot_handles.append(h)
41
  return plot_handles
 
29
  Plots a set of `cameras` objects into the maplotlib axis `ax` with
30
  color `color`.
31
  """
32
+ cam_wires_canonical = get_camera_wireframe()[None]
33
  cam_trans = cameras.get_world_to_view_transform().inverse()
34
  cam_wires_trans = cam_trans.transform_points(cam_wires_canonical)
35
  plot_handles = []
36
  for wire in cam_wires_trans:
37
  # the Z and Y axes are flipped intentionally here!
38
+ x_, z_, y_ = wire.detach().numpy().T.astype(float)
39
  (h,) = ax.plot(x_, y_, z_, color=color, linewidth=0.3)
40
  plot_handles.append(h)
41
  return plot_handles