张量流队列运行器不保留订单

时间:2018-08-02 14:01:19

标签: tensorflow queue

对于我的网,我需要从两帧立体相机输入4张图像。在加载过程中的某些地方,图像有时会在摄像机之间混洗,即self.right_image_batch中的图像实际上是self.image_left_next,反之亦然。

我该如何解决?

代码和信息:

filenames_file具有4个路径,每个路径之间用空格分隔,对应于:left right left_next right_next num_threads为1

db.eventPart.aggregate([
    { "$match": { "eventName": "Ebullienza" } },
    {
        "$lookup": {
            "from": "Participants",
            "localField": "rollNo",
            "foreignField": "rollNo",
            "as": "Participants"
        }
    }
])

read_image:

input_queue = tf.train.string_input_producer([filenames_file], shuffle=False)
line_reader = tf.TextLineReader()
_, line = line_reader.read(input_queue)
split_line = tf.string_split([line]).values

left_image_path  = tf.string_join([self.data_path, split_line[0]],'/')
right_image_path = tf.string_join([self.data_path, split_line[1]],'/')
left_image_path_next  = tf.string_join([self.data_path, split_line[2]],'/')
right_image_path_next = tf.string_join([self.data_path, split_line[3]],'/')

left_image = self.read_image(left_image_path)
left_image_next  = self.read_image(left_image_path_next)
right_image = self.read_image(right_image_path)
right_image_next= self.read_image(right_image_path_next)

self.left_image_batch, self.left_image_batch_next, self.right_image_batch, self.right_image_batch_next = tf.train.shuffle_batch([left_image, left_image_next, right_image, right_image_next], params.batch_size, capacity, min_after_dequeue, params.num_threads)

0 个答案:

没有答案