Image Matting. Given an image, the code in this project can separate its foreground and background components. This repository is to reproduce Deep image matting and is a modification to the codes used by foamliu.
Hi all, All of us must have tried finding available github codes to train a Deep Image Matting model. The most common repository we come across is foamliu's repo. The repository is no longer being maintained and the documentation doesn't seem to be sufficient to help with the training. In light of this, I have created this repository for Deep Image matting training in tensorflow which I shall maintain and help solve your problems. I have also added various functionalities in the train.py to help configure your training. I have made the training process very simple. All you need to do is run 'python train.py' and you are all set. Appropriate comments have been added to ensure you can tune the parameters according to your use. If you get stuck anywhere, feel free to reach out.
- Use the 'data' folder to provide the dataset
- data/train_names.txt - Provide the names of the training files here. It will automatically detect the mask file names using the naming convention followed. You can refer to the existing sample data in the folders to know more.
- data/valid_names.txt - Provide the names of the validation files here.
- data/input - Contains the input files with merged foreground and background.
- data/mask - Contains the binary mask for foregrounds.
Follow the instruction to contact author for the dataset.
Go to MSCOCO to download:
Go to PASCAL VOC to download:
- VOC challenge 2008 training/validation data
- The test data for the VOC2008 challenge
Download VGG16 into "models" folder.
Download foamliu's pre-trained Deep Image Matting Model.
Image/Trimap | Output/GT | New BG/Compose |
---|---|---|