Roboflow Docs
DashboardResourcesProducts
  • Product Documentation
  • Developer Reference
  • Changelog
  • Roboflow Documentation
  • Quickstart
  • Workspaces
    • Workspaces, Projects, and Models
    • Create a Workspace
    • Manage Team Members
    • Role-Based Access Control
    • Usage Based Pricing
      • View Plan Usage
      • Purchase Pre-Paid Credits
      • Flex Credit Billing
    • Rename a Workspace
    • Delete a Workspace
  • Workflows
    • What is Workflows?
    • Create a Workflow
    • Build a Workflow
    • Test a Workflow
    • Deploy a Workflow
    • Workflow Examples
      • Multimodal Model Workflow
    • Share a Workflow
    • Workflows AI Assistant
  • Dataset Management
    • Create a Project
    • Upload Images, Videos, and Annotations
      • Import Data from Cloud Providers
        • AWS S3 Bucket
        • Azure Blob Storage
        • Google Cloud Storage
      • Import from Roboflow Universe
    • Manage Datasets
      • Dataset Batches
      • Search a Dataset
      • Set Dataset Classes
      • Add Tags to Images
      • Create an Annotation Attribute
      • Download an Image
      • Delete an Image
    • Dataset Versions
      • Create a Dataset Version
      • Preprocess Images
      • Augment Images
      • Delete a Version
      • Export a Dataset Version
    • Dataset Analytics
    • Merge Projects
    • Rename a Project
    • Delete a Project
    • Project Folders
    • Make a Project Public
  • Annotate
    • Introduction to Roboflow Annotate
    • Annotate an Image
      • Keyboard Shortcuts
      • Comment on an Image
      • Annotation History
      • Similarity Search
    • AI Labeling
      • Label Assist
      • Enhanced Smart Polygon with SAM
        • Smart Polygon (Legacy)
      • Box Prompting
      • Auto Label
    • Set Keypoint Skeletons
    • Annotate Keypoints
    • Annotate Multimodal Data
    • Collaborate on Annotations
    • Annotation Insights
  • Managed Labeling
  • Train
    • Train a Model
      • Train from a Universe Checkpoint
      • Train from Azure Vision
      • Train from Google Cloud
    • Roboflow Instant
    • Cancel a Training Job
    • Stop Training Early
    • View Training Results
    • View Trained Models
    • Evaluate Trained Models
  • Download a Dataset Version
  • Deploy
    • Deploy a Model or Workflow
    • Managed Deployments
    • Serverless Hosted API V2
      • Use in a Workflow
      • Use with the REST API
      • Run an Instant Model
    • Serverless Hosted API
      • Object Detection
      • Classification
      • Instance Segmentation
        • Semantic Segmentation
      • Keypoint Detection
      • Foundation Models
        • CLIP
        • OCR
        • YOLO-World
      • Video Inference
        • Use a Fine-Tuned Model
        • Use CLIP
        • Use Gaze Detection
        • API Reference
        • Video Inference JSON Output Format
      • Pre-Trained Model APIs
        • Blur People API
        • OCR API
        • Logistics API
        • Image Tagging API
        • People Detection API
        • Fish Detection API
        • Bird Detection API
        • PPE Detection API
        • Barcode Detection API
        • License Plate Detection API
        • Ceramic Defect Detection API
        • Metal Defect Detection API
    • Dedicated Deployments
      • Create a Dedicated Deployment
      • Make Requests to a Dedicated Deployment
      • Manage Dedicated Deployments with an API
    • Batch Processing
    • SDKs
      • Python inference-sdk
      • Web Browser
        • inferencejs Reference
        • inferencejs Requirements
      • Lens Studio
        • Changelog - Lens Studio
      • Luxonis OAK
    • Upload Custom Model Weights
    • Download Model Weights
    • Enterprise Deployment
      • License Server
      • Offline Mode
      • Kubernetes
      • Docker Compose
    • Monitor Deployed Models
      • Alerting
  • Universe
    • What is Roboflow Universe?
    • Find a Dataset on Universe
    • Explore Images in a Universe Dataset
    • Fork a Universe Dataset
    • Find a Model on Universe
    • Download a Universe Dataset
  • Set a Project Description
  • View Project Analytics
  • Support
    • Share a Workspace with Support
    • Delete Your Roboflow Account
    • Apply for Academic Credits
Powered by GitBook
On this page
  • How to Use Smart Polygon
  • Visualize Segmentation Layers

Was this helpful?

  1. Annotate
  2. AI Labeling
  3. Enhanced Smart Polygon with SAM

Smart Polygon (Legacy)

Generate polygon annotations with a few clicks.

PreviousEnhanced Smart Polygon with SAMNextBox Prompting

Last updated 7 months ago

Was this helpful?

Roboflow now offers an powered by the Segment Anything Model (SAM).

Smart Polygon is an annotation assistant available in Roboflow Annotate. You can use Smart Polygon to generate a polygon annotation for an object in an image.

How to Use Smart Polygon

To use the Smart Polygon feature, click Smart Polygon in the labeling toolbar (Shortcut Key: S).

Smart Polygon in the Annotation Toolbar

Then, click the center of the object you want to label and Smart Polygon will apply an initial label to the object.

This will use a machine learning model behind the scenes to suggest a shape for your object.

Your target polygon may be predicted accurately with just a single click and you can move on to the next object by pressing enter, then selecting a class for your object.

To make the polygon fit better to the object, click areas on the object that should not be highlighted. These will be added as negative points, denoted in the annotation tool with a small red box.

Using the Smart Polygon options on the top-left of the annotation tool, you are able to choose the number of vertices in your label by toggling between Convex Hull, Smooth, and Complex labels. You can also undo points you've placed if you make a mistake.

Visualize Segmentation Layers

Smart Polygon is helpful for labeling semantic segmentation data as well. Just be sure to properly order the objects' z-indexes so the masks are properly stacked according to how you would want to train your model. You can visualize the stacking by using the Layers tab in the sidebar. This will help you understand what your segmentation mask will look like once rasterized.

The Layers tab is available on all Roboflow project types. To edit a bounding box without changing the ordering of Layers, simply click on the Layer/annotation you'd like to edit in the Layers tab and then make your edits.

Smart Polygon Options (Convex Hull, Smooth, Complex labels)
enhanced Smart Polygon experience
The purple outline is the Smart Polygon annotation generated with one click.
A polygon with red points showing areas that were formerly part of the polygon but have now been removed.