Official Superb AI Suite Command Line Interface for managing data and labels on Superb AI Suite.
- Installation
- Authentication
- Resource Description
- Uploading Dataset
- Downloading Data & Labels
- Contributing
- License
$ 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.
You need an Access Key for authentication. The Access Key can be generated on the 🎉 Superb AI Suite web (Suite > My Account > Advanced).
You can then configure your profile by entering your Suite Team Name and the generated Access Key.
🚨 Suite Team Name refers to the organization name that your personal account belongs to:
$ spb configure
Suite Team 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
team_name = bar
You can list all projects that belong to the currently configured profile by using the following command:
$ spb describe projects
┏━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ NAME ┃ DATA_TYPE ┃ LABELS ┃ IN PROGRESS ┃ SUBMITTED ┃ SKIPPED ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━┩
│ my-project │ Image │ 6000 │ 1000 (16 %) │ 2000 (33 %) │ 0 (0 %) │
...
Press any button to continue to the next page (1/10). Otherwise press ‘Q’ to quit.
$ spb describe project --show reviews
┏━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ NAME ┃ DATA_TYPE ┃ LABELS ┃IN PROGRESS ┃IN PROGRESS ┃SUBMITTED ┃SUBMITTED ┃SKIPEED ┃SKIPEED ┃
┃ ┃ ┃ ┃Rejected ┃Not Submitted ┃Approved ┃Pending Review ┃Approved ┃Pending Review┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ my-project │ Image │ 6000 │ 1000 │ 1000 │ 1000 │ 1000 │ 1000 │ 1000 │
...
Press any button to continue to the next page (1/10). Otherwise press ‘Q’ to quit.
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 some-folder
$ spb upload dataset
Project Name: my-project
Dataset Name: my-dataset
Uploading 3 data and 0 labels to dataset 'my-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 label files along with the dataset, you can enable the --include-label
option:
$ cd some-folder
$ spb upload dataset --include-label
Project Name: my-project
Dataset Name: my-dataset
Uploading 3 data and 0 labels to dataset 'my-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]
To learn how to create a label JSON file according to the Superb AI format, please refer to the Annotation JSON File Structure section in the linked Superb AI Suite Manual.
You can download images and labels for a project by using the following command:
$ cd some-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:
└─ some-folder
└─ my-dataset
├─ 1.jpg
├─ 1.jpg.json
├─ 2.jpg
├─ 2.jpg.json
...
Feel free to report issues and suggest improvements.
Please email us at [email protected]
The MIT License (MIT)
Copyright (c) 2020, Superb AI, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.