Skip to content

Instantly share code, notes, and snippets.

@GTimothee
Last active June 15, 2018 13:04
Show Gist options
  • Save GTimothee/a6c23a95ee65b05fca6aa3299848c7b8 to your computer and use it in GitHub Desktop.
Save GTimothee/a6c23a95ee65b05fca6aa3299848c7b8 to your computer and use it in GitHub Desktop.
import argparse
def manage_args():
parser = argparse.ArgumentParser()
#positional args
parser.add_argument("input_img", help="input image which mask has been computed", type=str)
parser.add_argument("input_mask", help="semantic segmentation mask computed from the input image", type=str)
parser.add_argument("output_dir", help="output directory where the result will be saved", type=str)
'''
->>>>>>>>> avec default value
parser.add_argument("-od", "--outputDir", help="dataset path", nargs='?', const="JMC_voc_dataset/", type=str)
'''
#optional args
parser.add_argument("-v", "--verbose", help="activate verbose mode", action="store_true")
args = parser.parse_args()
return args
if __name__ == "__main__":
#get arguments
args = manage_args()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment