Suite Standard Library
Project description
Suite CLI
Official Suite SDK for managing Superb AI Suite Platform
Suite SDK can both be used from the command line interface and as a Python library.
- Installation
- Getting Started
- Listing Projects
- Uploading Dataset
- Downloading Data & Labels
Installation
$ pip install spb-cli
$ spb --version
0.0.xx
Once installed, you can type spb
command in the terminal to access the command line interface.
Usage as a command line interface (CLI)
Getting Started
Authentication
You need an Access Key for authentication. The Access Key can be generated on the :tada: Superb AI Suite web (Suite > My Account > Advanced).
You can then configure your profile by entering your Suite Account Name and the generated Access Key.
:warning: Suite Account Name does NOT refer to your personal account. It refers to the organization name that your personal account belongs to.
$ spb configure
Suite Account Name: foo
Access Key: bar
Once configured, you can check the currently configured profile by using the --list
option.
$ spb configure --list
[default]
access_key = foo
account_name = bar
Listing Projects
You can list all projects that belong to the currently configured profile by using the following command:
$ spb describe projects
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┓
┃ NAME ┃ LABELS ┃ PROGRESS ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━┩
│ my-project │ 5837 │ 13.7% │
...
Press any button to continue to the next page (1/10). Otherwise press ‘Q’ to quit.
Uploading Dataset
You can upload data and create labels for your project with this command line interface.
Move to the dataset directory that has image files (with extension of .jpg
, .png
, .gif
) and upload images in the directory by using the following CLI command:
$ cd your-folder
$ spb upload dataset
Project Name: my-project
Dataset Name: sample-dataset
Uploading 3 data and 0 labels to dataset 'sample-dataset' under project 'my-project'. Proceed? [y/N]: y
Uploading data:
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.06s/it]
If you wish to upload the pre-label files along with the dataset, you can enable the --include-label
option:
$ cd your-folder
$ spb upload dataset --include-label
Project Name: my-project
Dataset Name: sample-dataset
Uploading 3 data and 0 labels to dataset 'sample-dataset' under project 'my-project'. Proceed? [y/N]: y
Uploading data:
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.06s/it]
Uploading labels:
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 3.40s/it]
Or if you wish to only upload the pre-label :label: files:
$ spb upload labels
Project Name: my-project
Dataset Name: sample-dataset
To understand how to construct a pre-label JSON file according to the Superb AI format, please refer to the Superb AI Suite Manual.
Downloading Data & Labels
You can download images and labels for a project by using the following command:
$ cd your-folder
$ spb download
Project Name: my-project
Downloading 3 data and 3 labels from project 'my-project' to '.'. Proceed? [y/N]: y
100%|██████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.11it/s]
** Result Summary **
Successful download of 3 out of 3 labels. (100.0%)
Successful download of 3 out of 3 data. (100.0%)
The result is saved to the designated directory. For example:
└─ your-folder
└─ sample-dataset
├─ 1.jpg
├─ 1.jpg.json
├─ 2.jpg
├─ 2.jpg.json
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.