Skip to content

Get one segment using label or index #1

@omerjadoon

Description

@omerjadoon

Hello my question is how can i get a single segment of image by passing either class index or class name.

#@title C. Run Inference (CPU)
#@markdown Specify the task. Default: panoptic. Execution may take upto 2 minutes

task = "panoptic" #@param
%load_ext autotime
out = TASK_INFER[task](img, predictor, metadata).get_image()
cv2_imshow(out[:, :, ::-1])

This code returns me an image with segmentation and labeled image.

But lets say i just want to extract the specific segment of a target class from this image.. for example segment of tree from whole picture. how can i do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions