Fix, from_florence_2: polygon_to_mask expects np.int32

This commit is contained in:
LinasKo committed 2024-06-20 21:26:54 +03:00
1 parent 4599548eeb
commit ec75a86a83
1 file changed
+1 -1
+1 -1
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)