The available transforms and functionals are listed in the
Then, browse the sections in below this page for general information and Order to learn more about what can be done with the new v2 transforms.
Whether you’re new to Torchvision transforms, or you’re already experienced with Transforms are typically passed as the transform or transforms argument BoundingBoxes ( boxes, format = 'XYXY', canvas_size = ( H, W )) # The same transforms can be used! img, boxes = transforms ( img, boxes ) # And you can pass arbitrary input structures output_dict = transforms () randint ( 0, H // 2, size = ( 3, 4 )) boxes += boxes boxes = tv_tensors. randint ( 0, 256, size = ( 3, H, W ), dtype = torch. # Detection (re-using imports and transforms from above) from torchvision import tv_tensors img = torch.