Annotating overlapping classes

For Instance Segmentation, what is the best approach to annotating masks partially hidden by an object? I’m labeling ā€˜dumpsters’ and ā€˜trash’. The below image shows ā€˜trash’ sitting on top of the ā€˜dumpster’. When annotating the ā€˜dumpster’, should I include this boundary in the ā€˜dumpster’ class or should I act like the trash isn’t there and draw a straight line through to connect the visible parts of the dumpster? I’ve drawn a red box around the specific area in question.

Are there any transformations that can help with this? My main concern is training my model that a dumpster has an erratic shape, when in actuality it’s straight lines.

Hi @E_Meyer!
The dumpster mask should go straight through the trash mask, this will properly account for the straight lines of a dumpster.

You are exactly right, you do not want to train your model that a dumpster has an erratic shape. Great work!!

Thank you so much @Ford ! You’re the only person to respond in the several different websites I was asking this. For those that stumble upon this…take a step back and ask yourself what you’re trying to do. For my use case, I want to get a rough % of fullness based on the ā€˜dumpster’ and ā€˜trash’ masks. I was so far into my project that I took a step back and simply asked ā€œis that piece of trash part of that dumpster?ā€. In my case, No…it is not. Furthermore, based on what I’m trying to do I’d get getting erroneous ā€˜volume’ for my dumpster.