{"id":28422972,"url":"https://github.com/scale3-labs/image_bgremover","last_synced_at":"2025-06-24T13:30:49.578Z","repository":{"id":269324096,"uuid":"907063572","full_name":"Scale3-Labs/image_bgremover","owner":"Scale3-Labs","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-21T17:43:36.000Z","size":27852,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-05T08:01:56.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scale3-Labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-12-22T17:52:48.000Z","updated_at":"2025-04-28T23:17:27.000Z","dependencies_parsed_at":"2024-12-22T18:33:39.681Z","dependency_job_id":"0c9c34ec-5074-47cb-a1a2-b39b3d198f8d","html_url":"https://github.com/Scale3-Labs/image_bgremover","commit_stats":null,"previous_names":["scale3-labs/image_bgremover"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Scale3-Labs/image_bgremover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fimage_bgremover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fimage_bgremover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fimage_bgremover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fimage_bgremover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scale3-Labs","download_url":"https://codeload.github.com/Scale3-Labs/image_bgremover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fimage_bgremover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261685272,"owners_count":23194076,"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":[],"created_at":"2025-06-05T07:39:10.281Z","updated_at":"2025-06-24T13:30:49.566Z","avatar_url":"https://github.com/Scale3-Labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Background Remover\n\nA web application that removes backgrounds from images using a Next.js frontend and Flask backend. Upload single or multiple images and download the processed results with transparent backgrounds.\n\nBuilt at [LangTrace](https://langtrace.ai) by [Karthik Kalyanaraman](https://x.com/karthikkalyan90).\n\nThis application uses the [rembg](https://pypi.org/project/rembg/) model for background removal. Rembg is an open-source tool that uses deep learning to remove image backgrounds.\n\n## Features\n\n- Upload multiple images simultaneously\n- Real-time processing progress tracking\n- Download individual processed images or all as a zip file\n- Responsive design with image previews\n- Processing time display for each image\n\n## Tech Stack\n\n### Frontend\n- Next.js 15\n- TypeScript\n- Tailwind CSS\n- Shadcn UI Components\n\n### Backend\n- Python Flask\n- rembg (Background Removal Library) - Uses U2NET model for background removal\n- TensorFlow (Required by rembg)\n\n## Prerequisites\n\nBefore running the application, make sure you have the following installed:\n- Docker\n- Docker Compose\n- Git\n\n## Project Structure\n\n```\n.\n├── frontend/               # Next.js frontend application\n│   ├── Dockerfile         # Frontend Docker configuration\n│   ├── src/               # Source code\n│   └── package.json       # Frontend dependencies\n├── backend/               # Flask backend application\n│   ├── Dockerfile        # Backend Docker configuration\n│   └── app.py            # Main Flask application\n└── docker-compose.yml    # Docker Compose configuration\n```\n\n## Installation \u0026 Running\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd image-background-remover\n   ```\n\n2. Start the application using Docker Compose:\n   ```bash\n   docker-compose up --build\n   ```\n\n3. Access the application:\n   - Frontend: http://localhost:3000\n   - Backend API: http://localhost:8000\n\n## Usage\n\n1. Open your browser and navigate to http://localhost:3000\n2. Click on the upload area or drag and drop images\n3. Wait for the background removal process to complete\n4. Download individual images or use the \"Download Images\" button to get all processed images as a zip file\n\n## Development\n\nTo run the application in development mode with hot reloading:\n\n### Frontend\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n### Backend\n```bash\ncd backend\npython -m venv venv\nsource venv/bin/activate  # On Windows: .\\venv\\Scripts\\activate\npip install -r requirements.txt\npython app.py\n```\n\n## API Endpoints\n\n### POST /remove-background/\nRemoves the background from an uploaded image.\n\nRequest:\n- Content-Type: multipart/form-data\n- Body: file (image file)\n\nResponse:\n- Content-Type: image/png\n- Body: Processed image with transparent background\n\n## Environment Variables\n\nFrontend:\n- `NEXT_PUBLIC_API_URL`: Backend API URL (default: http://backend:8000)\n\nBackend:\n- `PYTHONUNBUFFERED`: Python output buffering (default: 1)\n\n## Resource Limits\n\nThe application is configured with the following resource limits in Docker:\n\nFrontend:\n- CPU: 1 core (reserved: 0.5)\n- Memory: 2GB (reserved: 1GB)\n\nBackend:\n- CPU: 2 cores (reserved: 1)\n- Memory: 4GB (reserved: 2GB)\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Troubleshooting\n\nCommon issues and solutions:\n\n1. Permission denied errors:\n   ```bash\n   docker-compose down\n   docker system prune -f\n   docker-compose up --build\n   ```\n\n2. Backend not accessible:\n   - Check if the backend container is running: `docker-compose ps`\n   - Verify network connectivity between containers\n   - Check backend logs: `docker-compose logs backend`\n\n3. Images not processing:\n   - Ensure enough system resources are available\n   - Check backend logs for Python errors\n   - Verify file size and format compatibility","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscale3-labs%2Fimage_bgremover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscale3-labs%2Fimage_bgremover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscale3-labs%2Fimage_bgremover/lists"}