MapMask is broken
Opened this issue · 1 comments
artyompal commented
I'd like to report the following problems with MapMask:
- It uses
foreground=255
, but if you look to the map, you'll notice that white color means background. - Function
is_on_mask
is broken because it ignores 3 channels of RGB picture. (Python complains about indexing). The fix would be to check if all channels are white or non-white, like:
mask = np.all(this_mask[py[on_mask], px[on_mask]], axis=-1)
artyompal commented
Repro:
mask_map.is_on_mask(10000, 10000)
Or:
mask_map.is_on_mask(10000, 10000, dilation=1)
(this results in another error).