facebookresearch / segment-anything

The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
45.64k stars 5.39k forks source link

How can I add an object that is segmented to the extracted mask? Using Segment Anything model? #616

Open Syed05 opened 8 months ago

Syed05 commented 8 months ago

I want to add an object that is segmented on the extracted mask.

mask_image = (mask * 255).astype(np.uint8) cv2.imwrite('mask.png', mask_image)

Nomination-NRB commented 8 months ago

我想添加一个在提取的蒙版上分割的对象。

mask_image = (mask * 255).astype(np.uint8) cv2.imwrite('mask.png', mask_image)

You can use this project: https://github.com/Nomination-NRB/SAM-webui