mirror of
https://github.com/open-mmlab/mmselfsup.git
synced 2025-06-03 14:59:38 +08:00
[Fix]: Fix read image bug (#386)
This commit is contained in:
parent
3ac192dad2
commit
abcd43b431
@ -109,10 +109,6 @@ class BaseDataSource(object, metaclass=ABCMeta):
|
|||||||
channel_order=self.channel_order)
|
channel_order=self.channel_order)
|
||||||
else:
|
else:
|
||||||
img = self.data_infos[idx]['img']
|
img = self.data_infos[idx]['img']
|
||||||
|
|
||||||
img_bytes = self.file_client.get(filename)
|
|
||||||
img = mmcv.imfrombytes(
|
|
||||||
img_bytes, flag=self.color_type, channel_order=self.channel_order)
|
|
||||||
img = img.astype(np.uint8)
|
img = img.astype(np.uint8)
|
||||||
return Image.fromarray(img)
|
return Image.fromarray(img)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user