Supervisely
AboutAPI ReferenceSDK Reference
  • 🤖What's Supervisely
  • 🚀Ecosystem of Supervisely Apps
  • 💡FAQ
  • 📌Getting started
    • How to import
    • How to annotate
    • How to invite team members
    • How to connect agents
    • How to train models
  • 🔁Import and Export
    • Import
      • Overview
      • Import using Web UI
      • Supported annotation formats
        • Images
          • 🤖Supervisely JSON
          • 🤖Supervisely Blob
          • COCO
          • Yolo
          • Pascal VOC
          • Cityscapes
          • Images with PNG masks
          • Links from CSV, TXT and TSV
          • PDF files to images
          • Multiview images
          • Multispectral images
          • Medical 2D images
          • LabelMe
          • LabelStudio
          • Fisheye
          • High Color Depth
        • Videos
          • Supervisely
        • Pointclouds
          • Supervisely
          • .PCD, .PLY, .LAS, .LAZ pointclouds
          • Lyft
          • nuScenes
          • KITTI 3D
        • Pointcloud Episodes
          • Supervisely
          • .PCD, .PLY, .LAS, .LAZ pointclouds
          • Lyft
          • nuScenes
          • KITTI 360
        • Volumes
          • Supervisely
          • .NRRD, .DCM volumes
          • NIfTI
      • Import sample dataset
      • Import into an existing dataset
      • Import using Team Files
      • Import from Cloud
      • Import using API & SDK
      • Import using agent
    • Migrations
      • Roboflow to Supervisely
      • Labelbox to Supervisely
      • V7 to Supervisely
      • CVAT to Supervisely
    • Export
  • 📂Data Organization
    • Core concepts
    • MLOps Workflow
    • Projects
      • Datasets
      • Definitions
      • Collections
    • Team Files
    • Disk usage & Cleanup
    • Quality Assurance & Statistics
      • Practical applications of statistics
    • Operations with Data
      • Data Filtration
        • How to use advanced filters
      • Pipelines
      • Augmentations
      • Splitting data
      • Converting data
        • Convert to COCO
        • Convert to YOLO
        • Convert to Pascal VOC
    • Data Commander
      • Clone Project Meta
  • 📝Labeling
    • Labeling Toolboxes
      • Images
      • Videos 2.0
      • Videos 3.0
      • 3D Point Clouds
      • DICOM
      • Multiview images
      • Fisheye
    • Labeling Tools
      • Navigation & Selection Tools
      • Point Tool
      • Bounding Box (Rectangle) Tool
      • Polyline Tool
      • Polygon Tool
      • Brush Tool
      • Mask Pen Tool
      • Smart Tool
      • Graph (Keypoints) Tool
      • Frame-based tagging
    • Labeling Jobs
      • Labeling Queues
      • Labeling Consensus
      • Labeling Statistics
    • Labeling with AI-Assistance
  • 🤝Collaboration
    • Admin panel
      • Users management
      • Teams management
      • Server disk usage
      • Server trash bin
      • Server cleanup
      • Server stats and errors
    • Teams & workspaces
    • Members
    • Issues
    • Guides & exams
    • Activity log
    • Sharing
  • 🖥️Agents
    • Installation
      • Linux
      • Windows
      • AMI AWS
      • Kubernetes
    • How agents work
    • Restart and delete agents
    • Status and monitoring
    • Storage and cleanup
    • Integration with Docker
  • 🔮Neural Networks
    • Overview
    • Inference & Deployment
      • Overview
      • Supervisely Serving Apps
      • Deploy & Predict with Supervisely SDK
      • Using trained models outside of Supervisely
    • Model Evaluation Benchmark
      • Object Detection
      • Instance Segmentation
      • Semantic Segmentation
      • Custom Benchmark Integration
    • Custom Model Integration
      • Overview
      • Custom Inference
      • Custom Training
    • Legacy
      • Starting with Neural Networks
      • Train custom Neural Networks
      • Run pre-trained models
  • 👔Enterprise Edition
    • Get Supervisely
      • Installation
      • Post-installation
      • Upgrade
      • License Update
    • Kubernetes
      • Overview
      • Installation
      • Connect cluster
    • Advanced Tuning
      • HTTPS
      • Remote Storage
      • Single Sign-On (SSO)
      • CDN
      • Notifications
      • Moving Instance
      • Generating Troubleshoot Archive
      • Storage Cleanup
      • Private Apps
      • Data Folder
      • Firewall
      • HTTP Proxy
      • Offline usage
      • Multi-disk usage
      • Managed Postgres
      • Scalability Tuning
  • 🔧Customization and Integration
    • Supervisely .JSON Format
      • Project Structure
      • Project Meta: Classes, Tags, Settings
      • Tags
      • Objects
      • Single-Image Annotation
      • Single-Video Annotation
      • Point Cloud Episodes
      • Volumes Annotation
    • Developer Portal
    • SDK
    • API
  • 💡Resources
    • Changelog
    • GitHub
    • Blog
    • Ecosystem
