sample = self.data_index[idx]
// load data, NOTE: modify by cv2.imread(...)
image = torch.rand(3, 240, 320)label = torch.rand(1, 240, 320)return dict(images=image, labels=label)
////////////////////////////////////////////////////////////////
// 2. Define the data augmentation operations
// Thanks to the `kornia` design all the operators can be placed inside inside a `nn.Sequential`.
After Change
// Reorder boxes as xyxy
perm = torch.LongTensor([0, 2, 1, 3])
target = target[perm]
if self.transforms is not None:
img = self.transforms(img)
return img, target
// Utils functions
def plot_images(org, img):