neodroidvision.segmentation.masks.run_length_encoding.run_length_to_mask

neodroidvision.segmentation.masks.run_length_encoding.run_length_to_mask(mask_rle: str = '', shape: tuple = (1400, 2100)) ndarray[source]

Decode rle encoded mask.

Parameters
  • mask_rle – run-length as string formatted (start length)

  • shape – (height, width) of array to return

Returns numpy array, 1 - mask, 0 - background