1 post on Segment Anything.
Generate the foreground and background separately, use Segment Anything to cut out the subject, and pick the sharpest mask by Laplacian variance. A one-commit pipeline of a couple thousand lines.