Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get one segment using label or index #1

Open
omerjadoon opened this issue Sep 19, 2023 · 0 comments
Open

Get one segment using label or index #1

omerjadoon opened this issue Sep 19, 2023 · 0 comments

Comments

@omerjadoon
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant