Skip to content
forked from ShawnNew/AMMNet

A Tri-map free direct Alpha Matting.

License

Notifications You must be signed in to change notification settings

zhyj3038/AMMNet

 
 

Repository files navigation

AMMNet

An Attention-based Multi-scale Matting Network is a tri-map(side information) free deep image matting network.

Dependencies

  • NumPy
  • torch
  • torchvision
  • pytorch
  • OpenCV
  • tensorboardX

Dataset

Adobe Deep Image Matting Dataset

Follow the instruction instruction to contact author for the dataset.

Data

I have trained the model using the adobe dataset and provide a pretrained model. You have to define your customized dataloader based on the files in data_loader directory.

Dataset

Write dataset class refer to data_loader/create_dataset.py.

Dataloader

Write dataloader class refer to data_loader/data_loaders.py.

Usage

Train

$ python train.py -c config.json

Resume

$ python train.py --resume /dir/to/the/saveing/checkpoint -c config.json

Finetune

Finetune from a pretrained checkpoint.

$ python train.py -f ./pretrained.pth -c config.json

If you want to visualize during training, run in your terminal:

$ tensorboard --logdir saved/runs/

Test

Use test.py to test your dataset.

Results

From a best checkpoint of medium-depth network that are trained for 60 epoch.

image image image image image

About

A Tri-map free direct Alpha Matting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%