Image Segmentation Using Segment Anything Model (SAM) Introduced By Facebook (Meta)

Hello Learners…

Welcome to my blog…

Table Of Contents:

  • Introduction
  • What is segmentation?
  • What is SAM Model?
  • Demo of SAM Model
  • Summary
  • References

Introduction

In this post, we discuss an image segmentation model Segment Anything (SAM) model introduced by Facebook(Meta). Using this model we can segment different types of objects in our images.

What is Segmentation?

Segmentation is getting pixel values of objects from given images or we can say that it detects which pixels belong to which object.

Here is an example of image segmentation, in which we can see the detected region around the objects.

Example Of An Image Segmentation
Example Of An Image Segmentation

What is Segment Anything (SAM) Model?

Segment Anything Model is a Segmentation model introduced by Facebook, which can be used for segmentation purposes.

Demo of Segment Anything Model (SAM)

Here is a quick demo of the Segment Anything Model (SAM).

First, we go to the below site:

We can see the below interface, here we can upload our image or we can use any image from given images.

Here we select images from the given images.

Segment Anything Demo
Segment Anything Demo

Here we select the image in which a dog is running, here dog is an object.

Segment Anything
Segment Anything

From Lef-Sidebar we select Hover & Click and then click the dog(object).

We can see the image below.

Image Segmentation
Image Segmentation

Now we are going to crop that detected object.

Crop Image Segmentation
Crop Image Segmentation

Now From Left-Sidebar, we select the cut-out object.

we can see the below. On the left sidebar, we can see our object (dog).

Cut Out The Image Segmentation

This is the Cropped Image from the image segmentation.

Cropped Image Of Image Segmentation
Cropped Image Of Image Segmentation

Summary

This is a quick demo of image segmentation, how image segmentation works, and using the Segment Anything Model (SAM) how we can do image segmentation.

Happy Learning And Keep Learning…

Thank you…

References

2 thoughts on “Image Segmentation Using Segment Anything Model (SAM) Introduced By Facebook (Meta)”

Leave a Comment