[GH-ISSUE #60] how to draw bounding box in image ?? #45

Closed
opened 2026-10-26 21:10:46 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Kenneth-X on GitHub (Feb 6, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/60

I have run the demo and obtained the bounding box [x1, y1, x2, y2]. How can I draw them on the image? The paper mentions that the coordinates are normalized to [0, 999]. How can I convert them back to the original image coordinates?


<|User|>: <image>
<|ref|>The giraffe at the back.<|/ref|>.

<|Assistant|>: <|ref|>The giraffe at the back.<|/ref|><|det|>[[584, 271, 943, 889]]<|/det|><|end▁of▁sentence|>
Originally created by @Kenneth-X on GitHub (Feb 6, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/60 I have run the demo and obtained the bounding box [x1, y1, x2, y2]. How can I draw them on the image? The paper mentions that the coordinates are normalized to [0, 999]. How can I convert them back to the original image coordinates? ``` shell <|User|>: <image> <|ref|>The giraffe at the back.<|/ref|>. <|Assistant|>: <|ref|>The giraffe at the back.<|/ref|><|det|>[[584, 271, 943, 889]]<|/det|><|end▁of▁sentence|> ```
Author
Owner

@HubHop commented on GitHub (Feb 6, 2025):

Hi @Kenneth-X, you will need to rescale the results with respect to the original image width and height.

<!-- gh-comment-id:2639994440 --> @HubHop commented on GitHub (Feb 6, 2025): Hi @Kenneth-X, you will need to rescale the results with respect to the original image width and height.
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#45
No description provided.