Skip to content

Quickly run a web interface and API service based on the RMBG-2.0 model.

Notifications You must be signed in to change notification settings

Valdanitooooo/RMBG2-docker

Repository files navigation

RMBG2-docker

Introduction

Quickly run a web interface and API service based on the RMBG-2.0 model.

Prerequisites

Download RMBG-2.0 model weight files

huggingface-cli download --resume-download briaai/RMBG-2.0 --local-dir RMBG-2.0

Clone this repository

git clone https://github.com/Valdanitooooo/RMBG2-docker.git

Running with Docker

Rename .env_example to .env and change the value of MODEL_DIR to the correct model weight directory.

You can use the image I have already published to Dockerhub

Running on GPU machine

docker-compose up -d

Running on CPU machine

docker-compose -f docker-compose-cpu.yml up -d

Running without Docker

Modify /models/RMBG-2.0 in the main.py file to point to the correct model weight path.

conda create -n rmbg2 python=3.10 && conda activate rmbg2
pip install -r requirements.txt
python app/main.py

Usage

Web App

Upload image or provide URL to remove background

API

About

Quickly run a web interface and API service based on the RMBG-2.0 model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published