Skip to content

Commit

Permalink
Fix bug with writing output
Browse files Browse the repository at this point in the history
  • Loading branch information
iantp committed Dec 6, 2019
1 parent 3dca8fa commit 08ec297
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/evaluate_lanenet_on_tusimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def test_lanenet_batch(src_dir, weights_path, save_dir):
lane_predictions.append(predictions)

image_lane_predictions[input_image_name] = lane_predictions
json.dump(image_lane_predictions, 'predictions.json')
with open('predictions.json') as predictions_file:
json.dump(image_lane_predictions, predictions_file)

return

Expand Down
27 changes: 27 additions & 0 deletions tools/evaluate_performance_tusimple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import argparse


def init_args():
"""
:return:
"""
parser = argparse.ArgumentParser()
parser.add_argument('--predictions_dir', type=str, help='The source tusimple lane test data dir')
parser.add_argument('--labels_dir', type=str, help='The model weights path')

return parser.parse_args()


if __name__ == '__main__':
"""
test code
"""
# init args
args = init_args()

test_lanenet_batch(
src_dir=args.image_dir,
weights_path=args.weights_path,
save_dir=args.save_dir
)

0 comments on commit 08ec297

Please sign in to comment.