A new friend of computer vision developers: SAM (segmented arbitrary model, tutorial with source code)

Time spent annotating may quickly become a thing of the past.

Meta's FAIR lab recently introduced the Segment Anything Model, an advanced image segmentation model designed to revolutionize computer vision. It can generate high-quality object masks based on input cues such as points or boxes. The model can also generate masks for all objects in the image.

insert image description here

What's the big deal?

If you've spent hours annotating images on LabelImg, LabelMe, or any other annotation tool like me, you'll also see why SAM is our new best friend. Segmenting annotations is a very time-consuming and tedious task. For example, to annotate a person in an image, you must place multiple points around their body to capture the different edges and curves and create a mask for the person. Whereas with SAM, the model will segment the image and you just need to confirm the mask and add the label "Person".

An interesting property: SAM has zero-shot generalization capability. This refers to the ability of a model to perform well on image segmentation tasks for which it was not explicitly trained, without requiring additional training or fine-tuning.

try it yourself

The demo page lets you feel the functionality of the model. Check it out here:

 https: //segment-anything.com/demo

Please add a picture description

It is also very simple to set up the codebase and try out the models. It took me about 20 minutes. Here is an overview of the steps I followed

  • Install PyTorch and TorchVision
  • installed segment anything
  • I installed some of the other libraries mentioned for mask postprocessing.

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/131990824