Skip to content

Commit

Permalink
update cityscapes_panoptic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyefeilin committed Aug 10, 2022
1 parent 7927905 commit af36504
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/PanopticDeepLab/datasets/cityscapes_panoptic.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ def rgb2id(color):
def __getitem__(self, idx):
image_path, label_path = self.file_list[idx]
dataset_dict = {}
im, label = self.transforms(im=image_path, label=label_path)
data = {'img': image_path, 'label': label_path}
data['gt_fields'] = ['label']
data = self.transforms(data)
im, label = data['img'], data['label']
label_dict = self.target_transform(label, self.ins_list[idx])
for key in label_dict.keys():
dataset_dict[key] = label_dict[key]
Expand Down

0 comments on commit af36504

Please sign in to comment.