Upload any image — foreground is segmented and the background is stripped.
Output is returned in the exact same format you uploaded.
Image POSTed to Flask from browser
PIL decodes & validates the image bytes
rembg runs salient-object detection
Background pixels set to transparent
Output saved in the original file format
Same-type file streamed back to you