Page MenuHomePhabricator

[Segmentation] Convertion from semantic segmentations to instance segmentations
Open, WishlistPublic

Description

The imagined workflow would go something like this
  1. Load a semantic segmentation map
  2. Apply connected component analysis to all (of all semantic classes by themselves).
  3. Then one gets a current instance highlighted the viewer centered around it. (increase opacity of the other instances a bit?)
  4. Next: Editing mode:
    1. Setting an Instance ID & and a Semantic ID (e.g. in a viewer on the right)
    2. Editing of the highlighted instance mask with segmentation tools & new instance tools.
      1. Sometimes instances are connected to each other -- I believe it would be easiest to remove all of the mask of the rest (with the mask difference of before and after getting offered as the next instance to edit.
      2. Sometimes instances are not connected despite being supposed to. Enable clicking other instances to merge them?
      3. Also one probably has to have the option to fully discard labels in case they were inaccurate
    3. This is probably also nice if you have the possibility to interact in the 3D viewer, as it may be good to select the instances to merge?
  5. After finishing the editing of the case it is saved to disk.
Other notes

Data saving format could be two files : <filename>_sem.nii.gz (semantic) and <filename>_ins.nii.gz (instance)

Dataset Creation tooling

(Maybe this would be a new use-case to begin with?) -- Automatically iterate through directories with images (and optionally associated labels) -- Maybe this even exists already?
It would be nice if one could select a nnU-Net directory and it crawls the images and labels and writes it to a new output directory feeding you the cases 1 by 1 with Label Image pairs. (And recognizes which cases are finished already so you don't have to do the data loading manually yourself.

(E.g. having a button: Convert Semantic to Instance Segmentation --> Single Cases/ Directory (Choose image dir, choose semantic label dir, choose output dir) --> Entering labeling mode with progress bar. (and ETA? 😄 )

Some other things that may be relevant for logitudinal people
  • @m574s if they want their use-cases included would be to pitch it as well here if you are interested.

Event Timeline

kislinsk triaged this task as Wishlist priority.Jan 5 2024, 1:31 PM
kislinsk created this task.
kislinsk moved this task from Backlog to MITK Meeting on the Request for Discussion board.