(self, root, transforms)
| 146 | |
| 147 | class PennFudanDataset(torch.utils.data.Dataset): |
| 148 | def __init__(self, root, transforms): |
| 149 | self.root = root |
| 150 | self.transforms = transforms |
| 151 | # load all image files, sorting them to |
| 152 | # ensure that they are aligned |
| 153 | self.imgs = list(sorted(os.listdir(os.path.join(root, "PNGImages")))) |
| 154 | self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks")))) |
| 155 | |
| 156 | def __getitem__(self, idx): |
| 157 | # load images and masks |
nothing calls this directly
no outgoing calls
no test coverage detected