The torchvision.transforms.v2 namespace was still in BETA stage until now. It is now stable! Whether you’re new to Torchvision transforms, or you’re already experienced with them, we encourage you to start with Getting started with transforms v2 in order to learn more about what can be done with the new v2 transforms.
We are progressively adding support for torch.compile() to torchvision interfaces, reducing graph breaks and allowing dynamic shape.
The torchvision ops (nms, [ps_]roi_align, [ps_]roi_pool and deform_conv_2d) are now compatible with torch.compile and dynamic shapes.
On the transforms side, the majority of low-level kernels (like resize_image() or crop_image()) should compile properly without graph breaks and with dynamic shapes. We are still addressing the remaining edge-cases, moving up towards full functional support and classes, and you should expect more progress on that front with the next release.
Detailed Changes
Breaking changes / Finalizing deprecations
[transforms] We changed the default of the antialias parameter from None to True, in all transforms that perform resizing. This change of default has been communicated in previous versions, and should drastically reduce the amount of bugs/surprises as it aligns the tensor backend with the PIL backend. Simply put: from now on, antialias is always applied when resizing (with bilinear or bicubic modes), whether you're using tensors or PIL images. This change only affects the tensor backend, as PIL always applys antialias anyway. (#7949)
[transforms] We removed the torchvision.transforms.functional_tensor.py and torchvision.transforms.functional_pil.py modules, as these had been deprecated for a while. Use the public functionals from torchvision.transforms.v2.functional instead. (#7953)
[video] Remove deprecated path parameter to VideoReader and made src mandatory (#8125)
[transforms] to_pil_image now provides the same output for equivalent numpy arrays and tensor inputs (#8097)
Bug Fixes
[datasets] Fix root path expansion in datasets.Kitti (#8165)
[transforms] allow sequence fill for v2 AA scripted (#7919)
[reference scripts] Fix quantized references (#8073)
[reference scripts] Fix IoUs reported in segmentation references (#7916)
[transforms] The v2 transforms are now officially stable and out of BETA stage (#8111)
[ops] The ops ([ps_]roi_align, ps_[roi_pool], deform_conv_2d) are now compatible with torch.compile and dynamic shapes (#8061, #8049, #8062, #8063, #7942, #7944)
[models] Allow custom atrous_rates for deeplabv3_mobilenet_v3_large (#8019)
[transforms] allow float fill for integer images in F.pad (#7950)
[transforms] allow len 1 sequences for fill with PIL (#7928)
[transforms] allow size to be generic Sequence in Resize (#7999)
... (truncated)
Commits
b2383d4 [RELEASE-ONLY CHANGES] [Cherry-pick for 0.17] CI fix - Use pytest<8 in unitte...
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps torchvision from 0.16.2 to 0.17.0.
Release notes
Sourced from torchvision's releases.
... (truncated)
Commits
b2383d4
[RELEASE-ONLY CHANGES] [Cherry-pick for 0.17] CI fix - Use pytest<8 in unitte...273182a
empty9c7fb73
Remove AWS credentials on workflows (#8207)49880a9
[Cherry-pick for 0.17] Fix root path expansion in datasets.Kitti (#8165)2b193ec
[Cherry-pick for 0.17] Fix TestElastic::test_transform on M1 (#8160)2584baa
[0.17] Remove prototype area (#8152)bd6044a
[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}e12d200
S390x big endian fixes (#8149)526ec93
Skip jpeg encoding/decoding tests on MacOS (#8145)1ababf9
Add manual opcheck tests for roi ops (#8144)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show