Bitmask
What is Bitmask
A Bitmask is a type of annotation on Datature Nexus that allows for pixel-wise segmentation of an image. This method is particularly useful when:
- Bounding boxes and polygons lack precision
- Topologically separate regions belonging to the same class need to be labeled
Difference Between Bitmask and Polygon Annotations
Annotation Type | Characteristics | Flexibility |
---|---|---|
Polygon | Based on outline and vertices | Limited pixel control |
Bitmask | Control over individual pixels | Supports disjointed islands and holes |
Polygon vs. Bitmask Annotations
Polygon Annotations:
- Based on outline and vertices
- Support disjointed islands with additional grouping
- Do not support holes within annotations
Bitmask Annotations:
- Provide pixel-level control
- Support non-contiguous regions naturally
- Allow holes within annotations
- Cannot be mixed with polygon annotations in the same project
Working with Bitmask Annotations
Creating Bitmask Annotations
Project Setup:
Datature Nexus does not currently support mixing bitmask and polygon annotations. Select the "Bitmask" option when creating a project to access dedicated tools for this annotation type.

Annotation Tools:
Projects with bitmask annotations provide specialized tools like Paintbrush, Freedraw, Magnetic Lasso, and Magic Fill.
Editing Bitmask Annotations
Selecting Annotations:
Click on an existing bitmask object to select it. A bounding box will appear around the object. Use editing tools (e.g., Paintbrush, Freedraw) to modify the selected annotation
For overlapping bitmask annotations, only the topmost object will be selected. Use the bring forward/bring back functionality to access underlying objects.
Editing Workflow:
- Toggle between drawing and erasing modes using the y key.
- Undo/redo actions with Ctrl + Z or Ctrl + Shift + Z.
- Commit changes by pressing Space, or abort by pressing Esc.
Related Tools for Bitmask
Paintbrush
How to use:
- Left-click and drag to annotate
- Adjust brush size using [ and ] keys
- Toggle between draw and erase modes with 'y' key
- Undo/redo with ctrl + z and ctrl + shift + z
- Commit annotation with spacebar, abort with escape key
Draw with Polygon Vertices
How to use:
- Place vertices with left-click
- Straight line edges automatically generated
- Remove last point or close loop as needed
- Annotations outside image bounds will be clipped
Freedraw
How to use:
- Left-click and drag to outline region
- Area within draw stroke automatically filled
- Switch between draw and erase modes
- Undo/redo functionality available
- Commit or abort annotation similar to paintbrush
Magnetic Lasso
How to use:
- Click points along object edges
- Edge detection algorithm assists annotation
- During the annotation process, undo or adjust the last / previous stepβs checkpoint by clicking at it
- Adjust prediction range via βSettingsβ > Lasso Prediction Range (Pixels): Set prediction range for Lasso-based segmentation.
Magic Fill
How to use:
- Create annotations from homogenous image patches
- Flood algorithm based on pixel-to-pixel color difference
- Control fill area through dragging motion
- Toggle fill/erase modes
- Clean up small holes and stray patches automatically
Common Questions
How do I select overlapping bitmask objects?
Clicking selects the topmost object at a given pixel location. Use "Bring Forward/Bring Back" functionality to adjust stacking order for selection.
How do I choose the right annotation tool?
- Paintbrush: For precise, pixel-level control
- Polygon Vertices: When you need straight-edge boundaries
- Freedraw: For quick, freeform annotations
- Magnetic Lasso: For objects with well-defined edges
- Magic Fill: For large, uniform color regions
How can I improve annotation accuracy?
- Use multiple tools in combination
- Adjust brush size and threshold carefully
- Utilize the cleanup feature for refined results
How do I adjust Magic Fill responsiveness?
Hold down the Alt key while dragging to increase flood responsiveness for larger fills.
What if Magic Fill creates small holes or stray patches?
Use the "Clean Up" button in Annotation Settings to remove stray patches and fill small holes automatically.
π Need help? Contact us via website or email
π Join our Slack Community
π» For more resources: Blog | GitHub | Tutorial Page
π οΈ Need Technical Assistance? Connect with Datature Experts or chat with us via the chat button below π
Updated 6 days ago