Pixelwise blur along time todmai

Right now I have an image dataset of shape (N, C, D, H, W) where N is the batch, C is the channels, D is the number of frames and H and W are height and width respectively.

We can think of it as video data where D is the number of frames of (C, H, W) images.

What I want to do is to gaussian blur along the time (D) axis for each pixel in (C, H, W). I know how to use torchvision.transforms.GaussianBlur, but this is for a blur where the input is […, C, H, W] and is a 2d blur. What I want is a 1D pixelwise blur along a specific axis.

Any ideas?

Thanks!

You could create a gaussian blur kernel in the appropriate shape and use the functional API via F.conv3d to apply it to the input, as I don’t know, if transformations support gaussian blurring for 3d data for a specific dimension only.