vision icon indicating copy to clipboard operation
vision copied to clipboard

Specifying the output size in transforms.GaussianBlur

Open talcs opened this issue 1 year ago • 4 comments

📚 The doc issue

The transforms.GaussianBlur constructor takes kernel_size as a parameter. However, it isn't specified whether the convolution will use padding to keep the output image in the same dimension as the input. I think it should be mentioned. Maintaining the original input size is crucial in many cases, like object detection or segmentation, where the GT refers to certain pixels.

Suggest a potential alternative/fix

No response

talcs avatar Feb 01 '24 14:02 talcs

Thanks for the report @talcs . GaussianBlur will indeed use padding:

https://github.com/pytorch/vision/blob/806dba678d5b01f6e8a46f7c48fdf8c09369a267/torchvision/transforms/v2/functional/_misc.py#L152

If you're interested, we'd be happy to review a PR from you to clarify that in the docstring

NicolasHug avatar Feb 01 '24 14:02 NicolasHug

Hi @NicolasHug, I would be happy to work on this issue. Is it open for beginners? Thanks

Bhavay-2001 avatar Feb 04 '24 06:02 Bhavay-2001

Thanks for your interest @Bhavay-2001 , but this has been taken care of in https://github.com/pytorch/vision/pull/8246 already.

NicolasHug avatar Feb 05 '24 09:02 NicolasHug

Hi @NicolasHug, is there any other issue that I can contribute to? Thanks

Bhavay-2001 avatar Feb 06 '24 14:02 Bhavay-2001