How Segment Anything Works: Click-to-Select Objects in Your Browser
What the Segment Anything model does, how clicks become masks, how to fix a selection with add and remove points, and when a cut-out still needs help.

How Segment Anything Works: Click-to-Select Objects in Your Browser
For decades, cutting an object out of a photo meant tracing its outline with a lasso or a pen tool. In 2023 Meta AI released Segment Anything, a model that produces an object mask from a single click. It quickly became part of professional editors. The Magic Select tool runs a compressed version of it directly in your browser, so you can use the same idea on your own photos without an account or an upload.
The idea behind Segment Anything
Segment Anything was trained on a dataset of over a billion masks. Instead of learning a fixed list of object types, it learned what an object boundary looks like in general. That is why it can select a teapot, a dog's ear, a car door or a cloud: you tell it where to look with a click, and it proposes the region that most likely forms a coherent object around that point.
Two networks, one fast loop
The model is split into two parts:
- The image encoder reads the whole picture once and turns it into a grid of features. This is the heavy step and takes a few seconds in a browser.
- The mask decoder combines those features with your clicks and outputs a mask. It is small and takes a fraction of a second.
Because the encoder runs only once per picture, you can keep adding and removing clicks and see the mask update quickly. The version used here, SlimSAM-77, is a pruned and quantised model of about 14 MB in total, released under the Apache-2.0 licence.
Positive and negative clicks
A click can say "this is part of the object" (positive) or "this is not" (negative). One positive click inside a product photographed on a plain background is usually enough. On busy photos, add negative clicks on areas that were wrongly included, such as a shadow or a neighbouring object, and positive clicks on parts that were missed, such as a handle.
Ambiguity and mask candidates
A single click on a person's shirt could mean the shirt, the person or the group they stand in. The model therefore returns three candidate masks of increasing size, each with a predicted quality score. The tool picks the best-scoring one by default, but you can choose the smallest part, the middle mask or the whole object when the automatic choice is not what you meant.
Refining edges
The mask comes as a probability for each pixel. A threshold turns it into a selection: a lower threshold includes more of the soft edge, which helps with hair and fur, while a higher threshold gives tight edges for hard products. A small feather softens the edge so the cut-out sits naturally on a new background.
What you can do with the selection
- Save a transparent PNG cut-out for a product listing, sticker or design.
- Place the object on a white or brand-coloured background.
- Export a black and white mask for another editor or for compositing.
- Remove the object, leaving a transparent hole to fill with a fill tool.
Where it struggles
Thin structures like bicycle spokes, wire fences and loose hair strands are difficult, as are transparent glass and reflections. The compressed model is also slightly less precise than the full research version. For those cases, combine the automatic mask with manual touch-ups in another editor.
Privacy
The model files are downloaded once from this website and cached by your browser. All computation runs on your processor, and your photos are never sent to a server.
Limits
Selection quality depends on the photo: good contrast between object and background gives the cleanest masks. Always check the edge at full size before using a cut-out commercially.


&c=%237c3aed&k=images)
