Meta AI Segment Anything Model (SAM) first experience

Recently, Meta AI released the Segment Anything model, which can directly segment any picture. I experienced it while it was hot.

Enter the official website & upload pictures

Open Segment Anything official website https://segment-anything.com/ :

https://segment-anything.com/
Click Try the demo , check "I have read..." in the pop-up dialog box, and enter the upload interface:

https://segment-anything.com/demo

Click "Upload an image" to upload your own picture:

upload image

The size of the picture I uploaded was 5.14MB, and it took 3 minutes and 06 seconds to extract the object.

mouseover

Hover & Click - intercept objects

After processing, when the mouse hovers over an object, the object is marked blue. Click "Hover & Click" on the left, then left-click an area of ​​the image to add the object to the selection, and right-click to remove the selection. For example, if I want to cut out the house but don't want the pipes, I can left-click all parts of the house to select them, and then right-click the pipes, so that the house is selected but the pipes are excluded. The green dot in the figure below is the left-click position, and the red dot is the right-click position:

Hover & Click

After the selection, click "Cut out object", and then the result will be saved in the "Cut-Outs" column.

Cut-Outs

Box - box selection object

If the "Box" column on the left is selected, then the way we select the object is not to left/right click, but to draw a box that can roughly frame it. In the image below I framed the house:

Box
The way to save the selected area is still to click "Cut out object".

Everything - extract all objects

Click on the "Everything" column, we can identify all the objects in the picture:

Everything

All object areas are stored in the "Cut-Outs" column:

Cut-Outs

Cut-Outs - extract results

Finally, if you want to save the object we have intercepted, you only need to right-click the picture in the Cut-Outs column, and select "Save Picture As" in the pop-up menu.

Save as

The background of the picture obtained in this way is transparent and can be imported into PS for use. However, I found that its resolution is lower than the original image, probably because the image I uploaded is too large.

Well, my first experience with SAM is like this, and I feel that the effect is not bad. Hope you all have fun~

おすすめ

転載: blog.csdn.net/qaqwqaqwq/article/details/130014673