I’m not sure, if you are following this tutorial 1, but if so, note that the transformations are taken from references/detection/transforms.py as described in the tutorial, so you might need to use them as well.
The difference to torchvision.transforms is that these transformation accept the image and target tensors.