InformationSystemsFreiburg / image_segmentation_japan

This small tutorial is targeted at researchers that have basic machine learning and Python programming skills that want to implement instance image segmentation for further use in their models.
https://rosenfelder.ai/Instance_Image_Segmentation_for_Window_and_Building_Detection_with_detectron2/
14 stars 6 forks source link

Can you guide me how I can find region properties of the predicted masks for each object in an image. #1

Open zunairaR opened 3 years ago

zunairaR commented 3 years ago

I want to find region properties like area, eccentricity, .. for the predicted mask of each image. From several tutorials and documentations, I found that detectron2 returns the predicted masks in bitmap format. ,But I couldn't find a way to label each mask in an image, when I try to do it, the number of labels is not equal to the number of objects predicted by the model. Need help!

MarkusRosen commented 3 years ago

Maybe try my tutorial again https://rosenfelder.ai/Instance_Image_Segmentation_for_Window_and_Building_Detection_with_detectron2/

I agree, handling the predicted masks correctly is quite difficult. Maybe inspect your code with a debugger like VSCode and one sample image. When adding a break point after the prediction you can take a detailed look into the prediction object with all masks and labels. Tutorial on how to do debugging in VSCode: https://www.youtube.com/watch?v=KEdq7gC_RTA