@@ -40,8 +40,8 @@ class ClassificationSample(Sample):
4040
4141 image : str = image_path_field ()
4242 image_info : ImageInfo = image_info_field ()
43- label : int = label_field (dtype = pl .Int32 , is_list = False )
44- confidence : float | None = score_field (dtype = pl .Float32 )
43+ label : int = label_field (dtype = pl .Int32 () , is_list = False )
44+ confidence : float | None = score_field (dtype = pl .Float32 () )
4545
4646
4747class MultilabelClassificationSample (Sample ):
@@ -58,8 +58,8 @@ class MultilabelClassificationSample(Sample):
5858 image : str = image_path_field ()
5959 image_info : ImageInfo = image_info_field ()
6060 # TODO: Use NDArrayFloat32 and NDArrayInt instead of np.ndarray after open-edge-platform/datumaro#1949 is solved
61- label : np .ndarray = label_field (dtype = pl .Int32 , multi_label = True )
62- confidence : np .ndarray | None = score_field (dtype = pl .Float32 , is_list = True )
61+ label : np .ndarray = label_field (dtype = pl .Int32 () , multi_label = True )
62+ confidence : np .ndarray | None = score_field (dtype = pl .Float32 () , is_list = True )
6363
6464
6565class DetectionSample (Sample ):
@@ -77,9 +77,9 @@ class DetectionSample(Sample):
7777 image : str = image_path_field ()
7878 image_info : ImageInfo = image_info_field ()
7979 # TODO: Use NDArrayFloat32 and NDArrayInt instead of np.ndarray after open-edge-platform/datumaro#1949 is solved
80- bboxes : np .ndarray = bbox_field (dtype = pl .Int32 )
81- label : np .ndarray = label_field (dtype = pl .Int32 , is_list = True )
82- confidence : np .ndarray | None = score_field (dtype = pl .Float32 , is_list = True )
80+ bboxes : np .ndarray = bbox_field (dtype = pl .Int32 () )
81+ label : np .ndarray = label_field (dtype = pl .Int32 () , is_list = True )
82+ confidence : np .ndarray | None = score_field (dtype = pl .Float32 () , is_list = True )
8383
8484
8585class InstanceSegmentationSample (Sample ):
@@ -97,9 +97,9 @@ class InstanceSegmentationSample(Sample):
9797 image : str = image_path_field ()
9898 image_info : ImageInfo = image_info_field ()
9999 # TODO: Use NDArrayFloat32 and NDArrayInt instead of np.ndarray after open-edge-platform/datumaro#1949 is solved
100- polygons : np .ndarray = polygon_field (dtype = pl .Float32 )
101- label : np .ndarray = label_field (dtype = pl .Int32 , is_list = True )
102- confidence : np .ndarray | None = score_field (dtype = pl .Float32 , is_list = True )
100+ polygons : np .ndarray = polygon_field (dtype = pl .Float32 () )
101+ label : np .ndarray = label_field (dtype = pl .Int32 () , is_list = True )
102+ confidence : np .ndarray | None = score_field (dtype = pl .Float32 () , is_list = True )
103103
104104
105105def convert_rectangle (r : Rectangle ) -> list [int ]:
0 commit comments