mmcv icon indicating copy to clipboard operation
mmcv copied to clipboard

Add try-catch logic to handle image loading failure in LoadImageFromFile

Open ZwwWayne opened this issue 3 years ago • 1 comments

Describe the feature When loading an unreadable image file, the loading transform should

  1. catch the failure
  2. log the failure and the corresponding image path somewhere
  3. return None

Motivation It is common that the image files are broken in the dataset. To continue training after loading such unreadable image files. The loading transform should handle this failure.

ZwwWayne avatar Mar 18 '22 12:03 ZwwWayne

I am submitting a pull request in order to fix this!

FinAminToastCrunch avatar Mar 22 '22 19:03 FinAminToastCrunch