Skip to content

Containerized web app that removes background in .jpg/.jpeg built using HTMX, Express.js, Python.

Notifications You must be signed in to change notification settings

0xdany/backgone

Repository files navigation

Backgone.

► Containerized background remover built using HTMX + Express.js

license last-commit repo-top-language repo-language-count

Developed using these tools.

tqdm JavaScript Prettier PostCSS Autoprefixer YAML SciPy Nodemon
PowerShell SymPy Python Docker NumPy Numba Express JSON


🔗 Quick Links


📍 Overview

BackGone provides a simple and intuitive interface for users to drag and drop or click to upload images. The dockerized application processes the images by removing the background and returns the processed image, which can be downloaded by the user.

>> See the live instance Backgone here (hosted on Cloud Run)


📦 Features

  • Drag and Drop Upload: Easily upload images by dragging and dropping them into the designated area.
  • Background Removal: Uses the rembg to remove the background from uploaded images.
  • Download Processed Images: Download the processed images with the background removed.
  • Responsive Design: The user interface is built with Tailwind CSS to ensure responsiveness and a modern look.

📂 Repository Structure

└── backgone/
    ├── Dockerfile
    ├── backgone_venv/
    ├── bs-config.js
    ├── docker-compose.yml
    ├── nodemon.json
    ├── package-lock.json
    ├── package.json
    ├── postcss.config.js
    ├── process_image.py
    ├── processed/
    ├── public
    │   ├── assets
    │   │   └── logo.svg
    │   └── styles
    │       └── tailwind.css
    ├── requirements.txt
    ├── server.js
    ├── tailwind.config.js
    ├── uploads/
    └── views
        └── index.ejs

🚀 Getting Started

Requirements

  • Node.js: Version 18 or higher
  • Python: Version 3.11 or higher
  • Docker: For containerization (optional but recommended)

⚙️ Installation

  1. Clone the backgone repository:
git clone https://github.com/0xdany/backgone
  1. Change to the project directory:
cd backgone
  1. Activate virtual environment:
source backgone_venv/bin/activate
  1. Install the dependencies:
npm install
pip install --no-cache-dir -r requirements.txt
  1. Download .onnx model
mkdir models
curl -L -o models/u2net.onnx https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx

🤖 Running backgone

Use the following command to run backgone on port: 8080:

npm run dev

🐳 Building the image

Use the following command to build the image:

docker-compose build
docker-compose up

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone https://github.com/0xdany/backgone
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


About

Containerized web app that removes background in .jpg/.jpeg built using HTMX, Express.js, Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published