pytorch-image-models
pytorch-image-models copied to clipboard
Update torchvision.tranforms version to torchvision.transforms.v2
According to https://pytorch.org/vision/stable/transforms.html#v1-or-v2-which-one-should-i-use
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
There's more v1 transforms in https://github.com/huggingface/pytorch-image-models/blob/45eb69d19dff83b49be14511704ec654bd24ae20/timm/data/transforms.py#L399 Maybe in other places as well, haven't checked.
Also v2 support mixup/cutmix. Maybe it's not so trivial to modify timm to use them, but I guess they will be faster.
Thanks for the work but there is no point in switching v2 for the sake of it, there will be issues with timms own transforms.
I will likely keep legacy transforms as is for repeatability / bwd compat and support v2 and albumentations in cases moving forward (ie for obj detection & segmentation). I have some v2 code in the works being tested for obj detection.