Bg Remover — AI-powered image generation, transformation, and creative exploration.
Topics: image-processing · background-removal · computer-vision · digital-image · dsp-techniques · image-denoising · image-segmentation · object-detection · yolo
Bg Remover is a generative image application that leverages diffusion models or GAN-based pipelines to create, transform, or stylise images from natural language prompts and visual inputs. It provides an interactive interface for experimenting with generative AI's visual capabilities.
The application supports text-to-image generation with configurable parameters (guidance scale, steps, seed, size), image-to-image transformation with adjustable strength, and a gallery for browsing and comparing generated outputs. All generation parameters are exposed in the UI for maximum experimental flexibility.
The backend can be configured to use cloud APIs (fal.ai, Replicate, Stability AI) for instant availability without local GPU, or local Diffusers pipelines for offline operation and maximum customisation.
Generative image models have fundamentally changed what's possible in visual creativity. This project was built to make these capabilities accessible and explorable without requiring deep ML expertise or expensive GPU infrastructure.
User Prompt + Parameters
│
Diffusion Pipeline (API or local)
│
Generated Image + Metadata
│
Gallery Display + Download
Generate high-quality images from natural language prompts with full parameter control over guidance, steps, seed, and dimensions.
Specify elements to exclude from generated images for precise style and content control.
Sliders for guidance scale (1.0–20.0), denoising steps (1–100), image dimensions, and seed for reproducibility.
All generated images are saved with their prompts and parameters in a scrollable gallery.
Download individual images or the full gallery as a ZIP file.
Optional LLM-powered prompt expansion to convert terse inputs into detailed, style-rich generation prompts.
Configure fal.ai, Replicate, Stability AI, or local Diffusers pipeline as the generation backend.
Run the same prompt with different parameters and compare outputs in a split view.
| Library / Tool | Role | Why This Choice |
|---|---|---|
| Diffusers / fal.ai SDK | Generation backend | Diffusion model inference |
| Streamlit / Gradio | Web UI | Interactive parameter controls and gallery |
| Pillow | Image handling | Image saving, resizing, format conversion |
| requests | API communication | Cloud generation API calls |
Key packages detected in this repo:
rembg·Pillow·streamlit
- Python 3.9+ (or Node.js 18+ for TypeScript/JS projects)
pipornpmpackage manager- Relevant API keys (see Configuration section)
git clone https://github.com/Devanik21/BG-remover.git
cd BG-remover
pip install -r requirements.txt
python app.pypython app.py
# Or with Streamlit
streamlit run app.py| Variable | Default | Description |
|---|---|---|
API_KEY |
(required) |
API key for the configured generation backend |
DEFAULT_MODEL |
flux-schnell |
Default generation model |
DEFAULT_STEPS |
20 |
Default inference steps |
Copy
.env.exampleto.envand populate all required values before running.
BG-remover/
├── README.md
├── requirements.txt
├── __init__.py
├── app.py
└── ...
- ControlNet support for structure-guided generation
- Style transfer and image-to-image mode
- Batch generation from CSV prompts
- Video generation integration
- User accounts with cloud gallery persistence
Contributions, issues, and feature requests are welcome. Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'feat: add your feature') - Push to your branch (
git push origin feature/your-feature) - Open a Pull Request
Please follow conventional commit messages and ensure any new code is documented.
API keys for the configured generation backend are required for cloud inference. Local inference requires a CUDA-capable GPU.
Devanik Debnath
B.Tech, Electronics & Communication Engineering
National Institute of Technology Agartala
This project is open source and available under the MIT License.
Crafted with curiosity, precision, and a belief that good software is worth building well.