vision
vision copied to clipboard
`BICUBIC` works against the doc of `ElasticTransform()`
🐛 Describe the bug
The doc of ElasticTransform() says that only NEAREST and BILINEAR are supported:
Parameters: ...
- interpolation (InterpolationMode, optional) – ... If input is Tensor, only InterpolationMode.NEAREST, InterpolationMode.BILINEAR are supported. ...
But BICUBIC work against the doc as shown below:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import ElasticTransform, PILToTensor
origin_data = OxfordIIITPet(
root="data"
)
def show_etimagetensor(im, ip=None):
et = ElasticTransform(interpolation=ip)
ptt = PILToTensor()
print(ptt(et(im))[0][279])
show_etimagetensor(im=origin_data[0][0], ip=InterpolationMode.BICUBIC)
# tensor([ 6, 8, 6, 8, 8, 8, 9, 8, 7, 6,
# 4, 8, 5, 13, 7, 8, 3, 8, 6, 9,
# 8, 7, 9, 9, 9, ..., 239, 237, 11], dtype=torch.uint8)
Versions
import torchvision
torchvision.__version__ # '0.20.1'
Hey @hyperkai, thank you for opening this issue. After reviewing the details, I suggest we consolidate the discussion with #9065, as it appears to be closely related.
Feel free to submit a PR to clarify the docs @hyperkai .