Promptable object redaction

Pick an image, then click an object to select it, or drag a box around it; Remove (or right-click) drops one. The buttons above the image switch between interaction examples: Grow (recommended) and three alternatives, each a short, readable file in demos/object-selection/interactions/. Everything runs in your browser; the image is never uploaded. The model (SAM 2.1 Hiera Tiny, 78 MB) downloads the first time only.

Tested browsers and formats

From automated browser tests on one machine (macOS 26, Apple M1), run on 9 October 2026 (library 1.1.1, ONNX Runtime Web 1.30.0). Browser automation on one machine doesn't show that other GPUs, drivers or devices work. Report: reports/compatibility/2026-10-09-20-06.json.

Browser Status Backends seen Checks
Chrome 154, macOS 26, Apple M1 Tested WebGPU and WASM 26 passed
Chromium 153, macOS 26, Apple M1 Tested WASM 11 passed
Firefox 155, macOS 26, Apple M1 Tested WASM 22 passed
WebKit 26, macOS 26, Apple M1 Tested WebGPU and WASM 22 passed
Chrome / Edge on Windows or Linux Untested – Expected to work; speed depends on GPU support
Safari app, iPhone and iPad Untested – The WebKit engine was tested on macOS, not the app or iOS
Phones and tablets generally Untested – About 105 MB download (model and runtime) on first use with WebGPU, about 180 MB without; likely slower
Format Status Notes
PNG Tested Passes in Chrome, Chromium, Firefox, WebKit
HEIC / HEIF (iPhone photos) Not supported Rejected by file extension with a message; convert to JPEG first

WebGPU loads the half-precision (fp16) model where the GPU supports it (Chrome and WebKit here); WASM, and Firefox's test build, which has no WebGPU, load full precision (fp32). The golden-output checks require every browser to produce the same masks as the full-precision reference (within 4/255 on average for fp16), so the accuracy results carry over; only speed differs.

How accurate is it?

Measured on 126 objects in 118 photos from the LVIS dataset: 7 each of 18 kinds found in hotel rooms (towels, luggage, bags, bedding, curtains, pictures, mirrors, lamps, screens, phones, remotes) and people. Each object was selected the way a person would: one click in its middle, that click plus one correction, or a box around it. Mean overlap with the object's true outline (IoU), on WebGPU:

Prompt Best mask (default) Largest mask
One click 71% 56%
Click plus a correction 81% 64%
Box 87% 81%

Best is the model's own top guess: precise, but sometimes only part of an object (in Grow, click it again for a bigger guess). Largest errs toward hiding: it covers people better, but for objects it often takes in what they sit on, such as the bed under a towel. Preparing an image took about 0.5 s, and each new click about 35 ms (Apple M1, Chrome).

Photo credits

The sample images are Flickr photos from the COCO 2017 dataset (selected with LVIS v1 annotations), used under the Creative Commons licenses below. None show children, including in photos or on screens. The demo draws over them in your browser; the files themselves are unchanged. Some photos have since been removed from Flickr, and for COCO photos the dataset doesn't record the author.

Sample Title Author License Source
hotel-bathroom-towels.jpg Flickr photo 9466657460 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY 2.0 COCO 2017 val 514914
marble-bathroom-robe-towels.jpg Hyatt Hotel Canberra - Bathroom vincentq CC BY-SA 2.0 COCO 2017 train 216320
small-bathroom-green-towel.jpg Flickr photo 4986470503 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY-SA 2.0 COCO 2017 train 250240
hotel-twin-beds.jpg THE ORBOST MOTEL OAKLEYZ FOTOZ CC BY-NC-SA 2.0 COCO 2017 val 7795
open-suitcase-cat-on-bed.jpg Flickr photo 4454572396 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY 2.0 COCO 2017 train 333368
packed-suitcase-on-bed.jpg Wintersport 2009 larsjuh CC BY 2.0 COCO 2017 train 264236
bags-stacked-by-bed.jpg P1070660 adrimcm CC BY-ND 2.0 COCO 2017 train 526695
hotel-room-many-bags.jpg DSCN0341 recursive.faults CC BY-ND 2.0 COCO 2017 train 395259
leather-bags-on-bed.jpg Flickr photo 6122627247 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY 2.0 COCO 2017 train 249372
hotel-suite-luggage.jpg living area at the Staybridge Suites Scorpions and Centaurs CC BY-NC-SA 2.0 COCO 2017 train 180578
backpack-suitcase-laptop-floor.jpg DSCN0450 Leftsider CC BY-NC-SA 2.0 COCO 2017 val 370478
hotel-bed-with-bag.jpg Bed @ Tune Hotel, Sepang LCCT polytikus CC BY-NC-ND 2.0 COCO 2017 train 60213
person-robe-hotel-room.jpg Flickr photo 2769804970 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY-NC-SA 2.0 COCO 2017 val 170191
person-packing-suitcase.jpg 78 / 365 Packing. (suitcase has timelord technology) C_Dave CC BY-NC 2.0 COCO 2017 train 337536
person-vintage-suitcases.jpg Flickr photo 3554833919 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY-NC-SA 2.0 COCO 2017 train 182637
person-bathroom-towel.jpg brusha brusha brusha Fuschia Foot CC BY-NC-ND 2.0 COCO 2017 val 507473
person-desk-plastic-bag.jpg Flickr photo 8582063572 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY 2.0 COCO 2017 train 77903
person-train-bunk-backpack.jpg cody on the train bunck bed vamp_v2 CC BY-NC-SA 2.0 COCO 2017 train 322327
person-couch-phones-laptop.jpg Flickr photo 317343650 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY 2.0 COCO 2017 val 537991
person-sleeping-in-bed.jpg Flickr photo 2531963343 (Removed from Flickr; the dataset doesn't record the author) Unknown CC BY-NC-SA 2.0 COCO 2017 val 71938