Pixel label image has scalar pixel label IDs instead of RGB-triplet pixel label IDs
4 views (last 30 days)
Show older comments
Hello,
I am writing a program to perform image segmentation using a deep learning NN, following the example: https://www.mathworks.com/help/vision/ug/semantic-segmentation-using-deep-learning.html
After I execute the Start Training step to train the network, I obtain the following error:
Error using trainNetwork (line 170)
Pixel label image has scalar pixel label IDs instead of RGB-triplet pixel label IDs.
Caused by:
Error using matlab.io.datastore.PixelLabelDatastore.label2cat (line 1087)
Pixel label image has scalar pixel label IDs instead of RGB-triplet pixel label IDs.
I don't understand why I would get this error, as the label IDs in my code are in the same format as the example.
Semantic Segmentation Using Deep Learning
example:
labelIDs = { ...
% "Sky"
[
128 128 128; ... % "Sky"
]
...
My code:
labelIDs = { ...
% "Environment"
[
128 000 000; ... % "Blue"
]
...
I've looked at some of the responses from other's who have asked the same question, and there doesn't seem to be a clear response. Maybe I not seeing it.
Any help would REALLY be appreciated!
2 Comments
Answers (1)
yanqi liu
on 14 Dec 2021
yes,sir,may be change the label datetype
such as
uint8(round([128 000 000]))
if possible,may be upload your data mat file to do some analysis
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!