Replacing a headshot background is a short function once you have an alpha matte. The failure is almost never the fill. It is the hairline: a green fringe, a sliver of bookshelf left in the flyaways, or a crown that looks clipped.
I measured that failure on one generated head-and-shoulders cutout with a known alpha channel. I composited the subject onto green, white, light gray, and a blurred office, then asked three segmenters to recover the matte and put her on a navy field. The numbers below come from that run. They are not a ranking of every background-removal model, and they are not a claim about a production studio pipeline.
I work on ProfessionalHeadshot, an AI professional headshot generator. The script in the companion folder is a teaching implementation. I did not send these plates through that product.
A known matte, then four plates
The subject is a 1024×1280 transparent PNG of a woman in a navy blazer, with loose hair and visible flyaways. The alpha came with the file.…