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

Generating the mask of the clothes #32

Open
sagarnildass opened this issue May 29, 2020 · 2 comments
Open

Generating the mask of the clothes #32

sagarnildass opened this issue May 29, 2020 · 2 comments

Comments

@sagarnildass
Copy link

Sorry if this is a dumb question, but if I have a brand new dataset of different clothes, how do I generate the masks for them? I am seeing that the matlab file is very customized for viton data. Is there a different way in python which allows us to generate the masks of the clothes?

@JaquesM
Copy link

JaquesM commented Feb 2, 2021

img = cv2.imread(image_path, 0)
blur = cv2.GaussianBlur(img,(5,5),0)
ret3,th3 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)

cv2.imwrite(output_path, th3)

@mesllo
Copy link

mesllo commented May 28, 2022

I still get incorrect patches with the code above. The background of my new dataset is also white and the resolution is the same. Does anyone have any suggestions?

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