{"id":27775295,"url":"https://github.com/kavishannip/blurblend","last_synced_at":"2026-05-19T19:03:13.038Z","repository":{"id":290431394,"uuid":"974423908","full_name":"kavishannip/BlurBlend","owner":"kavishannip","description":"Identify people in the image and blur the background with the given intensity while keeping the foreground sharp.","archived":false,"fork":false,"pushed_at":"2025-04-29T09:34:11.000Z","size":2024,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T03:53:29.919Z","etag":null,"topics":["image-processing","python","streamlit"],"latest_commit_sha":null,"homepage":"https://blurblend.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kavishannip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-28T18:55:13.000Z","updated_at":"2025-04-29T09:34:14.000Z","dependencies_parsed_at":"2025-04-28T20:39:05.217Z","dependency_job_id":null,"html_url":"https://github.com/kavishannip/BlurBlend","commit_stats":null,"previous_names":["kavishannip/blurblend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishannip%2FBlurBlend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishannip%2FBlurBlend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishannip%2FBlurBlend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishannip%2FBlurBlend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kavishannip","download_url":"https://codeload.github.com/kavishannip/BlurBlend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251638760,"owners_count":21619663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","python","streamlit"],"created_at":"2025-04-30T03:53:34.555Z","updated_at":"2026-05-19T19:03:12.952Z","avatar_url":"https://github.com/kavishannip.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlurBlend 🖼️\n\nBlurBlend is an AI-powered tool that automatically detects and separates foreground subjects from backgrounds in images and applies a professional-looking blur effect to the background while keeping the subject sharp and in focus.\n\nLive Demo: [https://blurblend.streamlit.app/](https://blurblend.streamlit.app/)  \nGitHub Repository: [https://github.com/kavishannip/BlurBlend](https://github.com/kavishannip/BlurBlend)\n\n![BlurBlend Demo](screenshots/1.png)\n\n---\n\n## Features\n\n- 🤖 **AI-Powered Segmentation**: Uses state-of-the-art image segmentation models to automatically detect people and other foreground objects.\n- 🎚️ **Adjustable Blur**: Control the blur intensity with an easy-to-use slider.\n- 🧠 **Multiple Models**: Choose from different AI models optimized for various use cases.\n- ⚡ **GPU Acceleration**: Leverages CUDA when available for faster processing.\n- 💾 **One-Click Download**: Easily download the processed images.\n\n---\n\n## Live Demo\n\nTry out BlurBlend at [https://blurblend.streamlit.app/](https://blurblend.streamlit.app/).\n\n---\n\n## How It Works\n\n1. **Upload**: Select an image containing people or objects.\n2. **Segment**: The AI model identifies foreground objects.\n3. **Blur**: BlurBlend applies a blur effect to the background while keeping the foreground sharp.\n\n---\n\n## Available Models\n\n- **Segmentation Model (Default)**: `facebook/mask2former-swin-base-coco-panoptic` - Best all-around segmentation.\n- **Smaller Model**: `nvidia/segformer-b0-finetuned-ade-512-512` - Faster but less accurate.\n- **Person Detection**: `facebook/detr-resnet-50-panoptic` - Specialized for people detection.\n- **Person Detection+**: `mattmdjaga/segformer_b2_clothes` - Enhanced model that detects clothing items.\n\n---\n\n## Technical Implementation\n\nThe project consists of two main components:\n\n### 1. BlurBlend Class\n\nHandles the AI segmentation and blur application logic:\n- Loads and manages AI segmentation models.\n- Processes images to separate foreground from background.\n- Applies configurable blur effects to the background.\n\n### 2. Streamlit Web Interface\n\nProvides a user-friendly interface:\n- Upload and preview images.\n- Configure segmentation model and blur settings.\n- Process and download results.\n\n---\n\n## Installation\n\nTo run BlurBlend locally, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/kavishannip/BlurBlend.git\n   cd BlurBlend\n   ```\n\n2. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Run the Streamlit app:\n   ```bash\n   streamlit run app.py\n   ```\n\n---\n\n## Usage\n\n### Basic Usage of `BlurBlend` Class\n\n```python\nfrom blurblend import BlurBlend\n\n# Initialize with chosen model\nblur_tool = BlurBlend(model_path=\"facebook/mask2former-swin-base-coco-panoptic\")\n\n# Process an image\nresult_image = blur_tool.process_image(\n    image_path=\"path/to/image.jpg\",\n    blur_radius=15\n)\n\n# Save the result\nresult_image.save(\"blurred_background.png\")\n```\n\n### Running the Web App\n\n1. Open the app in your browser after running `streamlit run app.py`.\n2. Upload an image, configure the blur intensity, and select the segmentation model.\n3. Click \"Apply Background Blur\" to process the image.\n4. Download the result using the provided button.\n\n---\n\n## Requirements\n\nThe following dependencies are required to run BlurBlend:\n\n- `streamlit\u003e=1.22.0`\n- `transformers\u003e=4.30.0`\n- `torch\u003e=2.0.0`\n- `Pillow\u003e=9.0.0`\n- `numpy\u003e=1.24.0`\n- `scipy\u003e=1.10.0`\n- `timm\u003e=0.9.0`\n\nInstall them using:\n```bash\npip install -r requirements.txt\n```\n\n---\n\n\n\n## Author\n\nDeveloped by [Kavishan Nipun](https://www.linkedin.com/in/kavishan-nipun-876930222/).\n\nGitHub: [https://github.com/kavishannip](https://github.com/kavishannip)  \nLinkedIn: [https://www.linkedin.com/in/kavishan-nipun-876930222/](https://www.linkedin.com/in/kavishan-nipun-876930222/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavishannip%2Fblurblend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkavishannip%2Fblurblend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavishannip%2Fblurblend/lists"}