Unable to detect, not enough values to unpack (expected 3, got 2)
live-github opened this issue · 0 comments
live-github commented
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!!!