def decode_flow(img_str):
# IMPORTANT NOTE: I am now resizing the flow frames before running through
# the preprocessing. I was not doing that earlier (in the master). This leads
# to the 66 number to drop to 63 on HMDB. But it should be fixable by
# re-training with this setup
with tf.variable_scope('decode_flow_frame'):
img = tf.concat(2, [tf.image.decode_jpeg(el, channels=1)
for el in tf.unpack(img_str)])
# Always convert before resize, this is a bug in TF
# https://github.com/tensorflow/tensorflow/issues/1763
img = tf.image.convert_image_dtype(img, dtype=tf.float32)
img = tf.image.resize_images(img, [IM_HT, IM_WD])
return [img]
评论列表
文章目录