Closed vedantroy closed 1 year ago
There's actually an open issue about this on pytorch - https://github.com/pytorch/vision/issues/5194
pytorch's gaussian_blur_image_tensor
takes a sigma
argument.
Looking at https://www.mia.uni-saarland.de/Publications/gwosdek-ssvm11.pdf and the above code, sigma squared is equal to the radius squared divided by the number of passes (the number of passes is 3 by default).
Could you specify what you mean by 'approximate'?
Closing this issue as no feedback has been received.
Pytorch has the method:
which does a gaussian blur of a tensor using the following helper methods:
Direct link to code: https://github.com/pytorch/vision/blob/ad128b753c7e8cc0c600dfddac22ff48fc73c9d9/torchvision/prototype/transforms/functional/_misc.py#L85.
PIL's gaussian blur method takes in a single parameter,
radius
. I was wondering how to approximate Pytorch's gaussian blur using PIL?