Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented here.

## [unreleased]

## [0.25.1] - Aug 5th, 2026
- The `ConfidenceSlider` toolbox item now also filters `bitmask` annotations

## [0.25.0] - Aug 5th, 2026
- Add a `bitmask` annotation mode for raster (per-pixel) segmentation, selectable via `allowed_modes: ["bitmask", ...]`.
- Painted with the brush (toggle with `toggle_brush_mode_keybind`, default `g`); erase with `toggle_erase_mode_keybind` (default `e`); resize the brush with `increase_brush_size_keybind` / `decrease_brush_size_keybind` (defaults `]` / `[`) or `alt+scroll`. The brush/erase toggles now apply to both `polygon` and `bitmask` modes.
Expand Down
2 changes: 1 addition & 1 deletion api_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ This toolbox item requires no configuration and can be added to the `toolbox_ord

### `confidence_slider_toolbox_item`

The `ConfidenceSlider` toolbox item (added to `toolbox_order` via `AllowedToolboxItem.ConfidenceSlider`) deprecates (hides) or shows spatial annotations based on their confidence values. Unlike the deprecated `KeypointSlider`, it works with **all** spatial annotation types that have a confidence payload (`bbox`, `bbox3`, `polygon`, `polyline`, `contour`, `tbar`, and `point`), across every subtask.
The `ConfidenceSlider` toolbox item (added to `toolbox_order` via `AllowedToolboxItem.ConfidenceSlider`) deprecates (hides) or shows spatial annotations based on their confidence values. Unlike the deprecated `KeypointSlider`, it works with **all** spatial annotation types that have a confidence payload (`bbox`, `bbox3`, `polygon`, `polyline`, `contour`, `tbar`, `point`, and `bitmask`), across every subtask.

It supports two modes:

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ulabel",
"description": "An image annotation tool.",
"version": "0.25.0",
"version": "0.25.1",
"main": "dist/ulabel.min.js",
"module": "dist/ulabel.min.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const ULABEL_VERSION = "0.25.0";
export const ULABEL_VERSION = "0.25.1";
2 changes: 1 addition & 1 deletion tests/annotation_operators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("get_annotation_confidence_for_class", () => {
describe("CONFIDENCE_FILTERABLE_SPATIAL_TYPES", () => {
test("includes the spatial modes and excludes the non-spatial modes", () => {
expect(CONFIDENCE_FILTERABLE_SPATIAL_TYPES).toEqual(
expect.arrayContaining(["contour", "polygon", "polyline", "bbox", "tbar", "bbox3", "point"]),
expect.arrayContaining(["contour", "polygon", "polyline", "bbox", "tbar", "bbox3", "point", "bitmask"]),
);
expect(CONFIDENCE_FILTERABLE_SPATIAL_TYPES).not.toContain("whole-image");
expect(CONFIDENCE_FILTERABLE_SPATIAL_TYPES).not.toContain("global");
Expand Down
16 changes: 16 additions & 0 deletions tests/confidence_slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,22 @@ describe("ConfidenceSlider", () => {
expect(low.deprecated).toBe(false);
});

test("filters bitmask annotations by confidence like any other spatial type", () => {
const high_mask = make_annotation("high_mask", "bitmask", [{ class_id: 10, confidence: 0.9 }]);
const low_mask = make_annotation("low_mask", "bitmask", [{ class_id: 10, confidence: 0.1 }]);
const cs = new ConfidenceSlider(make_ulabel([high_mask, low_mask], {
class_filter_mode: "all-only",
default_values: { all: 60 },
filter_on_load: false,
}));

cs.filter_annotations(false);

expect(high_mask.deprecated).toBe(false);
expect(low_mask.deprecated).toBe(true);
expect(low_mask.deprecated_by.confidence_slider).toBe(true);
});

test("lowering the threshold un-deprecates previously filtered annotations", () => {
const low = make_annotation("low", "bbox", [{ class_id: 10, confidence: 0.1 }]);
const cs = new ConfidenceSlider(make_ulabel([low], {
Expand Down
Loading