Skip to content

Instantly share code, notes, and snippets.

View SebastienEske's full-sized avatar

Sebastien Eskenazi SebastienEske

View GitHub Profile
@joannapurosto
joannapurosto / deep_fashion_to_tfrecord.py
Created June 8, 2018 10:52
deep_fashion_to_tfrecord.py
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":