--- title: Inno Background Remover emoji: ๐Ÿช„ colorFrom: pink colorTo: purple sdk: gradio sdk_version: "4.19.2" app_file: app.py pinned: false --- # ๐Ÿช„ Inno RMBG Removal v1.0 This Space runs a custom-trained image background removal model using PyTorch and ONNX. It performs pixel-wise background removal on input images with high accuracy using a Gradio interface. --- ## โœจ Model Highlights - Trained on diverse images of objects, people, and scenes. - Outputs a binary mask of the foreground. - Works with `.pth` and ONNX formats. - Useful for background replacement or transparent cutouts. --- ## ๐Ÿ“ฆ Input / Output **Input Image:** ![example input](example_input.jpg) **Output (no background):** ![result](results.png) --- ## ๐Ÿงช How It Works 1. Upload an image using the UI. 2. The model generates a mask for the foreground. 3. The output is a transparent PNG or white background version. --- ## โš™๏ธ Inference Code (example) ```python from PIL import Image from utilities import preprocess_image, postprocess_image, load_model model = load_model("model.pth") image = Image.open("example_input.jpg") mask = model.predict(image) image.putalpha(mask) image.save("output.png")