Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test_queue=tf.train.string_input_producer(images)
- reader=tf.WholeFileReader()
- key , image_data = reader.read(test_queue)
- decoded_image = tf.image.decode_jpeg(image_data, channels=MODEL_INPUT_DEPTH)
- init_op=tf.initialize_all_variables()
- with tf.Session() as sess:
- sess.run(init_op)
- coord = tf.train.Coordinator()
- threads = tf.train.start_queue_runners(sess=sess,coord=coord)
- for i in range(len(images)):
- try:
- image_tensor = decoded_image.eval()
- shape=image_tensor.shape
- if shape[0]<FLAGS.min_width or shape[1]<FLAGS.min_width:
- print "bad too small ",shape[0],"x",shape[1]," ",images[i]
- except Exception as e:
- print "bad some other reason above" + images[i]
- coord.request_stop()
- coord.join(threads)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement