so the getitem does only some list processing. gets a random subset of the list.
def __getitem__(self, idx):
       img_paths = self.data[idx]
       img_paths  = self.get_reqd_paths(img_paths)

The collate function does all the heavy lifting:
def collate(<arguments>):
   buffer = [cv2.imread(path) for path in img_paths]
   buffer = torch_transform(buffer)

torch_transform is a composition - (normalization, image cropping and augmentation, convert to cpu tensor) - one of the augmentations is a cv2 rotate function, which I think might be the issue.
All of this is done on a numpy array. Maybe pin_memory =True might be a good idea?