フィルターのクリア

Labelled 2D Matrix to JSON format for image segmentation deeplearning

6 ビュー (過去 30 日間)
Hannes Zedel
Hannes Zedel 2022 年 8 月 5 日
回答済み: Shreeya 2023 年 9 月 14 日
Dear community,
I am trying to train a neural network for 2D panoptic image segmentation that uses JSON formatted label data as input. I look at very complex irregular shapes (metallurgical micrographs) and to avoid manual labelling, I'd like to use deterministic image analysis instead.
My thresholding-based instance segmentation method generates 2D matrices of the same dimensions as the original image and allocates each pixel to a target class by the same number, objects are identified as adjacent same numbers. I base this on the label output L of bwboundaries for each target class: [B,L]= bwboundaries()
As a snapshot, my labelled matrix/mask looks something like this (indicating 3 target classes and in this case 4 distinct objects):
[1 1 2 1 1;
1 2 2 2 1;
2 2 3 3 3]
Is there a way to convert such labels/masks, either the individual (binary) labels per target class or the complete labelled matrix, into a JSON format that I can use to train a neural network?
Thank you

回答 (1 件)

Shreeya
Shreeya 2023 年 9 月 14 日
I understand that you have a labeled dataset for image segmentation training task and would want to convert it to JSON format. You can follow the steps outlined below to achieve it:
I hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by