generate_tfrecord.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:unsupervised-2017-cvprw 作者: imatge-upc 项目源码 文件源码
def __init__(self):
        # Create a single Session to run all image coding calls.
        self._sess = tf.Session()

        # Initializes function that decodes video
        self._video_path = tf.placeholder(dtype=tf.string)
        self._decode_video = decode_video(self._video_path)

        # Initialize function that resizes a frame
        self._resize_video_data = tf.placeholder(dtype=tf.float32, shape=[None, None, None, 3])

        # Initialize function to JPEG-encode a frame
        self._raw_frame = tf.placeholder(dtype=tf.uint8, shape=[None, None, 3])
        self._raw_mask  = tf.placeholder(dtype=tf.uint8, shape=[None, None, 1])
        self._encode_frame = tf.image.encode_jpeg(self._raw_frame, quality=100)
        self._encode_mask  = tf.image.encode_png(self._raw_mask)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号