@@ -344,10 +344,19 @@ def from_qwen_2_5_vl(
344344 try :
345345 data = ast .literal_eval (text )
346346 except (ValueError , SyntaxError , TypeError ):
347- return np .empty ((0 , 4 )), None , np .empty ((0 ,), dtype = str )
347+ return (
348+ np .empty ((0 , 4 )),
349+ np .empty ((0 ,), dtype = int ),
350+ np .empty ((0 ,), dtype = str )
351+ )
348352
349353 if not isinstance (data , list ):
350- return np .empty ((0 , 4 )), None , np .empty ((0 ,), dtype = str )
354+ return (
355+ np .empty ((0 , 4 )),
356+ np .empty ((0 ,), dtype = int ),
357+ np .empty ((0 ,), dtype = str )
358+ )
359+
351360
352361 boxes_list = []
353362 labels_list = []
@@ -359,7 +368,12 @@ def from_qwen_2_5_vl(
359368 labels_list .append (item ["label" ])
360369
361370 if not boxes_list :
362- return np .empty ((0 , 4 )), None , np .empty ((0 ,), dtype = str )
371+ return (
372+ np .empty ((0 , 4 )),
373+ np .empty ((0 ,), dtype = int ),
374+ np .empty ((0 ,), dtype = str )
375+ )
376+
363377
364378 xyxy = np .array (boxes_list , dtype = float )
365379 class_name = np .array (labels_list , dtype = str )
0 commit comments