-
Notifications
You must be signed in to change notification settings - Fork 4
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
Comments
did you solve it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'
The text was updated successfully, but these errors were encountered: