This is an implementation of Mediapipe that reverses the background mask to make it a foreground mask. There is some implementation with pygui to provide foreground image selection and masking properties.
This project was created as a halloween virtual costume, to make someone appear as a ghost in a Teams/Zoom type meeting.
This project borrows heavily from the following code snippets:
- https://google.github.io/mediapipe/solutions/selfie_segmentation.html
- https://realpython.com/pysimplegui-python/
git clone https://github.com/patrickslarson8/foreground-remover
pip3 install -r requirements.txt
To also use the output in another app like teams, you must install OBS Studio because this leverages the OBS virtual camera output.
python3 fg-remover.py