11# Annotation Loader
22
3- A framework to load,export and analyze different annotated datasets
3+ A framework to load, export and analyze different annotated datasets
4+
5+
6+ ## Setup
7+ To use Image Annotation Loader, please install the extra libs required for ` annotations `
48
59
610## Usage
711### Features
812``` python
9- from clarifai_datautils import ImageAnnotations
13+ from clarifai_datautils.image import ImageAnnotations
1014# import from folder
1115coco_dataset = ImageAnnotations.import_from(path = ' folder_path' ,format = ' coco_detection' )
1216
@@ -21,7 +25,8 @@ coco_dataset.export_to('voc_detection')
2125
2226### Upload using Clarifai Python SDK
2327``` python
24- from clarifai_datautils import ImageAnnotations
28+ from clarifai_datautils.image import ImageAnnotations
29+ # import from folder
2530coco_dataset = ImageAnnotations.import_from(path = ' folder_path' ,format = ' coco_detection' )
2631
2732# clarifai SDK
@@ -35,15 +40,14 @@ dataset.upload_dataset(dataloader=coco_dataset.dataloader)
3540
3641### Export to other formats from Clarifai Platform
3742``` python
38-
3943# clarifai SDK
4044# export CLARIFAI_PAT={your personal access token} # set PAT as env variable
4145from clarifai.client.dataset import Dataset
4246dataset = Dataset(user_id = " user_id" , app_id = " app_id" , dataset_id = " dataset_id" )
4347dataset.export(save_path = ' output.zip' ,split = ' train' )
4448
4549# Extract the zip file and pass the folder to ImageAnnotations
46- from clarifai_datautils import ImageAnnotations
50+ from clarifai_datautils.image import ImageAnnotations
4751clarifai_dataset = ImageAnnotations.import_from(path = ' folder_path' ,format = ' clarifai' )
4852
4953# export to other formats
0 commit comments