This python script will allow us to extract foreground from an image using Grabcut algorithm.
sudo apt-get install python3
sudo apt-get install python3-pip
pip3 install numpy
pip3 install opencv-python
sudo apt-get install python3-tk
User is expected to select an image and mark a rectangle around the foreground that they wish to extract. The script then runs and the extracted foreground using Grabcut algorithm is then displayed and saved.
Github: invigorzz313