Skip to content

Commit de3fa10

Browse files
Merge pull request #38 from Clarifai/DEVX-890-Update-Readme-and-Examples
[DEVX-890]: Updated README files for Image Annotation Loader
2 parents f3455d3 + 0480646 commit de3fa10

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pip3 install -r requirements.txt
4848
Quick intro to Image Annotation Conversion feature
4949

5050
```python
51-
from clarifai_datautils import ImageAnnotations
51+
from clarifai_datautils.image import ImageAnnotations
5252

5353
annotated_dataset = ImageAnnotations.import_from(path= 'folder_path', format= 'annotation_format')
5454
```
@@ -66,8 +66,12 @@ annotated_dataset = ImageAnnotations.import_from(path= 'folder_path', format= 'a
6666

6767
## Usage
6868
### Image Annotation Loader
69+
70+
#### Setup
71+
To use Image Annotation Loader, please install the extra libs required for `annotations`
72+
6973
```python
70-
from clarifai_datautils import ImageAnnotations
74+
from clarifai_datautils.image import ImageAnnotations
7175
#import from folder
7276
coco_dataset = ImageAnnotations.import_from(path='folder_path',format= 'coco_detection')
7377

clarifai_datautils/image/annotation_conversion/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
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
1115
coco_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
2530
coco_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
4145
from clarifai.client.dataset import Dataset
4246
dataset = Dataset(user_id="user_id", app_id="app_id", dataset_id="dataset_id")
4347
dataset.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
4751
clarifai_dataset = ImageAnnotations.import_from(path='folder_path',format= 'clarifai')
4852

4953
#export to other formats

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ llama-index-llms-clarifai==0.1.2
55
pi_heif==0.18.0
66
markdown==3.7
77
python-docx==1.1.2
8+
schema==0.7.5

0 commit comments

Comments
 (0)