How to get part from image and add it to another?

asked 2018-05-08 06:29:04 -0600

Hi, I have a model that predicts the human face segmentation.

image description

But unfortunately the model is not trained to predict the hair with the face. So now I have the above images as numpy arrays. Is it possible to add the hair from the original photo (The one on the left) to the prediction mask (in the middle) or directly to the result prediction (the one on the right) ?

Basically I just need to deal with the original image to get a little bit from the head above the prediction mask and add it to the prediction so that way at least I'll have a part of the hair in the result.

edit retag flag offensive close merge delete

Comments

Just like you built the face predictor, you will have to build filters that are able to segment out hair pixels. Make two separate masks and add them together. But something makes me believe you did not design the segmentation model for faces yourself?

StevenPuttemans gravatar imageStevenPuttemans ( 2018-05-08 07:35:18 -0600 )edit

Yes I didn't build the model of course .. if I did I would be able to retrain the model to predict the hair segmentation as well. That's why I'm asking

lilessam gravatar imagelilessam ( 2018-05-08 08:17:54 -0600 )edit
1

In that case, go look up how your first model was trained, try to clone it and learn one for that segmentation and come back here if you hit brick walls. That is what the Q&A is designed for. Having successful and working computer vision applications simply does not work by taking of-the-shelf parts and mixing them together without a deep understanding of what is happening.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-05-08 08:52:56 -0600 )edit