Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masks of the same class predicted as if being 1 object #141

Closed
melodie-r opened this issue Sep 9, 2019 · 3 comments
Closed

Masks of the same class predicted as if being 1 object #141

melodie-r opened this issue Sep 9, 2019 · 3 comments

Comments

@melodie-r
Copy link

melodie-r commented Sep 9, 2019

Hello,

I managed to train on a custom dataset and get very good prediction results on instance segmentation, but all the masks on the image appear inside 1 box, as if being the same object.
Is there a parameter to change for each mask to be recognised as a different object? (in the annotations, there is 1 mask per object).

In 1 target, I have for instance 5 segmentations, and 1 bbox. Could this be the issue? Are the different masks supposed to be in different targets? I followed the instructions on this post to annotate my images so I don't understand why would the annotations be wrong but...

Thank you in advance for any insight on this.

@dbolya
Copy link
Owner

dbolya commented Sep 9, 2019

Uhh I'm not sure what you mean by that because in COCO, there's one mask per bbox. I haven't used labelme myself, but check the resulting JSON to see if it makes sense. You can do this by opening the json using the json package in python, then check the 'annotations' list. That should have as many annotations as you have segmentations, so check if the length of that list is appropriate.

Then you should also check the bbox for those annotations to check if they surround the mask. Your bounding boxes should surround just the mask that's being predicted and include no padding around that, since that could confuse the network.

@melodie-r
Copy link
Author

Sorry, it turns out it was an issue with the labels.
When using labelme, the different objects on the frame must have names differentiated by -#, for instance object-1, object-2 and not object1, object2.

@watertianyi
Copy link

@melodie-r
How to label a single category with labelme? After looking at the user-defined data set, there is no annotation naming method. For example, there is only one category in a graph: cat, cat, cat or CAT1, cat2, Cat3 or cat-0, cat-1, cat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants