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

Cloth-masking error #1

Open
arhamlet opened this issue Oct 5, 2021 · 1 comment
Open

Cloth-masking error #1

arhamlet opened this issue Oct 5, 2021 · 1 comment

Comments

@arhamlet
Copy link

arhamlet commented Oct 5, 2021

I am using the cloth masking repo to generate shirt segmentation. I am trying to run it on the viton shirts folder. It runs fine on most of the images but on some images the algorithm throws an error while running 1.clothmasking_grabcut.

Traceback (most recent call last):
File "1.clothmasking_GrabCut.py", line 124, in
main()
File "1.clothmasking_GrabCut.py", line 120, in main
cloth_masking_with_grabcut(image_path, res_path, viz=False)
File "1.clothmasking_GrabCut.py", line 84, in cloth_masking_with_grabcut
gc_mask, bgdModel, fgdModel = cv2.grabCut(img2, gc_mask, None, bgdModel, fgdModel, 10, cv2.GC_INIT_WITH_MASK)
cv2.error: OpenCV(3.4.14) /tmp/pip-req-build-jlfc4ffm/opencv/modules/imgproc/src/grabcut.cpp:385: error: (-215:Assertion failed) !bgdSamples.empty() && !fgdSamples.empty() in function 'initGMMs'

@sawk1
Copy link

sawk1 commented Feb 15, 2022

did you solve it?

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

2 participants