MATLAB Answers

In the Semantic Segmentation Using Deep Learning tutorial how can I create my own datasets

19 views (last 30 days)
Nathan Hughes
Nathan Hughes on 1 Feb 2018
Edited: suman webtunix on 23 Jan 2019
Hi,
As the title suggests, I want to replicate the work done here: https://uk.mathworks.com/help/vision/examples/semantic-segmentation-using-deep-learning.html
I am unsure of the best way to make my own dataset to fit this model. I have all of the input images I need, but I don't know the best way to quickly label (color) them in the same fashion.
Is there an efficient way to do this for several hundred files?

Answers (2)

Asanka Perera
Asanka Perera on 16 May 2018
Edited: Asanka Perera on 16 May 2018
1. Use Matlab image labeler and label all your input images.
2. Export the pixel labels using "to file" option. Then, you can see "PixelLabelData" folder with blank .png images. They are not blank and you can use imagesc to view them.
3. Convert all the images in PixelLabelData folder to RGB images using label2rgb command, now you have a dataset similar to this example.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by