ReBac is a simple web application for removing backgrounds from images. It is controlled using a simple web interface.
Note: ReBac was created as a means to understand Docker and React.
The ReBac application is divided into FrontEnd (client folder) and BackEnd (api folder). If you want to run the applications without problems, you must run both FrontEnd and BackEnd independently.
The BackEnd application runs on Python. To run BackEnd, go to the api folder and run the package installation command (I recommend creating a virtual environment before installing packages):
pip install -r requirements.txtThen just run the application:
python app.pyThe first time you run it, it will download the background removal model. The application runs on port 5000.
Note: The BackEnd application uses mostly the rembg package by Daniel Gatis
I use React as FrontEnd (To run FrontEnd you need to have Note.js and npm installed). Go to the client folder and install the necessary packages:
npm installFinally, run the application:
npm run devFrontEnd runs on port 3000.
Docker is the easiest way to run a ReBac application. In the ReBac directory, run this command:
docker compose upThis will create two images: rebac-api (running on port 5000) and rebac-client (set to port 3000 in compose.yaml but running on port 80 in Docker).
If the build was successful, the application should run at:
127.0.0.1:3000To run the application again, just type:
docker compose up