Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra-Yu committed May 10, 2023
1 parent a8769cd commit 3cf31f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmcv/transforms/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def transform(self, results: dict) -> Optional[dict]:
return None
else:
raise e
# in some cases, images are not read successfully, the img would be
# `None`, refer to https://github.com/open-mmlab/mmpretrain/issues/1427
assert img is not None, f'failed to load image: {filename}'
if self.to_float32:
img = img.astype(np.float32)
Expand Down

0 comments on commit 3cf31f4

Please sign in to comment.