rembg can be used to automatically remove the backgrounds from pictures.
To run the Docker container:
docker run --network="host" danielgatis/rembg s
The web server will then be available on port 5000. The url
GET parameter must be provided with a path to the iamge to remove background from:
http://127.0.0.1:5000/?url=http://...
To start a simple web server in the current directory Python http.server
can be used:
python3 -m http.server