Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

training trick? #5

Open
GuideWsp opened this issue Jun 21, 2018 · 5 comments
Open

training trick? #5

GuideWsp opened this issue Jun 21, 2018 · 5 comments

Comments

@GuideWsp
Copy link

I have spent one month to train the portrait matting,but I can get a good model. It cannot convergence. so, if possible, could you say some tricks to train the portrait matting.

last of all, i have generate the alpha by knn matting.

if possible, could you provide the model you have trained.

@Raj-08
Copy link

Raj-08 commented Jul 17, 2018

@GuideWsp What is the values of alpha mask you are feeding?
Is it between 0-255 or 0-1?

@Raj-08
Copy link

Raj-08 commented Jul 17, 2018

Also make a check at get_valid_names() in common.py to make sure you are dealing with entire dataset at a time , in my case due to some of my carelessness i was sending just the same 5 images all the time , resulting in non convergence . Make sure all of the images are being fed with valid values and not None values. cv2.imread doesnt throw an error like np.load does if it doesnt find the respective file.

@GuideWsp
Copy link
Author

before the data was sended the net, it was transformed to 0-1. at the begin of training, all the data was sended to the net, but i found that the closed-form matting may have some error ,the result value is between 76-186. so is it strange?

@GuideWsp
Copy link
Author

the alpha matte is between 0-1. and the input have transform as vggnet.

@kkkmax
Copy link

kkkmax commented Jan 7, 2019

Also make a check at get_valid_names() in common.py to make sure you are dealing with entire dataset at a time , in my case due to some of my carelessness i was sending just the same 5 images all the time , resulting in non convergence . Make sure all of the images are being fed with valid values and not None values. cv2.imread doesnt throw an error like np.load does if it doesnt find the respective file.

Hi, when you test,
$ python scripts/train.py --mode {seg,seg+,seg_tri,mat} --model_path -i
You can enter a picture, can you get a corresponding normal alpha/trimap picture?
@Raj-08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants