ResNet.py 文件源码

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

项目:Papers2Code 作者: rainer85ah 项目源码 文件源码
def process(url='./url/2/image.jpg'):

    import cv2
    import numpy as np
    img = cv2.imread(url)
    img = cv2.resize(img, dsize=(224, 224))
    img = np.expand_dims(img, axis=0)
    img = preprocess_input(np.asarray(img, dtype='float64'))
    return img  # img.shape (1, 224, 224, 3) type float64 ; BGR format by default from OpenCV
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号