Mask_RCNN icon indicating copy to clipboard operation
Mask_RCNN copied to clipboard

How to get the mask area ?

Open ZengyuanYu opened this issue 6 years ago • 11 comments

I trained my own data use Mask RCNN。Now, I want to calculate mask area through pixel. How to do that?

ZengyuanYu avatar Jul 16 '18 13:07 ZengyuanYu

Try this: np.reshape(r['masks'], (-1, r['masks'].shape[-1])).astype(np.float32).sum()

mekomlusa avatar Jul 16 '18 18:07 mekomlusa

thank you . It worked for me~

ZengyuanYu avatar Jul 20 '18 11:07 ZengyuanYu

@ZengyuanYu @mekomlusa Hey guys... Can you please please help me with finding the feature vector of the detected objects?? Like which layer should I try on?? What changes should I make in model.py file???

SwetaKaman avatar Apr 11 '19 13:04 SwetaKaman

This give the total area. How to get the area of each mask??

fabioaraujopt avatar Sep 03 '19 16:09 fabioaraujopt

This give the total area. How to get the area of each mask??

Did anyone found the answer to this? I need to find the area of each mask separately.

Gurdev-Singh avatar Dec 04 '19 12:12 Gurdev-Singh

how can we find number of mask

nupur0294 avatar Dec 22 '19 00:12 nupur0294

can we find mask area of single object

ArunMathewML avatar Jun 30 '20 06:06 ArunMathewML

Try this: np.reshape(r['masks'], (-1, r['masks'].shape[-1])).astype(np.float32).sum()

is it for single object

ArunMathewML avatar Jun 30 '20 06:06 ArunMathewML

Try this: np.reshape(r['masks'], (-1, r['masks'].shape[-1])).astype(np.float32).sum()

is it for single object

THis is for a pic with one object in it.

kimile599 avatar Dec 22 '20 00:12 kimile599

This give the total area. How to get the area of each mask??

Did anyone found the answer to this? I need to find the area of each mask separately.

Hey, you got some update for this one?

kimile599 avatar Dec 22 '20 00:12 kimile599

This give the total area. How to get the area of each mask??

object_count = len(r["class_ids"]) for i in range(object_count): print(sum((sum(r["masks"][:, :, i]*1))))

Spraseeth avatar Jul 26 '22 18:07 Spraseeth