Scaling 3D images in pytorch

As a preprocessing step, I need to scale 3D images. Does pytorch have a 3D bilinear interpolation tool or any other useful upsample/downsample tools for this purpose?

Torchvision.transforms.Scale is based on Pil’s tools for interpolation (Pil.image.resize) that works in 2D only. To your purpose, you should rather have a look to scipy ndimages : https://docs.scipy.org/doc/scipy/reference/ndimage.html

I wrote a pytorch GPU-accelerated 3d resampler a while back that uses catmull-rom spline interpolation

1 Like