Skip to content

Commit

Permalink
[Fix] Can not use 'img_info' without 'img_prefix' for data source. (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
jingt2ch authored Sep 30, 2022
1 parent ec0e563 commit 58519b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmselfsup/datasets/data_sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def get_img(self, idx):
img_bytes,
flag=self.color_type,
channel_order=self.channel_order)
elif self.data_infos[idx].get('img_prefix', None) is not None:
if self.data_infos[idx]['img_prefix'] is not None:
elif self.data_infos[idx].get('img_info', None) is not None:
if self.data_infos[idx].get('img_prefix', None) is not None:
filename = osp.join(
self.data_infos[idx]['img_prefix'],
self.data_infos[idx]['img_info']['filename'])
Expand Down

0 comments on commit 58519b1

Please sign in to comment.