Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import argparse
  2.  
  3. def count_objects(file_path: str):
  4.     # Your algorithm
  5.     pass
  6.  
  7.  
  8. def parse_args():
  9.     """Parse command line arguments.
  10.    Returns:
  11.        Arguments
  12.    """
  13.     parser = argparse.ArgumentParser(
  14.         description="Detects object in an image."
  15.     )
  16.     parser.add_argument(
  17.         "--file_path",
  18.         type=str,
  19.         default="somefile.jpg",
  20.         help="Path to an image file.",
  21.     )
  22.  
  23.     return parser.parse_args()
  24.  
  25.  
  26. if __name__ == '__main__':
  27.     args = parse_args()
  28.     count_objects(args.file_path)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement