Reputation: 1533
left_name, right_name, occ_name = tf.train.slice_input_producer([left, right, label], shuffle=False)
l = tf.read_file(left_name)
l = tf.image.decode_png(l, channels=3)
r = tf.read_file(right_name)
r = tf.image.decode_png(r, channels=3)
o = tf.read_file(occ_name)
o = tf.image.decode_png(o, channels=1)
l_batch, r_batch, o_batch = tf.train.batch([l, r, o], batch_size=3)
Can I only use that if all images have the same size?
Upvotes: 0
Views: 51
Reputation: 1088
Yes, the image tensors must be the same size before you batch. You can achieve this with tf.image.resize_image_with_crop_and_pad
. There may be other functions in tf.image
that may be useful to you as well.
Upvotes: 1