concepts.vision.george_vision_pipeline.segmentation_models.ImageBasedPCDSegmentationModel#

class ImageBasedPCDSegmentationModel[source]#

Bases: object

Methods

segment_image(image)

Segment an image into objects and background.

__init__(model_name='maskrcnn_resnet50_fpn_v2', device='cpu', score_threshold=0.5)[source]#
Parameters:
  • model_name (str)

  • device (str)

  • score_threshold (float)

__new__(**kwargs)#
segment_image(image)[source]#

Segment an image into objects and background.

Parameters:

image (ndarray) – a numpy array of shape (H, W, 3) and dtype uint8.

Returns:

A tuple of (segmented_image, object_names, object_bboxes). segmented_image is a numpy array of shape (H, W, 3) and dtype uint8. object_names is a list of strings. object_bboxes is a list of tuples of ((x1, y1), (x2, y2)).

Return type:

InstanceSegmentationResult