Solved by KFrank in post #4 
              
              
                Hi Alisson! 

Let me make a number of comments before outlining how one 
might convert RGB colors to integer class labels, 
First, just to use a clear-cut word, let me call your ground-truth, 
annotated (labeled) images “masks.”  So your dataset consists 
of a bunch of images that will be input to y…