Borrar filtros
Borrar filtros

Labelled 2D Matrix to JSON format for image segmentation deeplearning

6 visualizaciones (últimos 30 días)
Hannes Zedel
Hannes Zedel el 5 de Ag. de 2022
Respondida: Shreeya el 14 de Sept. de 2023
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

Respuestas (1)

Shreeya
Shreeya el 14 de Sept. de 2023
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