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