utils.py 文件源码

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

项目:face 作者: xpzouying 项目源码 文件源码
def get_images_from_request(request_file, names):
    """get pillow images from flask request

    @input: request_file: request.files
    @input: names: image name list for read
    @output: type ndarray. The array obtained by reading the image.
    """

    img_list = []
    for name in names:
        # get upload file
        f = request_file.get(name)
        if f is None:
            continue

        img = misc.imread(f)
        img_list.append(img)

    return img_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号