Service responsible for removing background from images and uploading them to gcloud.
- git clone git@github.com:vonum/background-removal.git
- docker build -t background-removal .
This create an image with all available models installed:
- U2net
- U2netp
- BASNet
- XCEPTION
- MOBILENET
docker run -p 8000:8000 \
--mount type=bind,source=SRC_PATH,target=TARGET_PATH \
background-removal:latest
url
: Image urlmodel
: ["u2net", "u2netp", "basnet", "xception_model", "mobile_net_model"]preprocessing
: ["bdd-fastrcnn", "bbmd-maskrcnn", "None"]postprocessing
: ["rtb-bnb", "rtb-bnb2", "No"]
{
"model": "u2net",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/1a/Donkey_in_Clovelly%2C_North_Devon%2C_England.jpg"
}
curl -X POST \
-H "Content-type: application/json" \
-d @scripts/image_request.json \
0.0.0.0:8000/remove_background