rlemasklib#

Library for manipulating masks stored in run-length-encoded format.

This library is an extended version of the pycocotools library’s RLE functions, originally developed by Piotr Dollár and Tsung-Yi Linfor the COCO dataset [1].

There are two ways to use this library:

  1. with the RLEMask class, which is an object-oriented way to manipulate RLE masks (recommended)

  2. with global functions, which take RLE masks in a dictionary representation, with the keys ‘counts’ and ‘size’

Classes#

RLEMask

Run-length encoded mask.

References