Use dataset_client
Client name: dataset_client
Rename tags
Command name: rename_tags
Command that rename a given tag in one or multiple input files
Return: A new import file
Options
Name | Type | Default | Required | Multiple | Description |
---|---|---|---|---|---|
|
| None |
|
| Tags to rename |
|
| None |
|
| Path to the input file where to rename tags |
|
| None |
|
| New tag name |
|
| None |
|
| Add suffix. If a suffix is specify we suffix view's name and real_name and all the concepts |
Examples
Case 1: Rename one tag from a single input_file
dataset_client rename_tags -i client/input_file.json -t previous_tag -n NEW_TAG
Case 2: Rename one tag from multiple input_files
dataset_client rename_tags -i client/input_file.json -i input_file_2.json -t previous_tag -n NEW_TAG
Case 3: Rename multiples tags from a single input_files
dataset_client rename_tags -i client/input_file.json -t previous_tag -t prev_tag -n NEW_TAG
Case 4: Rename tag and add suffix
dataset_client rename_tags -i client/input_file.json -t previous_tag -n NEW_TAG -s _suffix
Import local images
Command name: import_local_images
Command that import local images and annotate them
Return: A new import file
Options
Name | Type | Default | Required | Multiple | Description |
---|---|---|---|---|---|
|
| None |
|
| API Key (you can find your API Key in the admin django platform) |
|
| None |
|
| Deepo environment: |
|
| None |
|
| Folder to import |
|
| None |
|
| Destination organization slug |
|
| None |
|
| Destination project slug |
Requirements
Metadata
In each folder you want to import, you have to add a metadata.txt
file.
Metadata file should contain
If you specify tags=""
, the images will be imported in the project as Not annotated
If you specify tags="without concept"
, the images will be imported and annotated as Without concept
If you specify tags=["dog", "wolf"]
, the images will be imported in the project as dog
and wolf
Examples
Case 1: Import local folder
dataset_client import_local_images -apk your_api_key --depo-env env -f path/to/your/folder/ -o org_slug -p project_slug
Export view
Command name: export_view
Command that export all views and annotations that match the given tags
Options
Name | Type | Default | Required | Multiple | Description |
---|---|---|---|---|---|
|
| None |
|
| Tags to find |
|
| None |
|
| Path to the input file where to rename tags |
|
| None |
|
| Add suffix. If a suffix is specify we suffix view's name and real_name and all the concepts |
| None |
|
| Flatten all the views (all views are view root) | |
| None |
|
| Tree views (views kept their tree) | |
| None |
|
| Indicate that we only want to export this specific tag and associated annotations |
If -flat
or -tree
aren't specify, it will be flatten
by default
Examples
Case 1: Export views from a single input_file
dataset_client export_view -i input_file.json -t tag
Case 2: Export views from multiple input_files
dataset_client export_view -i input_file.json -i input_file_bis.json -t tag
Case 3: Export views and make it flatten (generate only view root)
dataset_client export_view -i input_file.json -t tag -flat
Case 4: Export views and keep the view tree (root, children)
dataset_client export_view -i input_file.json -t tag -tree
Case 5: Export views and add suffix
dataset_client export_view -i input_file.json -t tag -flat -s _suffix
Case 6: Export view that only match the given tag
dataset_client export_view -i input_file.json -t tag --only_tag
Case 7: Export view that only match the given tags
dataset_client export_view -i input_file.json -t tag -t tag2 -t tag3 --only_tag
Download one vesta uri
dataset_client download --api-key <VESTA_API_KEY> --deepo-env <dev3|stag|...> -i <vesta_image uri>
Download images from an import file (with vesta_uri)
dataset_client download --api-key <VESTA_API_KEY> --deepo-env <dev3|stag|...> -f <import file>
You can also specify an output directory to save downloaded images:
dataset_client download --api-key <VESTA_API_KEY> --deepo-env <dev3|stag|...> -f <import file> -o <my output dir>
Ops
Buckets creation
Permissions
Apply
objectCreator
fordataset_client
users on targeted bucket
Apply read access permission to
vesta
andvesta-job
GSAs (See this doc for GSA creation)