File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
deepseek_vl2/serve/app_modules Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ def pil_to_base64(
270
270
def parse_ref_bbox (response , image : Image .Image ):
271
271
try :
272
272
image = image .copy ()
273
- image_h , image_w = image .size
273
+ image_w , image_h = image .size
274
274
draw = ImageDraw .Draw (image )
275
275
276
276
ref = re .findall (r'<\|ref\|>.*?<\|/ref\|>' , response )
@@ -291,10 +291,10 @@ def parse_ref_bbox(response, image: Image.Image):
291
291
292
292
for indice , (box , label ) in enumerate (zip (boxes , labels )):
293
293
box = (
294
- int (box [0 ] / 999 * image_h ),
295
- int (box [1 ] / 999 * image_w ),
296
- int (box [2 ] / 999 * image_h ),
297
- int (box [3 ] / 999 * image_w ),
294
+ int (box [0 ] / 999 * image_w ),
295
+ int (box [1 ] / 999 * image_h ),
296
+ int (box [2 ] / 999 * image_w ),
297
+ int (box [3 ] / 999 * image_h ),
298
298
)
299
299
300
300
box_color = BOX2COLOR [indice % len (BOX2COLOR .keys ())]
You can’t perform that action at this time.
0 commit comments