I am trying to run the below block and got this error
scores = model.evaluate_generator(test_dataloader)
print("Loss: {:.5}".format(scores[0]))
for metric, value in zip(metrics, scores[1:]):
print("mean {}: {:.5}".format(metric.__name__, value))
Error trace
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-23-085d0e8f0f9f> in <module>
----> 1 scores = model.evaluate_generator(test_dataloader)
2
3 print("Loss: {:.5}".format(scores[0]))
4 for metric, value in zip(metrics, scores[1:]):
5 print("mean {}: {:.5}".format(metric.__name__, value))
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
89 warnings.warn('Update your `' + object_name + '` call to the ' +
90 'Keras 2 API: ' + signature, stacklevel=2)
---> 91 return func(*args, **kwargs)
92 wrapper._original_function = func
93 return wrapper
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/engine/training.py in evaluate_generator(self, generator, steps, callbacks, max_queue_size, workers, use_multiprocessing, verbose)
1789 workers=workers,
1790 use_multiprocessing=use_multiprocessing,
-> 1791 verbose=verbose)
1792
1793 @interfaces.legacy_generator_methods_support
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/engine/training_generator.py in evaluate_generator(model, generator, steps, callbacks, max_queue_size, workers, use_multiprocessing, verbose)
363
364 while steps_done < steps:
--> 365 generator_output = next(output_generator)
366 if not hasattr(generator_output, '__len__'):
367 raise ValueError('Output of generator should be a tuple '
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/utils/data_utils.py in get(self)
623 except Exception:
624 self.stop()
--> 625 six.reraise(*sys.exc_info())
626
627
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/six.py in reraise(tp, value, tb)
701 if value.__traceback__ is not tb:
702 raise value.with_traceback(tb)
--> 703 raise value
704 finally:
705 value = None
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/utils/data_utils.py in get(self)
608 try:
609 future = self.queue.get(block=True)
--> 610 inputs = future.get(timeout=30)
611 except mp.TimeoutError:
612 idx = future.idx
~/anaconda2/envs/mltf115_2/lib/python3.6/multiprocessing/pool.py in get(self, timeout)
642 return self._value
643 else:
--> 644 raise self._value
645
646 def _set(self, i, obj):
~/anaconda2/envs/mltf115_2/lib/python3.6/multiprocessing/pool.py in worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)
117 job, i, func, args, kwds = task
118 try:
--> 119 result = (True, func(*args, **kwds))
120 except Exception as e:
121 if wrap_exception and func is not _helper_reraises_exception:
~/anaconda2/envs/mltf115_2/lib/python3.6/site-packages/keras/utils/data_utils.py in get_index(uid, i)
404 The value at index `i`.
405 """
--> 406 return _SHARED_SEQUENCES[uid][i]
407
408
<ipython-input-4-f15eaa6c897e> in __getitem__(self, i)
115 data = []
116 for j in range(start, stop):
--> 117 data.append(self.dataset[j])
118
119 # transpose list of lists
<ipython-input-4-f15eaa6c897e> in __getitem__(self, i)
63 # read data
64 image = cv2.imread(self.images_fps[i])
---> 65 image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
66 mask = cv2.imread(self.masks_fps[i], 0)
67
error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
Can you please help?
P.S - I trained for just one epoch, to do a test on this repository.
I am trying to run the below block and got this error
Error trace
Can you please help?
P.S - I trained for just one epoch, to do a test on this repository.