Separate Instances of the Same Class
Two tree canopies touch, but the city needs separate tree counts.
Read the full lesson and open its transcript below. A narrated video will be added after production.
What you will learn
Two tree canopies touch, but the city needs separate tree counts.
A practical question
Two trees touch overhead. A semantic map correctly labels all their visible leaves as tree, but it doesn't tell us which pixels belong to which tree. Instance segmentation assigns a separate object identity to each region as well as its class.
The useful idea
That distinction matters if the city wants a count or an area for each tree. At overlapping branches, even human annotators may disagree about ownership. Define the visible-object rule and mark uncertain boundaries rather than pretending the camera sees hidden trunks.
Work through the example
Compare a semantic tree mask with two instance masks on the same photograph. Does the split follow visible evidence, or is it an arbitrary vertical line? Inspect isolated trees and overlapping ones before choosing a method. Two tree canopies touch in the image, but a city inventory may need a separate count and area for each tree. Compare a single semantic tree mask with two instance masks. If a dividing line runs through foliage without visible evidence, acknowledge the ambiguity instead of claiming a perfect separation. Look for trunk and branch context where it is visible. An instance identity is useful for counting, but it is still an interpretation of a partly hidden scene. Now check the idea on a concrete example: Compare one semantic tree mask with two separate instance masks on the same photograph. This supports a careful conclusion: Instance segmentation separates object identities even if both share the same semantic class. At the point where canopies overlap, two plausible instance boundaries may exist. Inspect trunk locations or a second view if available, and label the unresolved region consistently. The city still gets a count, but it should know where the image alone cannot settle ownership.
Limits and next step
Now that we have masks for individual objects, we'll evaluate both their overlap and their boundary quality.
Worked example
Compare one semantic tree mask with two separate instance masks on the same photograph.
Quick check: test your understanding
Try it yourself: Consider this case: Compare one semantic tree mask with two separate instance masks on the same photograph. Explain how you would check the result. In your answer, address this limitation: An instance ID is an annotation choice and can be ambiguous at heavy occlusion.
Check the reasoning
Instance segmentation separates object identities even if both share the same semantic class. An instance ID is an annotation choice and can be ambiguous at heavy occlusion.
What is the main idea behind separate instances of the same class?
Instance segmentation separates object identities even if both share the same semantic class.
How is it used in the example?
Compare one semantic tree mask with two separate instance masks on the same photograph.
What limitation should be checked?
An instance ID is an annotation choice and can be ambiguous at heavy occlusion.
Further reading
Programming Computer Vision with Python — Jan Erik Solem.
Original ToolsInVision teaching examples. Editorial approach · Suggest a correction
Accessible referenceLesson 58 transcript297 words · Narration ready for the upcoming videoOpen transcript
Two trees touch overhead. A semantic map correctly labels all their visible leaves as tree, but it doesn't tell us which pixels belong to which tree. Instance segmentation assigns a separate object identity to each region as well as its class.
That distinction matters if the city wants a count or an area for each tree. At overlapping branches, even human annotators may disagree about ownership. Define the visible-object rule and mark uncertain boundaries rather than pretending the camera sees hidden trunks.
Compare a semantic tree mask with two instance masks on the same photograph. Does the split follow visible evidence, or is it an arbitrary vertical line? Inspect isolated trees and overlapping ones before choosing a method. Two tree canopies touch in the image, but a city inventory may need a separate count and area for each tree. Compare a single semantic tree mask with two instance masks. If a dividing line runs through foliage without visible evidence, acknowledge the ambiguity instead of claiming a perfect separation. Look for trunk and branch context where it is visible. An instance identity is useful for counting, but it is still an interpretation of a partly hidden scene. Now check the idea on a concrete example: Compare one semantic tree mask with two separate instance masks on the same photograph. This supports a careful conclusion: Instance segmentation separates object identities even if both share the same semantic class. At the point where canopies overlap, two plausible instance boundaries may exist. Inspect trunk locations or a second view if available, and label the unresolved region consistently. The city still gets a count, but it should know where the image alone cannot settle ownership.
Now that we have masks for individual objects, we'll evaluate both their overlap and their boundary quality.