Skip to main content

Mask Editor

The mask editor lets you create and refine masks that define which pixels belong to each trait. Clean masks are essential for quality layer extraction.

Editor Layout

The mask editor appears on the Detection page:

  • Canvas - Shows base image with mask overlay (red tint)
  • Toolbar (left) - Drawing tools and settings
  • Thumbnail stack (right) - Switch between mask variants
  • Navigation (top) - Move between all masks

Tools

Pan Tool (P)

Move around the canvas without affecting the mask.

  • Click and drag to pan
  • Use scroll wheel to zoom
  • Double-click to reset view
  • Hold Space to temporarily pan while using any other tool

Brush Tool (B)

Add to the mask (paint white pixels).

  • Click and drag to paint
  • Shift + drag for straight lines
  • Scroll wheel to resize brush

Eraser Tool (E)

Remove from the mask (paint black pixels).

  • Same controls as brush
  • Removes areas from the mask

Rectangle Tool

Draw rectangular shapes on the mask.

  • Click and drag to draw a rectangle
  • Shape stays editable — click to select, drag to move, use handles to resize

Circle Tool

Draw circular/ellipse shapes on the mask.

  • Click and drag to draw an ellipse
  • Same selection and editing controls as rectangles

Polygon Tool

Draw free-form polygon shapes by placing vertices.

  • Click to place each vertex
  • Close the shape by clicking near the first point or double-clicking
  • Undo the last vertex with Cmd/Ctrl+Z while drawing

Brush Settings

Size

Adjust brush size:

  • Use the size slider in the toolbar
  • Scroll wheel while hovering on canvas
  • Range: 1px to 200px

Mode

Toggle between:

  • Positive - Normal mode (brush adds, eraser removes)
  • Negative - Inverted mode (brush removes, eraser adds)

Negative mode is useful for quickly removing large areas.

Mask Visualization

The mask is shown as a red overlay:

  • Red areas - Part of the mask (will be extracted)
  • Clear areas - Not part of the mask

The opacity of the overlay can be adjusted in settings.

Editing Workflow

Starting Fresh

  1. Click Clear to reset the mask
  2. Use the brush to paint the trait area
  3. Zoom in and refine edges

Refining AI Detection

  1. Run AI detection first
  2. Zoom in on problem areas
  3. Use eraser to remove excess
  4. Use brush to add missing areas

Precision Editing

  1. Zoom in close (scroll wheel)
  2. Use small brush size
  3. Follow edges carefully
  4. Toggle between brush and eraser

Persistent Shapes

Rectangle, Circle, and Polygon shapes are persistent vector objects — they stay editable after creation and are saved to the database:

  • Survive page navigation — switch tabs and return, shapes are intact
  • Survive sessions — close the browser and reopen, shapes are restored
  • Auto-save — shapes save automatically after creation, move, resize, or deletion
  • Positive/Negative modes — shapes can add to or subtract from the mask, just like brush strokes

Click any shape to select it (blue outline), then drag to reposition or use corner handles to resize. Press Delete or Backspace to remove the selected shape.

Keyboard Shortcuts

KeyAction
PPan tool
BBrush tool
EEraser tool
Shift + dragStraight line
ScrollZoom in/out
Space (hold)Temporary pan mode
Cmd/Ctrl + ZUndo
Cmd/Ctrl + Shift + ZRedo
Cmd/Ctrl + YRedo (alternative)
Cmd/Ctrl + =Zoom in
Cmd/Ctrl + -Zoom out
Cmd/Ctrl + 0Reset zoom
Delete / BackspaceDelete selected shape
EscapeCancel polygon / deselect shape / switch to pan

Mask Variants

Each trait supports up to 5 mask variants:

  • v1-v5 - Different versions of the mask
  • Star icon - Marks the favorite (used for extraction)
  • + button - Add a new empty variant

Use variants to:

  • Try different AI detections
  • Create manual alternatives
  • Keep backups before major edits

Auto-Save

Masks save automatically:

  • After you stop drawing (short delay)
  • When switching to another mask
  • When leaving the page

No manual save button needed.

Tips for Clean Masks

Edge Quality

  • Zoom in to 200%+ for edge work
  • Follow the actual edge of the trait
  • Clean edges = clean extracted layers

Coverage

  • Include all pixels of the trait
  • Don't include pixels from other areas
  • Check corners and details

Common Mistakes

MistakeEffectFix
Jagged edgesRough layer edgesZoom in, smooth edges
Missing areasHoles in extracted layerAdd with brush
Extra areasArtifacts in layerRemove with eraser
Overlapping traitsWrong pixels in layerCheck each trait separately

Testing Your Mask

After editing:

  1. Go to Variations page
  2. Generate a quick variation
  3. Check the extracted layer
  4. Return to Detection if needed

Troubleshooting

Mask won't paint

  • Check you're using Brush tool (B)
  • Check you're on the Detection page
  • Make sure a trait is selected

Edges are too rough

  • Zoom in closer
  • Use smaller brush size
  • Take your time on edges

AI detection missed areas

  • AI isn't perfect
  • Use brush to add missing areas
  • Consider rewriting the detection prompt

Mask looks correct but layer is wrong

  • Make sure the correct variant is favorited
  • Check layer order isn't hiding anything
  • Regenerate the layer