def load(path, dtype=np.float64):
    import skimage.io
    im = skimage.io.imread(path)
    if dtype == np.uint8:
        return im
    elif dtype in {np.float16, np.float32, np.float64}:
        return im.astype(dtype) / 255
    else:
        raise ValueError('Unsupported dtype')
Loads an image from file.
dataset/ETHPy150Open gustavla/autocolorize/autocolorize/image.py/load