Skip to content

Commit

Permalink
Update kitti_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiliangLi authored May 26, 2019
1 parent 19c465f commit 1641374
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/model/utils/kitti_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ def write_detection_results(result_dir, file_number, calib, box_left, pos, dim,
'''One by one write detection results to KITTI format label files.
'''
if result_dir is None: return
result_dir = result_dir + '/data'

# convert the object from cam2 to the cam0 frame
dis_cam02 = calib.t_cam2_cam0[0]
Expand All @@ -453,7 +454,7 @@ def write_detection_results(result_dir, file_number, calib, box_left, pos, dim,

# Write TXT files
if not os.path.exists(result_dir):
os.mkdir(result_dir)
os.makedirs(result_dir)
pred_filename = result_dir + '/' + file_number + '.txt'
with open(pred_filename, 'a') as det_file:
det_file.write(output_str)
Expand Down

0 comments on commit 1641374

Please sign in to comment.