Powered by GitBook
On this page
  • What is Mask Pen Annotation Tool?
  • Video Tutorial
  • How to use Mask Pen Tool
  • Create class with Mask shape
  • Manual Annotation Guide
  • Pro Tips
  • Hotkeys

Was this helpful?

  1. Labeling
  2. Labeling Tools

Mask Pen Tool

Learn how to use the Mask Pen annotation tool, a powerful combination of polygonal contours and freeform drawing, to create precise and flexible segmentation masks.

PreviousBrush ToolNextSmart Tool

Last updated 7 months ago

Was this helpful?

What is Mask Pen Annotation Tool?

The Mask Pen Tool is a versatile annotation tool that combines the precision of polygonal drawing with the flexibility of freeform brush strokes. This tool allows you to outline objects with both sharp, straight lines and smooth, curved contours, enabling you to create segmentation masks that perfectly match the shape of any object.

The Mask Pen tool helps when objects have a mix of sharp and blurred edges, or when a high level of detail is required in complex environments.

Video Tutorial

Watch our comprehensive 5-minute video tutorial where our Supervisely expert guides you through the Mask Pen tool's functionalities.

How to use Mask Pen Tool

Follow these step-by-step instructions to effectively use the Mask Pen tool for image segmentation.

Create class with Mask shape

  1. Click the Pen Icon in the toolbar of the labeling interface.

  2. Or select an existing object class or add a new class by clicking Add new class definition.

  3. In the modal window, enter the class name, choose the Mask or Any shape, and configure additional settings (e.g., color, hotkeys).

  4. Click the Create button to add the new class to the definitions list.

  5. Select the newly created class and segment the object with the mask in the image or video.

Manual Annotation Guide

  1. You can start by drawing a polygon or a freehand shape mask around the object area.

  • Polygon Mode: Click on the image to create points along the boundary of the object. Each click adds a new point, forming a straight line between them. This mode is ideal for objects with well-defined, straight edges.

  • Brush Mode: Hold the SHIFT key to switch between modes and, while holding down the left mouse button, draw free-form shapes. This is useful for objects with irregular boundaries.

  1. To finish drawing the mask, connect the last point to the starting point or press the SPACE key to close the shape. This creates a closed mask around the object.

  2. You can easily modify the mask after the figure is completed. To add parts to the mask, select the object and draw the new sections you want to include. To erase parts of the mask, hold the SHIFT key and draw over the area to be removed.

Fill holes in the mask If there are gaps or holes in the mask, use the Bucket Fill tool to quickly fill them with a single click. The selected object will be highlighted with a grid of dots, indicating the area to be filled.

Segmentation of partially visible objects

Unlike a regular polygon, the Mask Pen tool lets you pick spread out parts of an object in the image, even if they're not connected thanks to its integrated brush functions. Each part you select belongs to just one object until you press the SPACE key and choose a new shape.

Split the mask into two figures If you need to split a single mask into multiple separate objects, use the Polygon Split tool:

  1. Outline the area to be separated and reconnect it to the starting point. Splitting the figure into parts results in multiple objects of the same class, which can then be individually classified.

  2. If necessary, Change the class of each part of an object. You can opt for two alternative methods:

    • Right-click on the object and chose Change Class, OR

    • Select the object from the right panel and modify its class.

  3. Once you've finished adjusting the mask, press SPACE or click the first point again to complete the annotation. This will save your changes and create a final segmentation mask.

Hint: To quickly cut out the specific pixels of an object, click randomly near the object's boundary in areas without nearby objects.

Pro Tips

  • Use the Object Color Randomizer to instantly change the color of any object with a single click, as often as you like. This is particularly useful if you have many objects of the same class, or if they are close together, so you can easily differentiate between masks.

Hotkeys

Control the Mask Pen tool more efficiently with HOTKEYS.

Mask Pen Tool
9

Form polygon area

Form free shape area

Erase

Hold Shift

Remove point

Finish

Space

Finish

Click the first point

Use Polygon Split (to cut mask into two figures) and Bucket Fill (to fill holes) in the tool subpanel
Scene Navigation

Zoom with MOUSE WHEEL. Hold RIGHT MOUSE BUTTON to move scene.

You can create a new class directly from the . To do this:

Discover all the advanced features and unique applications of the Pen Tool in .

+ Draw

Shift +

Finish area using SPACE or the first point.

📝
Annotation Toolbox
our comprehensive blog post
LogoMask Pen Annotation Tool for Object Segmentation in Supervisely - SuperviselySupervisely