rdjarbeng's picture
Add references to unet and is-net
b30ac09 verified
---
title: Free Background Remover
emoji: πŸ–ΌοΈ
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: Background removal tool, multiple AI models-no login needed
tags: ['computer-vision', 'image-processing', 'rembg', 'background-removal', 'u2net', 'isnet', 'ai-tools']
---
# 🎨 Advanced Background Remover v2.9
A powerful, free web-based tool for professional background removal from images. No login required, no watermarks, no paywalls - just upload and download!
## ✨ Features
🎯 **Smart Background Removal** - Advanced AI models for precise edge detection
🎨 **Custom Backgrounds** - Replace with solid colors or keep transparent
πŸ€– **Multiple AI Models** - Choose the best model for your specific use case
βœ‚οΈ **Alpha Matting** - Enhanced edge quality for professional results
🎭 **Specialized Models** - Dedicated models for humans, anime, and clothing
πŸ“± **Easy to Use** - Simple drag-and-drop interface
πŸ’Ύ **Instant Download** - Get your processed image immediately
## πŸ€– Available AI Models
| Model | Best For | Size | Quality |
|-------|----------|------|---------|
| **u2net** | General use cases (recommended) | Standard | High |
| **isnet-general-use** | New general model with improved accuracy | Standard | Very High |
| **isnet-anime** | Anime characters and illustrations | Standard | Excellent |
| **u2net_human_seg** | Human portraits and people | Standard | Excellent |
| **u2net_cloth_seg** | Clothing and fashion items | Standard | High |
| **silueta** | Fast processing (reduced size) | 43MB | Good |
| **u2netp** | Lightweight, faster processing | Small | Good |
| **unet** | Basic background removal | Small | Standard |
## πŸš€ Quick Start
### Online Usage (Recommended)
Visit the [Hugging Face Space](https://huggingface.co/spaces/your-username/free-background-remover) and start removing backgrounds instantly!
### Local Installation
1. **Clone the repository**
```bash
git clone https://github.com/your-username/background-remover.git
cd background-remover
```
2. **Install dependencies**
```bash
pip install -r requirements.txt
```
3. **Run the application**
```bash
python app.py
```
## πŸ’‘ How to Use
1. **Upload Image** - Drag and drop or click to select your image
2. **Choose Options**:
- 🎨 Select background color (or keep transparent)
- πŸ€– Pick the best AI model for your image type
- βš™οΈ Enable advanced options if needed
3. **Process** - Click "Submit" and wait a few seconds
4. **Download** - Right-click the result to save your image
## βš™οΈ Advanced Options
- **🎯 Alpha Matting**: Improves edge quality for hair and fine details
- **πŸ”§ Post-Process Mask**: Additional refinement of the cutout
- **πŸ‘οΈ Mask Only**: Export just the selection mask
- **🎨 Custom Colors**: Any hex color for background replacement
## 🎯 Use Cases
- **E-commerce**: Product photos with clean backgrounds
- **Social Media**: Profile pictures and content creation
- **Design Work**: Graphics and marketing materials
- **Photography**: Portrait enhancement and compositing
- **Art & Animation**: Character extraction and manipulation
## πŸ”§ API Usage Example
```python
from PIL import Image
from rembg import remove, new_session
# Basic usage
input_image = Image.open('input.jpg')
output_image = remove(input_image)
output_image.save('output.png')
# Advanced usage with specific model
session = new_session('u2net_human_seg')
output_image = remove(input_image, session=session)
output_image.save('output.png')
# With alpha matting for better quality
output_image = remove(
input_image,
alpha_matting=True,
alpha_matting_foreground_threshold=270,
alpha_matting_background_threshold=20,
alpha_matting_erode_size=11
)
output_image.save('output.png')
```
## πŸ“Š Model Performance
| Model | Speed | Quality | Best For |
|-------|-------|---------|----------|
| silueta | ⚑⚑⚑ | ⭐⭐⭐ | Quick processing |
| u2netp | ⚑⚑ | ⭐⭐⭐⭐ | Balanced |
| u2net | ⚑ | ⭐⭐⭐⭐⭐ | High quality |
| isnet-general-use | ⚑ | ⭐⭐⭐⭐⭐ | Best overall |
| isnet-anime | ⚑ | ⭐⭐⭐⭐⭐ | Anime/illustrations |
## 🀝 Contributing
Contributions are welcome! Here's how you can help:
- πŸ› Report bugs and issues
- πŸ’‘ Suggest new features
- πŸ”§ Submit pull requests
- πŸ“– Improve documentation
- ⭐ Star the repository if you find it useful!
## πŸ“ Requirements
```
gradio>=4.44.1
rembg>=2.0.50
Pillow>=10.0.0
numpy>=1.24.0
```
## πŸ”— Alternative Tools
If you need more features, consider these alternatives:
- [Adobe Express Background Remover](https://www.adobe.com/express/feature/image/remove-background/transparent) (requires Adobe account)
- [Remove.bg](https://www.remove.bg/) (limited free usage)
## πŸ“„ License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
## πŸ™ Acknowledgments
- **[rembg](https://github.com/danielgatis/rembg)** - The powerful Python library powering the background removal
- **[Gradio](https://www.gradio.app/)** - The framework making this tool accessible to everyone
- **[Hugging Face](https://huggingface.co/)** - For hosting this free tool
---
## πŸ“š References
This Space is built using the `rembg` library, which leverages the following research papers:
- [U2-Net: Going Deeper with Nested U-Structure for Salient Object Detection](https://arxiv.org/abs/2005.09007)
```bibtex
@article{qin2020u2net,
title={U2-Net: Going Deeper with Nested U-Structure for Salient Object Detection},
author={Qin, Xuebin and Zhang, Zichen and Huang, Chenyang and Dehghan, Masood and Zaiane, Osmar R and Jagersand, Martin},
journal={arXiv preprint arXiv:2005.09007},
year={2020}
}
- [IS-Net: Deep Interactive Segmentation Network])(https://arxiv.org/abs/2203.03041)
@article{qin2022isnet,
title={Highly Accurate Dichotomous Image Segmentation},
author={Qin, Xuebin and Fan, Deng-Ping and Huang, Chenyang and Di, Deng and Zhang, Zichen and Zaiane, Osmar R and Jagersand, Martin and Van Gool, Luc},
journal={arXiv preprint arXiv:2202.13085},
year={2022}
}
⭐ **Star this repository if you find it useful!** ⭐
Made with ❀️ for the open-source community