Fix, from_florence_2: polygon_to_mask expects np.int32

This commit is contained in:
LinasKo 2024-06-20 21:26:54 +03:00
parent 4599548eeb
commit ec75a86a83
1 changed files with 1 additions and 1 deletions

View File

@ -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)