【发布时间】:2019-07-16 17:02:02
【问题描述】:
我目前正在做一个项目,我需要使用yolo3_mobilenet1.0_coco,但输入图像需要从格式(300,300,3) 预处理到(1,3,300,300),这是im.resize((1,3,300,300)) 无法实现的,但有一些特殊的gluoncv 类中的函数为 data.transforms.presets.ssd.load_test("string_containing_image_file name", short=512) 但它们都将 "string of image file name" 作为输入参数,但我想传递具有原始图像作为输入的变量。
有什么功能可以让我做到这一点。因为它必须是我将要传递的变量,因为我不会获取图像文件名。
我已经试过了
x, img = data.transforms.presets.ssd.load_test(im_fname, short=512)
其中im_fname 是(300,300,3) 格式的图像文件名。
但我无法传递文件名,因为图像将从ImageDataGenerator 进入将使用此 yolo 网络的预处理函数。
【问题讨论】:
标签: python numpy tensorflow yolo