BonanDing commited on
Commit
102530f
·
1 Parent(s): e742276

Remove stale DeMemWM pose debug comments

Browse files
algorithms/dememwm/pose_prediction.py CHANGED
@@ -223,7 +223,6 @@ class PosePrediction(BasePytorchAlgo):
223
  # _, r_idx = torch.topk(overlap_ratio / tensor_max_with_number((frame_idx[curr_frame] - frame_idx[:curr_frame]), 10), k=1, dim=0)
224
 
225
  # if curr_frame >=93:
226
- # import pdb;pdb.set_trace()
227
 
228
  # start_time = time.time()
229
  cos_sim = F.cosine_similarity(xs_pred.to(r_idx.device)[r_idx[:, range(in_fov1.shape[1])],
@@ -256,7 +255,6 @@ class PosePrediction(BasePytorchAlgo):
256
  # _, r_idx = torch.topk(overlap_ratio / tensor_max_with_number((frame_idx[curr_frame] - frame_idx[:curr_frame]), 10), k=1, dim=0)
257
 
258
  # if curr_frame >=93:
259
- # import pdb;pdb.set_trace()
260
 
261
  # start_time = time.time()
262
  cos_sim = F.cosine_similarity(xs_pred.to(r_idx.device)[r_idx[:, range(in_fov1.shape[1])],
@@ -274,7 +272,6 @@ class PosePrediction(BasePytorchAlgo):
274
  xs_pred = torch.cat([xs_pred, xs_pred[random_idx[:,range(xs_pred.shape[1])], range(xs_pred.shape[1])].clone()], 0)
275
 
276
  if condition_similar_length:
277
- # import pdb;pdb.set_trace()
278
  padding = torch.zeros((condition_similar_length,) + conditions.shape[1:], device=conditions.device, dtype=conditions.dtype)
279
  input_condition = torch.cat([conditions[start_frame : curr_frame + horizon], padding], dim=0)
280
  if self.pose_cond_dim:
@@ -295,7 +292,6 @@ class PosePrediction(BasePytorchAlgo):
295
  else:
296
  # print(curr_frame-start_frame)
297
  # input_pose_condition = torch.cat([c2w_mat[start_frame : curr_frame + horizon], c2w_mat[random_idx[:,range(xs_pred.shape[1])], range(xs_pred.shape[1])]], dim=0).clone()
298
- # import pdb;pdb.set_trace()
299
  if self.last_frame_refer:
300
  input_pose_condition = torch.cat([c2w_mat[start_frame : curr_frame + horizon], c2w_mat[-1:]], dim=0).clone()
301
  else:
@@ -354,12 +350,10 @@ class PosePrediction(BasePytorchAlgo):
354
  )
355
 
356
  # if curr_frame > 14:
357
- # import pdb;pdb.set_trace()
358
 
359
  # if xs_pred_back is not None:
360
  # xs_pred = torch.cat([xs_pred[:6], xs_pred_back[6:12], xs_pred[6:]], dim=0)
361
 
362
- # import pdb;pdb.set_trace()
363
  if condition_similar_length: # and curr_frame+1!=n_frames:
364
  xs_pred = xs_pred[:-condition_similar_length]
365
 
 
223
  # _, r_idx = torch.topk(overlap_ratio / tensor_max_with_number((frame_idx[curr_frame] - frame_idx[:curr_frame]), 10), k=1, dim=0)
224
 
225
  # if curr_frame >=93:
 
226
 
227
  # start_time = time.time()
228
  cos_sim = F.cosine_similarity(xs_pred.to(r_idx.device)[r_idx[:, range(in_fov1.shape[1])],
 
255
  # _, r_idx = torch.topk(overlap_ratio / tensor_max_with_number((frame_idx[curr_frame] - frame_idx[:curr_frame]), 10), k=1, dim=0)
256
 
257
  # if curr_frame >=93:
 
258
 
259
  # start_time = time.time()
260
  cos_sim = F.cosine_similarity(xs_pred.to(r_idx.device)[r_idx[:, range(in_fov1.shape[1])],
 
272
  xs_pred = torch.cat([xs_pred, xs_pred[random_idx[:,range(xs_pred.shape[1])], range(xs_pred.shape[1])].clone()], 0)
273
 
274
  if condition_similar_length:
 
275
  padding = torch.zeros((condition_similar_length,) + conditions.shape[1:], device=conditions.device, dtype=conditions.dtype)
276
  input_condition = torch.cat([conditions[start_frame : curr_frame + horizon], padding], dim=0)
277
  if self.pose_cond_dim:
 
292
  else:
293
  # print(curr_frame-start_frame)
294
  # input_pose_condition = torch.cat([c2w_mat[start_frame : curr_frame + horizon], c2w_mat[random_idx[:,range(xs_pred.shape[1])], range(xs_pred.shape[1])]], dim=0).clone()
 
295
  if self.last_frame_refer:
296
  input_pose_condition = torch.cat([c2w_mat[start_frame : curr_frame + horizon], c2w_mat[-1:]], dim=0).clone()
297
  else:
 
350
  )
351
 
352
  # if curr_frame > 14:
 
353
 
354
  # if xs_pred_back is not None:
355
  # xs_pred = torch.cat([xs_pred[:6], xs_pred_back[6:12], xs_pred[6:]], dim=0)
356
 
 
357
  if condition_similar_length: # and curr_frame+1!=n_frames:
358
  xs_pred = xs_pred[:-condition_similar_length]
359