Reputation: 105
I have a neural network (NN) that segments an object and predicts a binary mask:
I want to divide this binary mask into further subregions: tip, first third, center, left, right, root
which would result in something like this:
Solution ideas
(A) One could introduce a semantic segmentation task to solve the dividing with NN, but preparing the labels for this would be a high effort. Additionally, the subregions are stuck together in order, for example, left-center-right which the NN does not assume.
(B) I am thinking of a binary-mask post-processing algorithm that could do this subregioning. For example, if we could transform the mask to be a square, we could apply a handcrafted template for it and then transform it back into the mask shape. This could result in adequate subregioning, but I have no clue whether it is possible or how could it be implemented.
Any different ideas for solving this problem? Or some tip on how could be (B) done?
Upvotes: 1
Views: 388
Reputation: 114866
Semantic Segmentation for Parts:
I do not think this will work, even if you obtain labeling for the different parts. Since the partitioning into the different regions is functional and not visual, the different parts do not have identifying visual features. Moreover, any NN you train does not have access to functional information, only visual and therefore there's not much for a NN to learn here.
Post Processing:
Your idea of post-processing the mask based on its geometry might be a good proxy for the lack of functional information. What you can do is:
Find the center of mass of the masked region.
Find the major axis of the mask.
This will give you a "canonical" projection to a circle (rather than a square). you can then have a circular "atlas" dividing the circle into the different regions and project back the atlas to the mask via the "canonical" circular mapping.
Upvotes: 1