def read_my_file_format(self, filename_queue):
reader = tf.TextLineReader()
key, record_string = reader.read(filename_queue)
# "a" means representative value to indicate type for csv cell value.
image_file_name, depth_file_name = tf.decode_csv(record_string, [["a"], ["a"]])
image_png_data = tf.read_file(image_file_name)
depth_png_data = tf.read_file(depth_file_name)
# channels=1 means image is read as gray-scale
image_decoded = tf.image.decode_png(image_png_data, channels=1)
image_decoded.set_shape([512, 512, 1])
depth_decoded = tf.image.decode_png(depth_png_data, channels=1)
depth_decoded.set_shape([512, 512, 1])
return image_decoded, depth_decoded
评论列表
文章目录