cuvis_ai.utils.numpy
Functions
|
converts a binary mask to RLE shamelessly copied from https://stackoverflow.com/a/76990451 :param binary_mask: :return: |
|
|
|
|
|
|
|
|
|
|
|
generating coco labels from numpy image and mask, occluded objects can not be labeled correctly at the moment :param mask: mask should be a mask containing zeros for background and integers for labels :param label_names: list of labels :param output_dir: path where to save the json file, if the output file already exists, the generated labels will be appended :param name: name of the json file :param img: image for which these labels apply :param single_object_per_label: clarify if every object has its own label or if multiple objects share the same label. |
|
|
|
|
|
|
|
|
|