This Streamlit application allows you to upload an image and automatically blur its background using AI segmentation.
- Python 3.8 or higher
- 2GB of free disk space for AI model
- At least 4GB RAM recommended
-
Clone the repository:
git clone https://github.com/stuarth/python-blur-background.git cd python-blur-background
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Linux/macOS venv\Scripts\activate # On Windows
-
Install dependencies:
sudo apt-get update sudo apt-get install -y libgl1-mesa-glx libmagickwand-dev pip install -r requirements.txt
streamlit run ai_blur_background.py
This will start the Streamlit web interface where you can:
- Upload an image
- Adjust the blur strength
- Download the processed image