Created
August 16, 2017 10:50
-
-
Save tomrunia/700585a0d44dff4606f26b7b50856932 to your computer and use it in GitHub Desktop.
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
filename_queue = tf.FIFOQueue(100000, [tf.string], shapes=[[]]) | |
# ... | |
reader = tf.WholeFileReader() | |
image_filename, image_raw = reader.read(self._filename_queue) | |
image = tf.image.decode_jpeg(image_raw, channels=3) | |
# Image preprocessing | |
image_preproc = ... | |
# Read a batch of preprocessing images from queue | |
batch_images, batch_filenames = tf.train.batch( | |
[image_preproc, image_filename], batch_size, num_threads=num_threads, | |
allow_smaller_final_batch=True) | |
# ... | |
np_images, filenames = sess.run([batch_images, batch_filenames]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment