local_path_to_dataset_root = '/Users/user/segmentation_datasets/Segmentation_Data'
imgs_remote_location = 'https://storage.googleapis.com/galileo-public-data/CV_datasets/Segmentation_Data'
transforms = transforms.Compose([transfroms.Resize((512, 512)
train_dataset = ADE20k(transforms=transforms, train=True)
val_dataset = ADE20k(transforms=transforms, train=False)
train_dataloader = torch.utils.DataLoader(train_dataset)
val_dataloader = torch.utils.DataLoader(val_dataset)
# background label is the 0th logit, plane is the 1st, etc.
labels = ["Background", "Plane", "Ship"]
model = UNet()
# train your model
for epoch in range(epochs):
Important Note: Dataloaders provided should have no cropping transforms applied to images, only resizing and color augmentations are allowed. Dataloaders provided do not have to be the same as used in training as we recognized cropping can be integral to training, if you use cropping during training please provide separate dataloaders here that do not use cropping.