junyanz / interactive-deep-colorization

Deep learning software for colorizing black and white images with a few clicks.
https://richzhang.github.io/ideepcolor/
MIT License
2.69k stars 447 forks source link

Error in Jupyter Notebook get_global_histogram function #71

Closed Chee-Foong closed 3 years ago

Chee-Foong commented 4 years ago
def get_global_histogram(img_path):
    ref_img_fullres = caffe.io.load_image(ref_path)
    img_glob_dist = (255*caffe.io.resize_image(ref_img_fullres,(Xd,Xd))).astype('uint8') # load image
    gt_glob_net.blobs['img_bgr'].data[...] = img_glob_dist[:,:,::-1].transpose((2,0,1)) # put into 
    gt_glob_net.forward();
    glob_dist_in = gt_glob_net.blobs['gt_glob_ab_313_drop'].data[0,:-1,0,0].copy()
    return (glob_dist_in,ref_img_fullres)

ref_img_fullres = caffe.io.load_image(ref_path)

should be

ref_img_fullres = caffe.io.load_image(img_path)

?

junyanz commented 3 years ago

It was fixed by the latest commit.