Skip to content

TorchVision 0.17 Release

Compare
Choose a tag to compare
@NicolasHug NicolasHug released this 30 Jan 18:31
· 207 commits to main since this release
b2383d4

Highlights

The V2 transforms are now stable!

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.

Browse our main docs for general information and performance tips. The available transforms and functionals are listed in the API reference. Additional information and tutorials can also be found in our example gallery, e.g. Transforms v2: End-to-end object detection/segmentation example or How to write your own v2 transforms.

Towards torch.compile() support

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 applies 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)

New Features

[datasets] add Imagenette dataset (#8139)

Improvements

[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)
[transforms] Making root parameter optional for Vision Dataset (#8124)
[transforms] Added support for tv tensors in torch compile for func ops (#8110)
[transforms] Reduced number of graphs for compiled resize (#8108)
[misc] Various fixes for S390x support (#8149)
[Docs] Various Documentation enhancements (#8007, #8014, #7940, #7989, #7993, #8114, #8117, #8121, #7978, #8002, #7957, #7907, #8000, #7963)
[Tests] Various test enhancements (#8032, #7927, #7933, #7934, #7935, #7939, #7946, #7943, #7968, #7967, #8033, #7975, #7954, #8001, #7962, #8003, #8011, #8012, #8013, #8023, #7973, #7970, #7976, #8037, #8052, #7982, #8145, #8148, #8144, #8058, #8057, #7961, #8132, #8133, #8160)
[Code Quality] (#8077, #8070, #8004, #8113,

Contributors

We're grateful for our community, which helps us improve torchvision by submitting issues and PRs, and providing feedback and suggestions. The following persons have contributed patches for this release:

Aleksei Nikiforov. Alex Wei, Andrey Talman, Chunyuan WU, CptCaptain, Edward Z. Yang, Gu Wang, Haochen Yu, Huy Do, Jeff Daily, Josh Levy-Kramer, moto, Nicolas Hug, NVS Abhilash, Omkar Salpekar, Philip Meier, Sergii Dymchenko, Siddharth Singh, Thiago Crepaldi, Thomas Fritz, TilmannR, vfdev-5, Zeeshan Khan Suri.