`NEAREST_EXACT` and `BICUBIC` work against the doc of `AutoAugment()`
@AntoineSimoulin is already working on this.
Since May 21, 2025.
Assessment
This issue has not been assessed yet.
Description
🐛 Describe the bug
The doc of AutoAugment() says that only NEAREST and BILINEAR are supported:
Parameters:
...
- interpolation (InterpolationMode, optional) – ... If input is Tensor, only InterpolationMode.NEAREST, InterpolationMode.BILINEAR are supported.
But NEAREST_EXACT and BICUBIC work against the doc as shown below:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import AutoAugment, PILToTensor
origin_data = OxfordIIITPet(
root="data"
)
def show_aaimagetensor(im, ip=None):
aa = AutoAugment(interpolation=ip)
ptt = PILToTensor()
print(ptt(aa(im))[0][200])
show_aaimagetensor(im=origin_data[0][0], ip=InterpolationMode.NEAREST_EXACT)
# tensor([ 83, 74, 77, 80, 81, 76, 85, 88, 128, 143,
# 194, 215, 247, 225, 242, 255, 255, 238, 242, 242,
# 242, 247, 255, 238, 247, ..., 255, 255, 0], dtype=torch.uint8)
show_aaimagetensor(im=origin_data[0][0], ip=InterpolationMode.BICUBIC)
# tensor([ 32, 34, 34, 32, 30, 34, 36, 36, 36, 36,
# 36, 37, 28, 30, 30, 30, 34, 30, 30, 32,
# 34, 25, 30, 34, 32, ..., 34, 27, 27], dtype=torch.uint8)
Versions
import torchvision
torchvision.__version__ # '0.20.1'
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pytorch/vision
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100