This check is not sufficient. Currently, this allows non-image files to pass into the imread() call, and error is thrown. Eg: for important directory files like .gitignore, and perhaps other residual files, this error occurs. Fix by adding check for image file.
This check is not sufficient. Currently, this allows non-image files to pass into the imread() call, and error is thrown. Eg: for important directory files like .gitignore, and perhaps other residual files, this error occurs. Fix by adding check for image file.