{"id":22771641,"url":"https://github.com/fmxexpress/ai-background-remover","last_synced_at":"2026-02-14T11:03:43.363Z","repository":{"id":265670365,"uuid":"867952328","full_name":"FMXExpress/AI-Background-Remover","owner":"FMXExpress","description":"Remove backgrounds from images using AI masking.","archived":false,"fork":false,"pushed_at":"2024-10-05T13:53:53.000Z","size":594,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T02:34:31.573Z","etag":null,"topics":["ai","background-remover","desktop-app","firemonkey","fmx","python","replicate-api"],"latest_commit_sha":null,"homepage":"https://www.fmxexpress.com/","language":"Python","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/FMXExpress.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,"zenodo":null}},"created_at":"2024-10-05T04:57:34.000Z","updated_at":"2025-07-22T23:12:26.000Z","dependencies_parsed_at":"2024-12-01T17:18:57.130Z","dependency_job_id":null,"html_url":"https://github.com/FMXExpress/AI-Background-Remover","commit_stats":null,"previous_names":["fmxexpress/ai-background-remover"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FMXExpress/AI-Background-Remover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FMXExpress%2FAI-Background-Remover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FMXExpress%2FAI-Background-Remover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FMXExpress%2FAI-Background-Remover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FMXExpress%2FAI-Background-Remover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FMXExpress","download_url":"https://codeload.github.com/FMXExpress/AI-Background-Remover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FMXExpress%2FAI-Background-Remover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274255205,"owners_count":25250612,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","background-remover","desktop-app","firemonkey","fmx","python","replicate-api"],"created_at":"2024-12-11T16:16:01.775Z","updated_at":"2026-02-14T11:03:38.344Z","avatar_url":"https://github.com/FMXExpress.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Background Remover with Upscale Enhancement - DelphiFMX Python GUI\n\nThis project provides a graphical user interface (GUI) for removing backgrounds from images and enhancing them using AI through the [Replicate API](https://replicate.com). The GUI is built using DelphiFMX for Python, offering a simple and intuitive way for users to upload images and receive background-removed, upscaled versions. The app runs background processes without blocking the user interface.\n\n## Features\n- **Background Removal**: Remove the background of uploaded images using AI.\n- **Upscale Enhancement**: Add detail to the upscaled image after the background is removed.\n- **Status Updates**: Real-time status updates on the processing of the image.\n- **Background Processing**: Image processing runs in the background to keep the UI responsive.\n\n## Screenshot\n\nBelow is a screenshot of the GUI in action:\n\n![App Screenshot](./screenshot.png)\n\n## Prerequisites\n- Python 3.7 or higher\n- [Replicate API Token](https://replicate.com/docs/get-started) (you need to set this up and add it to your environment variables)\n- [DelphiFMX for Python](https://github.com/Embarcadero/PythonFMX)\n\n## Installation\n\n1. Clone this repository:\n    ```bash\n    git clone https://github.com/your-username/ai-background-remover.git\n    cd ai-background-remover\n    ```\n\n2. Install the required Python packages:\n    ```bash\n    pip install delphifmx replicate\n    ```\n\n3. Set your Replicate API token:\n    ```bash\n    export REPLICATE_API_TOKEN=your_replicate_api_token\n    ```\n\n4. Run the application:\n    ```bash\n    python main.py\n    ```\n\n## Usage\n\n1. **Upload an Image**: Click the \"Select\" button to choose an image from your computer.\n2. **Processing**: Once the image is uploaded, the app will automatically start the background removal process using the Replicate API.\n3. **View Results**: After processing, the original image and the enhanced background-removed image will be displayed side by side. The status bar at the bottom of the app provides real-time updates on the image processing.\n\n## Project Structure\n\n- **`bgremover.py`**: The main Python script that contains the GUI logic and handles interaction with the Replicate API.\n- **`Air.style`**: The custom UI style applied to the application. You can replace or modify this file to change the appearance of the app.\n- **Image Display**: The app shows both the original and processed images within the GUI.\n  \n## Code Overview\n\n### Import Section\n\n```python\nimport os\nimport replicate\nimport urllib.request\nimport hashlib\nfrom delphifmx import *\nimport threading\n```\n\n- **Replicate API**: Used for handling AI-powered background removal and enhancement.\n- **DelphiFMX**: The GUI framework for creating the interface.\n- **Threading**: Ensures the app remains responsive by running background tasks asynchronously.\n\n## How It Works\n\n1. **Upload Image**: The user selects an image from their local machine.\n2. **Background Removal and Enhancement**: The app sends the image to the [smoretalk/rembg-enhance](https://replicate.com/smoretalk/rembg-enhance) model hosted on Replicate.\n3. **Display Result**: Once processing is complete, the background-removed and enhanced image is displayed alongside the original.\n\n### Example Code Snippet\n\n```python\nmodel = replicate.models.get(\"smoretalk/rembg-enhance\")\nversion = model.versions.get(\"4067ee2a58f6c161d434a9c077cfa012820b8e076efa2772aa171e26557da919\")\nself.prediction = replicate.predictions.create(\n    version=version,\n    input={\"image\": open(file_path, \"rb\")}\n)\n```\n\n## Contributing\n\nFeel free to submit pull requests or open issues for suggestions and improvements.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Links\n\n- [Replicate API](https://replicate.com)\n- [DelphiFMX for Python](https://github.com/Embarcadero/PythonFMX)\nThis README provides a comprehensive overview of your project, explaining how to install, use, and contribute to it while also including code snippets to give users a quick understanding of its core functionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmxexpress%2Fai-background-remover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmxexpress%2Fai-background-remover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmxexpress%2Fai-background-remover/lists"}