pytorchcocotools.internal.mask_api.rle_to_string
source module pytorchcocotools.internal.mask_api.rle_to_string
Functions
-
rleToString — Get compressed string representation of encoded mask.
source rleToString(rle: RLE, *, device: TorchDevice | None = None, requires_grad: bool | None = None) → bytes
Get compressed string representation of encoded mask.
Parameters
-
rle : RLE — Run length encoded string mask.
-
device : TorchDevice | None — The desired device of the bounding boxes.
-
requires_grad : bool | None — Whether the bounding boxes require gradients.
Note
Similar to LEB128 but using 6 bits/char and ascii chars 48-111.
Returns
-
bytes — Byte string of run length encoded mask.