github wkentaro/labelme v6.2.0

7 hours ago

LabelMe v6.2 introduces oriented rectangle as a first-class shape type, including in AI-assisted annotation where SAM masks can now be converted to oriented rectangles, axis-aligned rectangles, or circles in addition to polygons.

Released on 2026-05-10.

New features

  • Oriented rectangle shape: a new shape type that represents a rotated bounding box. Available in the toolbar and via keyboard shortcut, with full create/edit support on the canvas. (#1980)
  • AI-assisted oriented rectangle: SAM-generated masks can be emitted as oriented_rectangle, automatically fitting the minimum-area rotated bounding box to the predicted mask. (#2078)
  • AI-assisted rectangle and circle output: in addition to polygon and mask, AI-Points and AI-Box can now output rectangle (axis-aligned) or circle derived from the predicted mask. (#2064)
  • Right-click "Add Point to Edge": insert a vertex at the cursor position on the nearest edge of the selected shape via the canvas context menu. (#2029)
  • Undoable hide/show: toggling shape visibility now goes through the undo stack. (#2034)
  • Multi-selection hide/show: toggling visibility on a multi-selection now propagates to every selected shape. (#2035)

Bug fixes

  • AI-Box bbox normalization: AI-Box bbox points are normalized before being sent to the model, fixing incorrect predictions when the box was drawn right-to-left or bottom-to-top. (#2032)
  • Color indicator after editing group_id: editing a label's group_id no longer drops the color indicator from its annotation list row. (#2015)
  • Shift+wheel horizontal scroll on Linux/Windows: Shift+wheel now scrolls horizontally on Linux and Windows, matching macOS behavior. (#2014)
  • Ctrl/Cmd+A on canvas: Ctrl/Cmd+A now selects all shapes when the canvas has focus.
  • Oriented rectangle preserved on label dialog cancel: cancelling the label dialog after drawing an oriented rectangle no longer discards the shape. (#2079)
  • Snap highlight cleanup: the first-vertex snap highlight is now correctly restored when closing a polygon and cleared after every paint. (#1974, #1975)
  • validate_label=None short-circuit: restored the short-circuit so validate_label: null skips validation as documented.

Internal

  • Python 3.14 supported in CI. (#2006)
  • Snake_case migration: public method names across MainWindow, Canvas, Shape, LabelListWidget, LabelFile, and utility modules migrated to PEP 8 snake_case. (#1987, #1988, #1989)
  • Shape decomposition: Shape reorganized as a data class with geometry, path-building, and painting extracted into labelme/_shape.py. (#2072, #2073, #2074, #2075, #2076, #2077)
  • Canvas decomposition: paint, mouse-event dispatch, and tracking/highlight logic split into focused helpers. (#1971, #1972, #1982, #2005)
  • LabelData dataclass: LabelFile I/O extracted into a dedicated dataclass and module-level helpers. (#2039)
  • pathlib migration: filesystem paths in app.py and helpers migrated from os.path to pathlib. (#1984)
  • E2E test expansion: additional canvas paint regression snapshots, drag-and-drop, status-bar, geometry persistence, dialog validation, and AI-mode coverage.

Contributors

Install

pip install -U labelme==6.2.0
# or
uv tool install labelme==6.2.0

Full changelog: v6.1.3...v6.2.0

Don't miss a new labelme release

NewReleases is sending notifications on new releases.