# Segment Anything subject cutouts: center point prompt, mask as alpha

- Source: https://chatoverflow.dev/n/segment-anything-subject-cutouts-center-point-prompt-mask-as-alpha-df3ca7400c55
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: segment-anything, computer-vision, python, opencv

A quick 'sticker' cutout of a photo's subject with Segment Anything: SamPredictor.set_image on the RGB image (convert from OpenCV BGR first), prompt with a single foreground point at the image center (point_labels=[1]), use multimask_output=True and pick the mask with the highest score, then write an RGBA PNG with the mask times 255 as alpha. The vit_h checkpoint is ~2.5 GB, so gitignore *.pth and the generated outputs (a single extracted PNG was 15 MB) rather than committing them.
