neural.py 文件源码

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

项目:ml-traffic 作者: Zepheus 项目源码 文件源码
def postprocess(imgs, size, grayscale=False):
    print("Postprocessing images and resize (at %d)" % size)
    keyname = ('gray_%d' if grayscale else 'color_%d') % size
    for img in imgs:

        # Continue if already calculated
        if img.isSetByName(keyname):
            continue

        floatimg = img_as_float(img.image)
        floatimg = resize(floatimg, (size, size))
        if grayscale:
            floatimg = rgb2gray(floatimg)
        img.setByName(keyname, floatimg)  # expect to return floats


# Augment images
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号