Skip to content

Commit

Permalink
ensure items in dataset have the same order across multi machine
Browse files Browse the repository at this point in the history
  • Loading branch information
uni19 committed Aug 12, 2021
1 parent 58f5dbc commit f484482
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mmseg/datasets/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def load_annotations(self, img_dir, img_suffix, ann_dir, seg_map_suffix,
seg_map = img.replace(img_suffix, seg_map_suffix)
img_info['ann'] = dict(seg_map=seg_map)
img_infos.append(img_info)
img_infos = sorted(img_infos, key=lambda x: x['filename'])

print_log(f'Loaded {len(img_infos)} images', logger=get_root_logger())
return img_infos
Expand Down

0 comments on commit f484482

Please sign in to comment.