mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[GH-ISSUE #100] Visual gronding Bbox Shift #82
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL2#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maryhh on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/100
this is the output ,i used vllm to deploy deepseek-vl2-small
this is the output ,i used gradio demo you provided,
the picture is 1920x1080 ,i also used pixels < 1000x1000 to test .Both results have the same problems.
how to slove it?
@adrianJW421 commented on GitHub (Feb 25, 2025):
I also encounter similar problem:
my prompt is : <|grounding|>Find the cars in the scene.
my prediction is : <|Assistant|>: <|ref|>mazdaughters<|/ref|><|det|>220, <<|/det|><|end▁of▁sentence|>
after rescaled to original image size and visualize the bbox, the result is:
seems the grounding result is not very accurate
@charlesCXK commented on GitHub (Feb 26, 2025):
@maryhh @adrianJW421
Hello, the returned coordinates are relative coordinates normalized to the range [0, 999]. You need to multiply them by the original image's width and height to obtain the absolute positions.
For object localization, you can directly use <|ref|>something<|/ref|>. <|grounding|> is more suitable for scenarios that require a combination of object localization and reasoning.
@maryhh commented on GitHub (Feb 26, 2025):
I have already done this operation and i used the prompt 找到<|ref|>明火<|/ref|> . By the way ,the gradio demo you provided also has the bbox shift problem.
@charlesCXK commented on GitHub (Feb 27, 2025):
@maryhh
I test the case you provide in the gradio, it works correctly.
@xinlin-xiao commented on GitHub (Feb 27, 2025):
@adrianJW421 @maryhh @charlesCXK Hello,"I also use vLLM to deploy deepseek-vl2 and encounter the same bounding box misalignment issue. I have already used the following code to adjust the box:
This is my inference test code:
run:

python web-vllm-demo.py -m /mnt/data1/download_new/DeepSeek-VL2/model/deepseek-ai/deepseek-vl2 --modality imageresult:
Do you have a solution for this box offset issue?"
@maryhh commented on GitHub (Feb 28, 2025):
The first attempt was fine, but after several more tries, the offset problem occurred again.
@xinlin-xiao commented on GitHub (Mar 3, 2025):
@maryhh "A strange phenomenon. Could it be an issue with the model? Have you tried the official Gradio code? Will the offset still occur after multiple attempts?"
@maryhh commented on GitHub (Mar 3, 2025):
Yes,i used the official gradio, i have gived up.
@charlesCXK commented on GitHub (Mar 4, 2025):
@maryhh
"The first attempt was fine, but after several more tries, the offset problem occurred again."
Does it mean that it performs poorly in multi-round conversations? This is normal. The performance of large models in multi-round conversations is not as good as that in a single round.
@adrianJW421 commented on GitHub (Mar 4, 2025):
Thanks for replying. I actually have done the transformation, so it was not the key problem for me. However, I found out the point that may have caused the problem. Initially I implemented the code according to the example code on huggingface page, compared to the
inference.pycode in this repo, the following part is different:correct case:
initial wrong case:
Somehow although I have set vl_gpt to
evalmode as in the example code, ifwith torch.no_grad()is missing beforevl_gpt.generate, the result will be wrong.@xinlin-xiao commented on GitHub (Mar 18, 2025):
@adrianJW421 hello,Have you tested vLLM inference? I still can't find the reason for the bounding box offset.