Processing binary masks for DL

Hello everyone.

I’m trying to classify tissue from histologic slices into 3 categories (e.g. good, bad, background). I want to try a DL semantic segmentation approach and have opted for this workflow by @nemad

The workflow reads the annotations from an integer matrix, which looks like this:

0000047.regions.txt (150 KB)

With my current annotation method, I can retrieve PNG segmentation maps as binary masks. I get a separate map for each classification. So for example, I will get these 3 for a single picture:

I have trouble processing these labels for the workflow. Generally, I can see 2 options:

  1. Write the binary masks to an integer matrix, then combine the matrices.

This seems clunky, but also straight forward. I tried to convert the binary masks to matrix with the following workflow from @christian.dietz Saving image into data matrix The workflow gets stuck on Split Collection Column at 0%, I’m not sure why.

  1. Combine the binary masks and use directly as image labels for DL.

This seems more effective to me. I’m not sure if and how this can be done?

Any help would be much appreciated!

Hello @mogelnick,

option 2 is the way to go. I only used the integer matrix because that was the format of the data at the time.
One way to combine your binary masks into a single mask with 2 “channels” is the Merger node.


1 Like