55import numpy as np
66from datumaro .components .annotation import AnnotationType
77from datumaro .components .media import ImageFromNumpy
8+ from clarifai_datautils .constants .base import DATASET_UPLOAD_TASKS
89
9- from .base import ClarifaiDataLoader
10- from .features import (VisualClassificationFeatures , VisualDetectionFeatures ,
11- VisualSegmentationFeatures )
10+ from ... base import ClarifaiDataLoader
11+ from ... base . features import (VisualClassificationFeatures , VisualDetectionFeatures ,
12+ VisualSegmentationFeatures )
1213
1314delimiters = ["," , "|" , ";" , "/" , "\\ " , ":" , " " ]
1415
@@ -35,7 +36,7 @@ def __init__(self, annotation_object):
3536
3637 @property
3738 def task (self ):
38- return "visual_classification"
39+ return DATASET_UPLOAD_TASKS . VISUAL_CLASSIFICATION
3940
4041 def __getitem__ (self , index : int ):
4142 dataset_item = self .annotation_object .get (
@@ -90,7 +91,7 @@ def __init__(self, annotation_object):
9091
9192 @property
9293 def task (self ):
93- return "visual_detection"
94+ return DATASET_UPLOAD_TASKS . VISUAL_DETECTION
9495
9596 def __getitem__ (self , index : int ):
9697 dataset_item = self .annotation_object .get (
@@ -170,7 +171,7 @@ def __init__(self, annotation_object):
170171
171172 @property
172173 def task (self ):
173- return "visual_segmentation"
174+ return DATASET_UPLOAD_TASKS . VISUAL_SEGMENTATION
174175
175176 def __getitem__ (self , index : int ):
176177 dataset_item = self .annotation_object .get (
0 commit comments