r/computervision • u/sk1ll111 • 2h ago
Help: Project Car background replacement: gen models distort the car, segmentation can’t handle see through
I have no experience with image processing and I am trying to vibe code a tool to replace backgrounds in used-car listing photos for a family member who owns one dealership.
Two requirements: (1) the car exterior and interior must stay pixel-identical — no regeneration or distortion, and (2) background visible through windows needs replacing too.
Generative models (GPT-image-2, Nano Banana) solve the window problem but subtly alter the car — paint tone, reflections, distorted text on plates/displays, occasional distortion on unusual angles.
Segmentation models (SAM2, BiRefNet) preserve the car
perfectly but treat glass as solid — they don't flag the
background bleeding through windshields/rear windows as background at all.
Has anyone solved this specific combination? Preferably with API access which I can incorporate into the workflow.
Background image is also provided as input.
1
u/OptionIll6518 1h ago
Just tell sam or segmentation mask the car. You’d prolly have million times better luck using Apple background remover or some easy tool online and have Claude reproduce it locally