IDEA-Research / Grounded-Segment-Anything

Grounded SAM: Marrying Grounding DINO with Segment Anything & Stable Diffusion & Recognize Anything - Automatically Detect , Segment and Generate Anything
https://arxiv.org/abs/2401.14159
Apache License 2.0
14.93k stars 1.38k forks source link

TypeError: __init__() missing 2 required positional arguments: 'confidence' and 'class_id' #256

Open CodePainter-Swang opened 1 year ago

CodePainter-Swang commented 1 year ago

image detections = sv.Detections(xyxy=xyxy),confidence?class_id? Do you have this error?

Sheldongg commented 1 year ago

I encountered the same problem, did you solve it?

CodePainter-Swang commented 1 year ago

I still can't run this py file

rentainhe commented 1 year ago

Hello, could you help to debug whether it's due to the lack of proper language prompt setting that the corresponding object is not detected, or maybe the GPU machine is set up incorrectly? Because currently, the deformable-attention operator encounters problems when set to 'cuda:1'.

You can refer to this issue: https://github.com/IDEA-Research/GroundingDINO/issues/103

CodePainter-Swang commented 1 year ago

ok,i Will try it later, thanks for your great work发自我的荣耀手机-------- 原始邮件 --------发件人: Ren Tianhe @.>日期: 2023年5月16日周二 中午11:37收件人: IDEA-Research/Grounded-Segment-Anything @.>抄送: bestharm @.>, Author @.>主 题: Re: [IDEA-Research/Grounded-Segment-Anything] TypeError: init() missing 2 required positional arguments: 'confidence' and 'class_id' (Issue #256) Hello, could you help to debug whether it's due to the lack of proper language prompt setting that the corresponding object is not detected, or maybe the GPU machine is set up incorrectly? Because currently, the deformable-attention operator encounters problems when set to 'cuda:1'.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

lluo-Desktop commented 1 year ago

This error could be caused by "supervison" version. I check supervison by pip list : supervison 0.3.1 I update supervison to 0.8.0 and problem solved.

pip uninstall supervision pip install supervision==0.8.0