[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-08 UTC."],[],[],null,["# tflite_support.task.processor.Segmentation\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/segmentations.proto) |\n\nRepresents one Segmentation object in the image segmenter's results. \n\n tflite_support.task.processor.Segmentation(\n height: int,\n width: int,\n colored_labels: List[../../../tflite_support/task/processor/ColoredLabel],\n category_mask: Optional[np.ndarray] = None,\n confidence_masks: Optional[List[ConfidenceMask]] = None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `height` | The height of the mask. This is an intrinsic parameter of the model being used, and does not depend on the input image dimensions. |\n| `width` | The width of the mask. This is an intrinsic parameter of the model being used, and does not depend on the input image dimensions. |\n| `colored_labels` | A list of `ColoredLabel` objects. |\n| `category_mask` | A NumPy 2D-array of the category mask. |\n| `confidence_masks` | A list of `ConfidenceMask` objects. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `create_from_pb2`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/segmentations.proto) \n\n @classmethod\n create_from_pb2(\n pb2_obj: _SegmentationProto\n ) -\u003e 'Segmentation'\n\nCreates a `Segmentation` object from the given protobuf object.\n\n### `to_pb2`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/segmentations.proto) \n\n to_pb2() -\u003e _SegmentationProto\n\nGenerates a protobuf object to pass to the C++ layer.\n\n### `__eq__`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/segmentations.proto) \n\n __eq__(\n other: Any\n ) -\u003e bool\n\nChecks if this object is equal to the given object.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|---------------------------------|\n| `other` | The object to be compared with. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| True if the objects are equal. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Class Variables --------------- ||\n|------------------|--------|\n| category_mask | `None` |\n| confidence_masks | `None` |\n\n\u003cbr /\u003e"]]