Hi. Thank you for your quick response.
This makes sense. So i have my labels, which are images , black, green and red (three classes) but they are raw pixels at the moment. this is why i get B X 3 X H X W.
So i need to make it B X 1 X H X W. So i should iterate through all my label images and convert the three channels to the class index (ex black 0, green 1 and red 2). and create masks.
Am i understanding it right. ?
And if so is there a way to convert the raw pixels to masks (contains the class index) ?