AdneneBoumessouer / MVTec-Anomaly-Detection

This project proposes an end-to-end framework for semi-supervised Anomaly Detection and Segmentation in images based on Deep Learning.
278 stars 59 forks source link

"PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f9de4207678>" #58

Closed KouateMuhamed closed 3 years ago

KouateMuhamed commented 3 years ago

File "/usr/local/lib/python3.6/dist-packages/ktrain/core.py", line 563, in lr_find verbose=verbose) File "/usr/local/lib/python3.6/dist-packages/ktrain/lroptimize/lrfinder.py", line 119, in find callbacks=[callback]) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py", line 108, in _method_wrapper return method(self, *args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py", line 1063, in fit steps_per_execution=self._steps_per_execution) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 1117, in __init__ model=model) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 916, in __init__ **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 786, in __init__ peek, x = self._peek_and_restore(x) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 920, in _peek_and_restore return x[0], x File "/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/iterator.py", line 65, in __getitem__ return self._get_batches_of_transformed_samples(index_array) File "/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/iterator.py", line 230, in _get_batches_of_transformed_samples interpolation=self.interpolation) File "/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/utils.py", line 114, in load_img img = pil_image.open(io.BytesIO(f.read())) File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2944, in open "cannot identify image file %r" % (filename if filename else fp)