Deep Learning voor afbeeldingen met PyTorch
Michal Oleszak
Machine Learning Engineer
Originele afbeelding

Semantische segmentatie

Instance-segmentatie

Panoptische segmentatie

Combineren van semantische en instance-segmentatie is lastig:
Onze workflow:
model = UNet()
with torch.no_grad():
semantic_masks = model(image_tensor)
print(semantic_masks.shape)
torch.Size([1, 3, 427, 640])
semantic_mask = torch.argmax(
semantic_masks, dim=1
)

model = MaskRCNN()with torch.no_grad(): instance_masks = model(image_tensor)[0]["masks"] print(instance_masks.shape)
torch.Size([80, 1, 427, 640])

panoptic_mask = torch.clone(semantic_mask)instance_id = 3 for mask in instance_masks:panoptic_mask[mask > 0.5] = instance_idinstance_id += 1

Deep Learning voor afbeeldingen met PyTorch