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

Unable to detect, not enough values to unpack (expected 3, got 2) #480

Open
live-github opened this issue Apr 1, 2024 · 0 comments
Open

Comments

@live-github
Copy link

shoe
shoe

watch_color
watch

grounding_dino_model use:
GroundingDINO_SwinT_OGC.py
groundingdino_swint_ogc.pth
sam_vit_h_4b8939.pth OR sam_hq_vit_h.pth

detections = grounding_dino_model.predict_with_classes(
image=image,
classes=['shoe'],
box_threshold=0.25,
text_threshold=0.25
)

debug: groundingdino/util/inference.py 202 line, no return channel value
source_h, source_w, _ = image.shape # not enough values to unpack (expected 3, got 2)

If forced to change to
source_h, source_w = image.shape[:2]
you will not be able to get the mask later.

In addition to single-channel images such as black and white or grayscale, some color images cannot be detected.
See picture above!!!

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

1 participant