Segmentation with 3 channel labels #2000
-
Hi there, I'm using This is my class config:
And this is my data config:
This is my learner:
When I start to train, I get:
How can I solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
So your labels are RGB images with a classes represented by different colors? RV does have the To work around that limitation, you might try subclassing Alternatively, you can use |
Beta Was this translation helpful? Give feedback.
-
Actually, the labels in the dataset do have 3 channels, but all channels have same values. The only colors I have in the labels are black (0,0,0) and white (255,255,255). |
Beta Was this translation helpful? Give feedback.
-
Ok. These are the changes I've made so far: Class Config:
Subclasses to remove the useless channels:
Datasets:
Now, when I train I get:
|
Beta Was this translation helpful? Give feedback.
-
Ok... I've forgot that. Thanks for all your help! I'll come back later with some other doubts.... :) |
Beta Was this translation helpful? Give feedback.
-
Just to make an improvement.
|
Beta Was this translation helpful? Give feedback.
-
But now, I'm facing some error messages:
It keeps training, but those messages keep popping up between training and validation. |
Beta Was this translation helpful? Give feedback.
So your labels are RGB images with a classes represented by different colors?
RV does have the
RGBClassTransformer
class to deal with this type of data, but that functionality is not available when working with pre-chipped datasets (i.e.ImageDatasets
).To work around that limitation, you might try subclassing
SemanticSegmentationImageDataset
andSemanticSegmentationDataReader
(source code here) to make use ofRGBClassTransformer
. Note thatRGBClassTransformer
adds a null class to theClassConfig
if not already present, so you might need to also setnull_class='background'
inClassConfig
to avoid any surprises.Alternatively, you can use
RGBClassTransformer
to transform all the labels bef…