[GH-ISSUE #94] How to correctly visualize bounding box? 请问如何正确可视化边界框? #77

Closed
opened 2026-10-26 21:11:30 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @CS-FantaC on GitHub (Feb 21, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/94

Image
Simple Inference Example 里的代码:
conversation = [
{
"role": "<|User|>",
"content": "\n<|ref|>The giraffe at the back.<|/ref|>.",
"images": ["./images/visual_grounding_1.jpeg"],
},
{"role": "<|Assistant|>", "content": ""},
]
模型输出为[580, 270, 999, 904],直接把bbox画在原图上发现有偏移,如图所示,请问有可视化bbox的代码吗?]我认为应该是模型给出的坐标不是原图分辨率对应的坐标,而是变换后的图像中的坐标。请问具体经过了什么裁剪变换呢?

Originally created by @CS-FantaC on GitHub (Feb 21, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/94 ![Image](https://github.com/user-attachments/assets/6f77b48e-e004-4813-abc8-cd03d01c9c68) Simple Inference Example 里的代码: conversation = [ { "role": "<|User|>", "content": "<image>\n<|ref|>The giraffe at the back.<|/ref|>.", "images": ["./images/visual_grounding_1.jpeg"], }, {"role": "<|Assistant|>", "content": ""}, ] 模型输出为[580, 270, 999, 904],直接把bbox画在原图上发现有偏移,如图所示,请问有可视化bbox的代码吗?]我认为应该是模型给出的坐标不是原图分辨率对应的坐标,而是变换后的图像中的坐标。请问具体经过了什么裁剪变换呢?
Author
Owner

@CS-FantaC commented on GitHub (Feb 22, 2025):

后面发现只是因为Tiny model定位不准,small model输出的boundingbox就可以准确定位。

<!-- gh-comment-id:2676070650 --> @CS-FantaC commented on GitHub (Feb 22, 2025): 后面发现只是因为Tiny model定位不准,small model输出的boundingbox就可以准确定位。
Author
Owner

@hengrui0516 commented on GitHub (Feb 24, 2025):

想请问下[580, 270, 999, [904]这种输出的嵌套列表是什么意思呢,还有的时候模型会输出奇数个值该怎么处理呢

<!-- gh-comment-id:2677593517 --> @hengrui0516 commented on GitHub (Feb 24, 2025): 想请问下[580, 270, 999, [904]这种输出的嵌套列表是什么意思呢,还有的时候模型会输出奇数个值该怎么处理呢
Author
Owner

@CS-FantaC commented on GitHub (Feb 24, 2025):

抱歉,我打字时打多了一个[,并不是嵌套列表。奇数个数值肯定是错误输出,只能让模型重新输出

<!-- gh-comment-id:2678260734 --> @CS-FantaC commented on GitHub (Feb 24, 2025): 抱歉,我打字时打多了一个[,并不是嵌套列表。奇数个数值肯定是错误输出,只能让模型重新输出
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-VL2#77
No description provided.