Skip to content

Commit

Permalink
Remove more dead code in view_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyu committed Dec 15, 2021
1 parent 49c8bd6 commit 61a474e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions opt/scripts/view_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,10 @@ def look_for_dir(cands, required=True):
image_files = sorted([x for x in os.listdir(images_dir) if x.lower().endswith('.png') or x.lower().endswith('.jpg')], key=sort_key)

all_poses = []
pnum, seg_begin = None, 0
for i, pose_file in enumerate(pose_files):
pose = np.loadtxt(path.join(pose_dir, pose_file)).reshape(4, 4)
splt = path.splitext(pose_file)[0].split('_')
num = int(splt[1] if len(splt) > 1 else splt[0])
if pnum is not None and num - pnum > 1 and seg_begin < num:
seg_begin = i
pnum = num
# splt = path.splitext(pose_file)[0].split('_')
# num = int(splt[1] if len(splt) > 1 else splt[0])
all_poses.append(pose)
all_poses = np.stack(all_poses)

Expand Down

0 comments on commit 61a474e

Please sign in to comment.