A solution for removing and replacing backgrounds for graduation photo, IDs, etc. This is based on MODNet: Trimap-Free Portrait Matting in Real Time
- Clone this repository
git clone https://github.com/xShiro2/ipbr.git
cd ipbr
- Setup and activate virtual environment
python -m venv venv
venv/Scripts/activate
-
Download pre-trained model and extract contents to
MODNet/pretrained
-
Install the required python dependencies
pip install -r requirements.txt
-
Install Pytorch seperately from here
-
Run code
python -m scripts.main_gui