srihari-humbarwadi / DeepLabV3_Plus-Tensorflow2.0

DeepLabV3+ implemented in TensorFlow2.0
https://arxiv.org/pdf/1802.02611.pdf
168 stars 45 forks source link

Assertion error #24

Closed aakashthapa22 closed 3 years ago

aakashthapa22 commented 3 years ago

AssertionError
Traceback (most recent call last)

in () 15 16 for i in range(len(image_list)): ---> 17 assert image_list[i].split('/')[-1].split('_leftImg8bit')[0] == mask_list[i].split('/')[-1].split('_gtFine_labelIds')[0] 18 19 for i in range(len(val_image_list)): AssertionError: what is the reason for this error?
srihari-humbarwadi commented 3 years ago

image and mask names do not match. You can remove this line if you are sure that your image and mask paths are in the same order

aakashthapa22 commented 3 years ago

Thank you! I am facing another problem on this while training. Can you please tell me the solution?

Building DeepLabv3Plus Network /gdrive/MyDrive/scenesegmentation/DeepLabV3/resnet/resnet50.py:265: UserWarning: The output shape of ResNet50(include_top=False) has been changed since Keras 2.2.0. warnings.warn('The output shape of ResNet50(include_top=False) '

ValueError Traceback (most recent call last)

in () 2 strategy = tf.distribute.MirroredStrategy() 3 with strategy.scope(): ----> 4 model = DeepLabV3Plus(H, W, num_classes) 5 for layer in model.layers: 6 if isinstance(layer, tf.keras.layers.BatchNormalization): 1 frames /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/keras/engine/network.py in get_layer(self, name, index) 537 if layer.name == name: 538 return layer --> 539 raise ValueError('No such layer: ' + name) 540 541 @property ValueError: No such layer: activation_39
srihari-humbarwadi commented 3 years ago

If you are running it in a jupyter notebook, restart your kernel before trying to create the model again

aakashthapa22 commented 3 years ago

why is code not asking for json file (only train_mask and val_mask, but not json file)?