SamsungLabs / fbrs_interactive_segmentation

[CVPR2020] f-BRS: Rethinking Backpropagating Refinement for Interactive Segmentation https://arxiv.org/abs/2001.10331
Mozilla Public License 2.0
583 stars 94 forks source link

Automatic masks range selection for better visualization #20

Closed TwistedW closed 4 years ago

TwistedW commented 4 years ago

The range of the mask needs to be changed.

ksofiyuk commented 4 years ago

Hi, it's a good idea! I updated your code as there was missed non-None check for the mask before multiplication. And I also replaced 255 multiplier with 255 // mask.max(), which also better handles masks with multiple objects.

ksofiyuk commented 4 years ago

So with this fix, saved masks become more visually distinguishable.

For 1 object: mask1

For 5 objects: mask4

TwistedW commented 4 years ago

Hi, it's a good idea! I updated your code as there was missed non-None check for the mask before multiplication. And I also replaced 255 multiplier with 255 // mask.max(), which also better handles masks with multiple objects.

Well, a better way.