the RLE counts
Get an element in the counts.
Get an element in the counts. Process the overflowed int
height of the image
Get the height and width
Get the height and width
Convert to a RLE encoded masks
Convert to a RLE encoded masks
width of the image
A mask of regions defined by RLE. The masked object(s) should have the same label. This class corresponds to "uncompressed RLE" of COCO dataset. RLE is a compact format for binary masks. Binary masks defines the region by assigning a boolean to every pixel of the image. RLE compresses the binary masks by instead recording the runs of trues and falses in the binary masks. RLE is an array of integer. The first element is the length of run of falses staring from the first pixel. The second element of RLE is the is the length of first run of trues. e.g. binary masks: 00001110000011 RLE: ---4--3----5-2 ====> 4,3,5,2
Also note that we don't use COCO's "compact" RLE string here because this RLE class has better time & space performance.