video.py 文件源码

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

项目:ssta-captioning 作者: Yugnaynehc 项目源码 文件源码
def preprocess_frame(image, target_height=224, target_width=224):
    image = resize_frame(image, target_height, target_width)
    image = skimage.img_as_ubyte(image).astype(np.float32)
    # ???ILSVRC???????????BGR???
    image -= np.array([103.939, 116.779, 123.68])
    # ?BGR??????RGB????????????caffe????????RGB??
    image = image[:, :, ::-1]
    return image
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号