pytorch-image-models icon indicating copy to clipboard operation
pytorch-image-models copied to clipboard

Update torchvision.tranforms version to torchvision.transforms.v2

Open lixit opened this issue 1 year ago • 2 comments

According to https://pytorch.org/vision/stable/transforms.html#v1-or-v2-which-one-should-i-use

lixit avatar May 31 '24 21:05 lixit

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.

tfriedel avatar Jun 09 '24 16:06 tfriedel

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.

rwightman avatar Dec 05 '24 23:12 rwightman