How to interpolate 2D image with zero value?

Hi, I want to interpolate 2D image with some of missing values.

e.g)
image

and I have to replace the value ‘0’ with the proper one, which should be computed by bilinear interpolation using 4 neighbor pixels.

I found the function which can do this in scipy.interpolate but I coudln’t find it in Pytorch.

Can I do this job on GPU using pytorch function?

Hi,

Here is the interpolate function you are looking for. This function is available on CUDA.

I knew it but I think that function is only available for up/downsampling, not replacing the zero value. Isn’t it?