This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
parser = argparse.ArgumentParser(description='My Program') | |
# Flag without arguments, False if not provided | |
parser.add_argument('--from-script','-s', dest='started_from_script',action='store_true', help='') | |
args = parser.parse_args() | |
print(args.started_from_script) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Helper code to untangle tf.image.crop_and_resize when performing a simple crop. Not optimized for speed. | |
Arguments: | |
tf_img -- Input tensorflow image | |
output_size -- Output size in pixels (w,h) | |
crop_yx -- Top left coordinate of crop, (y,x) | |
crop_size -- Size of area to include in crop (w,h) | |
Returns: |