Remove backgrounds from images with u2net pre-trained model
This repo uses the model and the pre-trained weights described in the paper: U2-Net: Going Deeper with Nested U-Structure for Salient Object Detection.
Original repo: U2-Net
How to use:
- Clone this repo.
- Install requirements:
pip install -r requirements.txt
. - Run
segment.py
with the command:python segment.py -img_path image.png
- Segmented image will be stored in the results folder.