Open orbiskcw opened 3 years ago
Hi. We will take a look on this issue meanwhile.
As a quick fix, would a semantic mask (e.g each pixel can have values of {C}, where C - total number of classes) work for your case?
Hi. Thank you for the quick response and the suggested quick fix. That will indeed work for me. I have been working on instance segmentation for so long now, that it did not even occur to me! :wink:
Thanks! :raised_hands:
You also could to stack all mask into single multichannel mask: np.dstack(masks)
🐛 Bug
I believe the MaskDropout transformation cannot be applied to multiple masks as described in the documentation here and I am thus not sure how to then provide the data such that for an instance segmentation problem, it can randomly mask out between 0 and N masks (rather than always all masks or no masks). From the above referenced page, I am under the impression that simple calling a
Compose
object with the namedmasks
argument (a list of numpy arrays) should be enough, but this results in the following assertion error for me:To Reproduce
I included a minimal example to reproduce the issue:
Expected behavior
As explained in the documentation on the masks datatype and as hinted towards in the MaskDropout documentation, I feel like we should be able to pass the
masks
argument with a mask per instance. Based on your parameters, a randomly chosen subset of these masks is then dropped out.Environment
conda
,pip
, source): poetryAdditional context
I am not 100% sure whether this is a bug or intentional, but if I misunderstood and it is intentional, could you elaborate on how to use the MaskDropout augmentation with multiple instances as described in the documentation: