Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pip3 install -r requirements.txt
Quick intro to Image Annotation Conversion feature

```python
from clarifai_datautils import ImageAnnotations
from clarifai_datautils.image import ImageAnnotations

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

## Usage
### Image Annotation Loader

#### Setup
To use Image Annotation Loader, please install the extra libs required for `annotations`

```python
from clarifai_datautils import ImageAnnotations
from clarifai_datautils.image import ImageAnnotations
#import from folder
coco_dataset = ImageAnnotations.import_from(path='folder_path',format= 'coco_detection')

Expand Down
14 changes: 9 additions & 5 deletions clarifai_datautils/image/annotation_conversion/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Annotation Loader

A framework to load,export and analyze different annotated datasets
A framework to load, export and analyze different annotated datasets


## Setup
To use Image Annotation Loader, please install the extra libs required for `annotations`


## Usage
### Features
```python
from clarifai_datautils import ImageAnnotations
from clarifai_datautils.image import ImageAnnotations
#import from folder
coco_dataset = ImageAnnotations.import_from(path='folder_path',format= 'coco_detection')

Expand All @@ -21,7 +25,8 @@ coco_dataset.export_to('voc_detection')

### Upload using Clarifai Python SDK
```python
from clarifai_datautils import ImageAnnotations
from clarifai_datautils.image import ImageAnnotations
#import from folder
coco_dataset = ImageAnnotations.import_from(path='folder_path',format= 'coco_detection')

#clarifai SDK
Expand All @@ -35,15 +40,14 @@ dataset.upload_dataset(dataloader=coco_dataset.dataloader)

### Export to other formats from Clarifai Platform
```python

#clarifai SDK
#export CLARIFAI_PAT={your personal access token} # set PAT as env variable
from clarifai.client.dataset import Dataset
dataset = Dataset(user_id="user_id", app_id="app_id", dataset_id="dataset_id")
dataset.export(save_path='output.zip',split='train')

#Extract the zip file and pass the folder to ImageAnnotations
from clarifai_datautils import ImageAnnotations
from clarifai_datautils.image import ImageAnnotations
clarifai_dataset = ImageAnnotations.import_from(path='folder_path',format= 'clarifai')

#export to other formats
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ llama-index-llms-clarifai==0.1.2
pi_heif==0.18.0
markdown==3.7
python-docx==1.1.2
schema==0.7.5
Loading