This file contains 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
def create_tf_example(example, path_root): | |
# import image | |
f_image = Image.open(path_root + example["image_name"]) | |
# get width and height of image | |
width, height = f_image.size | |
# crop image randomly around bouding box within a 0.15 * bbox extra range | |
if FLAGS.evaluation_status != "test": |