This script removes the background from an input image. You can read more about segmentation here
The script setup.sh downloads the trained model and sets it up so that the seg.py script can understand.
./setup.sh
Go ahead and use the script as specified below, to execute fast but lower accuracy model:
python3 seg.py sample.jpg sample.png
For better accuracy, albiet a slower approach, go ahead and try :
python3 seg.py sample.jpg sample.png 1
tensorflow, PIL
Input:
Output: