Image shape Does not Match - TIRAMISU

My Image Shape does not Match…Left side is my Notebook and Right one is from JH00 Github account…

Pls Suggest

Hello @akshaylamba,

I don’t have the dataset and notebook in front of me.
If I remember correct, the notebook is not for “just executing”.

There are two cells above your problem:

In [260]: lnames = [labels_path+os.path.basename(fn)[:-4]+’_L.png’ for fn in fnames]
In [7]: lnames = [labels_path+os.path.basename(fn) for fn in fnames]

If I remember correct, you just have to execute the first one (thats the mask).
I think the second was a trail/error/visualisation thing.

As suggestion, look at the different input(images) and output (what is lnames / what is the shape after each cell).
As I’ve remember, you can face that problem more often in this notebook.

See Lesson 14 wiki

@benediktschifferer …Yes you are Correct …I only executed the first one…But The Result is the same…

The Shape remains the same…PLs Suggest…

Hey,

I took a look on my code.
I am not sure, where there error is / was.

Your label object has 3 channels -> because the mask has 1 color for each class
His label object has 1 channel -> because it contains a classid

I think you proceed without caring about that problem:
In the below code, there is a function:

%time labels_int =conv_all_labels()

This function converts an image mask (image with 3 channels) into a image of classes (image with 1 channel, the channel contains an integer for the class)

I think you can continue

Bests,
Benedikt