ImageUtils.py 文件源码

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

项目:deeputil 作者: Avkash 项目源码 文件源码
def preprocess_image_array(imgArray, show_info=True):
    """
    :param image:
    :return:
    """
    assert len(imgArray.shape) == 3

    if (imgArray.shape[2]) == 1:
        raise ValueError('Error: Preprocessing id done for color image only and input image is gray...')
    utils.helper_functions.show_print_message("Now pre-processing the image to get ready for classification..", show_info)
    img_array = np.expand_dims(imgArray, axis=0)
    img_array = preprocess_input(img_array)
    return img_array
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号