Grounded-Segment-Anything icon indicating copy to clipboard operation
Grounded-Segment-Anything copied to clipboard

跑自己图像出现问题

Open jo-dean opened this issue 2 years ago • 8 comments

在跑sam的时候,出现下面这个问题

Grounded-Segment-Anything/segment_anything/segment_anything/modeling/mask_decoder.py", line 144, in predict_masks masks = (hyper_in @ upscaled_embedding.view(b, c, h * w)).view(b, -1, h, w) RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1, 256, 256] because the unspecified dimension size -1 can be any value and is ambiguous

jo-dean avatar Apr 12 '23 10:04 jo-dean

请问你使用python -m pip install -e GroundingDINO安装环境时,电脑自带C++相关环境吗?我现在不清楚我的错误是由其他问题引起的还是由C++环境版本引起的

917940234 avatar Apr 12 '23 11:04 917940234

I encountered this issue as well

PoopBear1 avatar Apr 12 '23 16:04 PoopBear1

@917940234 对的,我之前装了gcc之类的。我跑有的图会出现这个问题

jo-dean avatar Apr 13 '23 01:04 jo-dean

It seems no prompt objects are segmented by sam in your images.

zhang-jr avatar Apr 13 '23 07:04 zhang-jr

应该是的,已经可以了

jo-dean avatar Apr 13 '23 07:04 jo-dean

It seems no prompt objects are segmented by sam in your images.

If there are no output boxes generated by grounding dino, there is no need to apply sampredictor.

zhang-jr avatar Apr 13 '23 07:04 zhang-jr

应该是的,已经可以了

~~Could you kindly share how did you solve this issue? For my cases, this error especially raise when the "prompt-text" is not detected.~~

solved.

PoopBear1 avatar Apr 13 '23 09:04 PoopBear1

@PoopBear1 Sharing your knowledge would have been fine.

Marcophono2 avatar May 02 '23 11:05 Marcophono2

If there is no output for grounding dino, this error occurs.

Dratlan avatar Jul 03 '23 01:07 Dratlan