def METHOD_NAME(argv):
  if len(argv) > 1:
    raise tf.app.UsageError("Too many command-line arguments.")
  preds, gts = convert_detections(FLAGS.decoder_path)
  if not tf.io.gfile.exists(FLAGS.output_dir):
    tf.io.gfile.mkdir(FLAGS.output_dir)
  # Write the predictions and gts into individual files.
  #
  # The outputs can then be passed to the official metrics implementations and
  # server.
  with tf.io.gfile.GFile(os.path.join(FLAGS.output_dir, "preds.bin"), "w") as f:
    f.write(preds.SerializeToString())
  with tf.io.gfile.GFile(os.path.join(FLAGS.output_dir, "gts.bin"), "w") as f:
    f.write(gts.SerializeToString())