mobile_phone_human_matting
mobile_phone_human_matting copied to clipboard
Detailed explanation about the training data
Hello How are you? Thanks for contributing this project. Could u provide a detailed explanation about the training data? Thanks
My method for making the dataset:
1、Download from: https://github.com/aisegmentcn/matting_human_datasets The dataset name is matting_human_half.zip, about 15GB.
2、Making train.txt Every line like bellow. Split tow relative path names with a space.
human_matting/clip_img/1803151818/clip_00000000/1803151818-00000003.jpg human_matting/matting/1803151818/matting_00000000/1803151818-00000003.png
3、mask.
_mask = cv2.imread('1803151818-00000003.png').astype(np.float32)
_mask = (_mask!=0).astype(float)
You can insert the second line to data.py, line no:119
Thanks for reply. May I ask one more? The model trained by u runs in the speed of about 100ms/frame on my PC. I trained a new model with your project on AISegment dataset. But this new model runs in the speed of about 450ms/frame. The accuracies are almost same but not for speed. What do u think the reason? Thanks
Thanks for reply. May I ask one more? The model trained by u runs in the speed of about 100ms/frame on my PC. I trained a new model with your project on AISegment dataset. But this new model runs in the speed of about 450ms/frame. The accuracies are almost same but not for speed. What do u think the reason? Thanks
I have no idea of this issue, but may be the pre-trained model was trained by diffrent source code version or diffrent pytorch environment which improved the performance. I did an experiment:
1、Load model directly from pre-trained 'model_obj.pth', the test result is fine. 2、Build model from current repo's source and load_state_dict from pre-trained 'ckpt_lastest.pth', the test result is quite worse.
So I think the source code is diffrent from the pre-trained model. This may be affect the performance too.
By upgrading pytorch version to 1.5-cuda10.1-cudnn7-devel, the performance is much better on cpu.
docker pull pytorch/pytorch:1.5-cuda10.1-cudnn7-devel
Thank you for your nice advice.