a lightweight image matting model
This is a lightweight image matting model in PyTorch.
Models | SAD | MSE | Download |
---|---|---|---|
paper-stage0 | 59.6 | 0.019 | |
paper-stage1 | 54.6 | 0.017 | |
paper-stage3 | 50.4 | 0.014 | |
my-stage0 | 127.4 | 0.068 | Link |
Follow the instruction to contact author for the dataset.
Go to MSCOCO to download:
Go to PASCAL VOC to download:
Extract training images:
$ python pre_process.py
# python data_gen.py
$ python train.py
If you want to visualize during training, run in your terminal:
$ tensorboard --logdir runs
$ python test.py
It prints out average SAD and MSE errors when finished.
Download pre-trained Deep Image Matting Link then run:
$ python demo.py
Image/Trimap | Output/GT | New BG/Compose |
|—-|—-|—-|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|