ds = ds.repeat(n_epoch)
ds = ds.prefetch(buffer_size=2048)
ds = ds.batch(batch_size)
value = ds.make_one_shot_iterator().get_next()
sess = tf.InteractiveSession()
//// get a batch of images (after data augmentation)
After Change
im, annbyte = next(iter(ds))
print("took {}s".format(time.time() - st))
im = im.numpy()
ann = []
for a in annbyte:
a = a.numpy().decode()
ann.append(json.loads(a))
//// save all images
for i in range(len(im)):
print(ann[i][1])
tl.vis.draw_boxes_and_labels_to_image(im[i] * 255, ann[i][0], ann[i][1], [], classes,
True, save_name="_bbox_vis_%d.png" % i)