Fix bug where florence2 returns normalized xyxy regions
This commit is contained in:
parent
c40734fb8d
commit
d3db15fcd0
|
|
@ -174,7 +174,9 @@ def from_florence_2(
|
|||
match is not None
|
||||
), f"Expected string to end in location tags, but got {result}"
|
||||
|
||||
w, h = resolution_wh
|
||||
xyxy = np.array([match.groups()], dtype=np.float32)
|
||||
xyxy *= np.array([w, h, w, h]) / 1000
|
||||
result_string = result[: match.start()]
|
||||
labels = np.array([result_string])
|
||||
return xyxy, labels, None, None
|
||||
|
|
|
|||
Loading…
Reference in New Issue