deep-image-prior
deep-image-prior copied to clipboard
"super-resolution.ipynb" , Problem in saving HR image onto disk.
Hi,
"super-resolution.ipynb" uses "plot_image_grid" to show the original image, and HR image.
I tried to save the "out_HR_np" or "result_deep_prior" onto disk using following commands:
cv2.imwrite("HR.png", out_HR_np.transpose(1, 2, 0))
cv2.imwrite("Result.png", result_deep_prior.transpose(1, 2, 0))
However, what is saved is an image with only black color.
Do you have any idea how to save resulting image as png file?
Thanks!
add line
tensors_to_plot = torch.from_numpy( imgs['bicubic_np']) torchvision.utils.save_image(tensors_to_plot, 'test.png')
@zxq2233 thanks for your code, it works great, but how we can save the super resolved image since your code save the bicubic one, 'HR-np' save the original croped one, and 'orig_np' save the original, what about super resolved image edit is HR image mean asuper resolved one