Fix, from_florence_2: polygon_to_mask expects np.int32
This commit is contained in:
parent
4599548eeb
commit
ec75a86a83
|
|
@ -143,7 +143,7 @@ def from_florence_2(
|
|||
masks_list = []
|
||||
for polygons_of_same_class in result["polygons"]:
|
||||
for polygon in polygons_of_same_class:
|
||||
polygon = np.reshape(polygon, (-1, 2))
|
||||
polygon = np.reshape(polygon, (-1, 2)).astype(np.int32)
|
||||
mask = polygon_to_mask(polygon, resolution_wh)
|
||||
masks_list.append(mask)
|
||||
xyxy = polygon_to_xyxy(polygon)
|
||||
|
|
|
|||
Loading…
Reference in New Issue