facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.29k stars 2.5k forks source link

generating instance label map at inference #422

Closed yaoliUoA closed 5 years ago

yaoliUoA commented 5 years ago

Hi

Given a trained mask-rcnn model, I want to geneate an instance label map at inference time, which encodes each instance with an unique label (background with label 0). It is not trivial as sometimes the segmentations generated from mask-rcnn can be overlapping, ie, one pixel can assigned to multiple instances. Does this package support generating instance label map? Are there any functions in the package support this?

fmassa commented 5 years ago

Hi,

Check the demo that we have, in particular https://github.com/facebookresearch/maskrcnn-benchmark/blob/1589ce0941c118dda90a8b134c8708b67f36cb5f/demo/predictor.py#L274-L298

We don't guarantee that the pixels of the different objects is non-overlapping though. This repo currently only addresses instance segmentation, and not panoptic segmentation.

fmassa commented 5 years ago

I'm closing this issue as we are tracking panoptic segmentation request in https://github.com/facebookresearch/maskrcnn-benchmark/issues/337