blenderproc.python.utility.LabelIdMapping module¶
-
class
blenderproc.python.utility.LabelIdMapping.LabelIdMapping[source]¶ Bases:
objectHandles category id mapping for semantic segmentation maps.
-
static
from_csv(path, label_col_name='name', id_col_name='id')[source]¶ Builds a label-id mapping based on the given csv file.
Parameters: - path – The path to a csv file.
- label_col_name – The name of the column which should be used as label.
- id_col_name – The name of the column which should be used as id.
Return type: Returns: The built label mapping object.
-
static
from_dict(label_to_id)[source]¶ Builds a label-id mapping based on the given dict.
Parameters: label_to_id ( dict) – A dict where keys are labels and values are ids.Return type: LabelIdMappingReturns: The built label mapping object.
-
has_id(id_value)[source]¶ Checks if the mapping contains the given id.
Parameters: id_value ( int) – The id to look for.Return type: boolReturns: True, if the id is already in use.
-
has_label(label)[source]¶ Checks if the mapping contains the given label.
Parameters: label ( str) – The label to look for.Return type: boolReturns: True, if the label is already in use.
-
static