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

Train Own Dataset #22

Closed
cmdrootaccess opened this issue Apr 26, 2020 · 3 comments
Closed

Train Own Dataset #22

cmdrootaccess opened this issue Apr 26, 2020 · 3 comments

Comments

@cmdrootaccess
Copy link

hello,

i want to train my own dataset to generate indexnet_matting.pth.tar .

what do i have to do ? i see first trimaps are needed, do you have a complete matting project that generates trimaps then runs training ?

or how do i first generate these trimaps ?
Thanks

@983
Copy link

983 commented Apr 27, 2020

Usually, trimaps are drawn by hand. For example, here is a video by Macro Forte where he is drawing a trimap: https://www.youtube.com/watch?v=gl1XOAuMckM

You could also train a neural network to generate a trimaps for a specific kind of object, but then you'd need a dataset to train your neural network.

@QWERDF007
Copy link

you can generate trimaps by using cv2.dilate and cv2.erode on alpha(only two value 0&255). Then, you need to merge fg and bg, and save it. Finally, use the generate_imlist.py to generate train.txt and test.txt.

@cmdrootaccess
Copy link
Author

alright thanks. will do that

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