Annotation Editor
SUMMARY
The annotation editor is where you draw and refine annotations on a single image or video frame. Edits stay in a draft until you save, and you can undo and redo any change.
To open the editor, open a dataset in Lens and click an image in the explorer. To return to the gallery, choose Back to explorer.
Tools
| Tool | Key | Use it to |
|---|---|---|
| Select / move | V | Select an instance by its actual mask area and move or edit it. |
| Bounding box | B | Drag a box around an object. |
| Polygon | P | Click to place vertices around an object. |
| Mask brush | R | Paint mask pixels. |
| Mask eraser | E | Remove mask pixels, for example to cut holes. |
| AI click-to-mask | A | Left-click to add a positive point and right-click to add a negative point. Lens generates and refines the mask from the clicks. |
| Add keypoints | K | Place the keypoints defined for the selected instance's class. |
| Pan | H | Move around a zoomed image. |
AI masks don't overlap: a new mask doesn't take pixels that another instance already covers.
Annotate instance after instance
- Choose a Class for new instances. This sets the class for new instances only. Existing instances keep their class.
- Draw or refine the object with any creation tool.
- Press Enter, N, or Finish & next. Lens finishes the instance, clears the AI click history, and keeps the same tool ready for the next object.
- Repeat for each object, then save with Ctrl+S (Cmd+S on macOS).
INFO
Finishing an instance doesn't save the frame. If you try to leave with unsaved changes, Lens warns you.
If you start a new instance from Select, Pan, or the eraser, Lens switches back to the last creation tool you used, which is AI click-to-mask at first.
Select and edit
- Hover over the image to preview which instance a click will select.
- Alt+click cycles through overlapping instances. This works in the mask tools too.
- Clicking an object in the sidebar selects it without leaving the brush, eraser, or AI tool.
- To relabel an object, use Change selected instance's class.
- Delete or Backspace removes the selected instance.
Add keypoints
Keypoints are defined per class in that class's keypoint schema.
- Select an instance and press K, or choose Add keypoints. Lens steps through the class's keypoints in schema order.
- Left-click to mark the current point as visible (COCO
v=2), or right-click to mark it as occluded (v=1). The next unlabeled point becomes active. - To place or move a specific point, choose it by name in the inspector. To mark a point as unlabeled (
v=0), set its visibility to Not labeled.
Keyboard shortcuts
| Shortcut | Action |
|---|---|
| Ctrl/Cmd+S | Save |
| Ctrl/Cmd+Z | Undo |
| Ctrl/Cmd+Shift+Z | Redo |
| Enter or N | Finish this instance and start the next |
| Esc | Cancel the current gesture or polygon draft. Press it again to deselect. |
| Delete / Backspace | Delete the selected instance |
| ← / → | Previous / next image or frame |
| Space | Play or pause video |
| T | Open the video propagation tool |