Keras-segmentation-deeplab-v3.1
Keras-segmentation-deeplab-v3.1 copied to clipboard
AttributeError: 'ProgbarLogger' object has no attribute 'log_values'
AttributeError Traceback (most recent call last)
/kaggle/input/Keras-segmentation-deeplab-v3.1/utils.py in train_generator(self, model, train_generator, valid_generator, callbacks, mp) 216 validation_steps=len(valid_generator), 217 max_queue_size=10, --> 218 workers=workers, use_multiprocessing=mp) 219 return h 220
/opt/conda/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
/opt/conda/lib/python3.6/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1416 If all outputs in the model are named, 1417 you can also pass a dictionary -> 1418 mapping output names to Numpy arrays. 1419 sample_weight: Optional array of the same length as x, containing 1420 weights to apply to the model's loss for each sample.
/opt/conda/lib/python3.6/site-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 249 for l, o in zip(out_labels, val_outs): 250 epoch_logs['val_' + l] = o --> 251 252 if callbacks.model.stop_training: 253 break
/opt/conda/lib/python3.6/site-packages/keras/callbacks.py in on_epoch_end(self, epoch, logs) 77 self._t_enter_batch = time.time() 78 # Batch is ending, calculate batch time ---> 79 self._delta_t_batch = time.time() - self._t_enter_batch 80 81 logs = logs or {}
/opt/conda/lib/python3.6/site-packages/keras/callbacks.py in on_epoch_end(self, epoch, logs)
336 # Arguments
337 epoch: integer, index of epoch.
--> 338 logs: dict, metric results for this training epoch, and for the
339 validation epoch if validation is performed. Validation result keys
340 are prefixed with val_
.
AttributeError: 'ProgbarLogger' object has no attribute 'log_values'
This is because your data folder is different from the author, so in utils.py Class SegmentationGenerator your image_path_list and label_path_list is empty. while the author got a different folder from VOC2012 unzip directly, and I don't know what he put in :
self.label_path_list = sorted(glob.glob(os.path.join(folder, 'SegmentationClassAug', '*')))