Robust Human Matting via Semantic Guidance, ACCV 2022.
You can download our pretraind weights from link (google drive) or link (百度云, 提取码: u8g4) and save it in the./pretrained
folder.
Test your own images
python test_image.py \
--images-dir "PATH_TO_IMAGES_DIR" \
--result-dir "PATH_TO_RESULT_DIR" \
--pretrained-weight ./pretrained/SGHM-ResNet50.pth
Evaluate on benchmarks
python test_image.py \
--images-dir "PATH_TO_IMAGES_DIR" \
--gt-dir "PATH_TO_GT_ALPHA_DIR" \
--result-dir "PATH_TO_RESULT_DIR" \
--pretrained-weight ./pretrained/SGHM-ResNet50.pth
Test your video
python test_video.py \
--video "PATH_TO_INPUT_VIDEO" \
--output-video "PATH_TO_OUTPUT_VIDEO" \
--pretrained-weight ./pretrained/SGHM-ResNet50.pth
If you use this code for your research, please consider to star this repo and cite our paper.
@inproceedings{chen2022sghm,
author = {Chen, Xiangguang and Zhu, Ye and Li, Yu and Fu, Bingtao and Sun, Lei and Shan, Ying and Liu, Shan},
title = {Robust Human Matting via Semantic Guidance},
booktitle={Proceedings of the Asian Conference on Computer Vision (ACCV)},
year={2022}
}
In this project, parts of the code are adapted from : BMV2 and MG . We thank the authors for sharing codes for their great works.