Try for Free
PRICING cloudOn-prem deployment
The Facebook Segment Anything Model is now available in the self-hosted version of CVAT

You asked and we delivered! Facebook Segment Anything Model (SAM) is now available in CVAT's self-hosted solution!

What is Segment Anything Model (SAM)?

SAM is the revolutionary image segmentation model designed to improve annotation speed and quality in the world of computer vision.

In computer vision, segmentation plays a critical role and is based on pixel classification and defining pixels that belong to specific objects within an image. This technique has numerous applications, from analyzing scientific imagery to editing photos.

Nonetheless, achieving accurate annotation through segmentation can be quite challenging. And building a segmentation model demands expertise, AI training infrastructure, and vast amounts of annotated data.

Facebook's SAM project tackles all these challenges head-on.

The aim behind SAM's design was to boost image segmentation speed and precision by introducing a new comprehensive model, trained on a record-breaking 1-Billion mask dataset -- the largest segmentation dataset ever.

And the goal was accomplished. With SAM, there's no need for specialized knowledge, high computing power, or custom data. The SAM model has it all covered. It performs object detection and generates masks for them in any image or video frame, even those it hasn't encountered before.

SAM can be utilized for various applications without additional training, showcasing its impressive zero-shot transfer capability.  It can be employed for data annotation across various fields, from medical to retail to autonomous vehicles. We eagerly anticipate discovering all the potential uses and applications that have yet to be imagined.

Annotate with Segment Anything Model (SAM) in CVAT

Now let's see how to use SAM in CVAT. This integration is currently available in a self-hosted solution and coming soon to cloud!

Note, that SAM is an interactor model, It means you can annotate by using positive and negative points.

The process is easy and described in the following video:

Or if you prefer text to the video, follow this instruction:

Deploy the model:

1. If necessary, follow the basic instructions to install CVAT with serverless functions support.

2. The model is available on both CPU and GPU. The second option is significantly quicker, but if you want to install a GPU version, please additionally set up NVIDIA container Toolkit.

3. To deploy the Segment Anything interactor just perform one of the following commands from the root CVAT directory on your host machine:

  • On GPU:  cd serverless && ./ pytorch/facebookresearch/sam/nuclio/
  • On CPU:   cd serverless && ./ pytorch/facebookresearch/sam/nuclio/

Annotate using the model:

Open CVAT, create a task, open an annotation job, and go to AI Tools > Interactors. You will find the model in the drop-down list.

Begin the annotation process by selecting the foreground using left mouse clicks and removing the background with right mouse clicks. Once the annotation is complete, save the job, and you'll be able to export the annotated objects in various supported formats.

What’s next?

We are currently working on adding the Segment Anything Model to cloud

Stay tuned and follow the news here:





April 12, 2023
Go Back