← Back to Advent of Code

Day 3 - Using SAM 3 for image segmentation to lift subjects out of images

12/03/25

Update: Day 8 extends this with an inpainting feature to repair gaps and tears in segmented images.

A demo for lifting any object or person from an image using Meta's recently released SAM 3 model. Background you want to lift, and (hopefully) you'll get a transparent cut out of just the subject you entered.

For example:

Original grapes
Original
"bunch of grapes"
Segmented grapes
Result

Try it yourself!

Drop image or click to select