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

Increase the size of input image from xd=256 to xd=1024 or xd=2048 #70

Open peymanrah opened 4 years ago

peymanrah commented 4 years ago

Is there any way to increase the xd (the size of the input image). I receive an error when I use any xd higher than 256 for the global color transfer. It seems the model has been trained only on 256 pixels. Can you please help on how I can input high resolution images? I dont want the network to resize the image to 256 because of image quality or data loss. Any idea or trained model over high resolution images?

junyanz commented 4 years ago

Currently, only 256x models are available. One simple solution is that you upsample the chromatic prediction of the network to the original resolution, and combine it with the original grayscale image. You can add 1-2 lines in the cell 11 of the notebook.

# do some upsamling for img_pred_withref_fullres
plt.imshow(np.concatenate((img_gray_fullres,img_pred_withref_fullres),axis=1));