Uploading Raw Data and Labels
A guide for uploading data and creating labels for your project.

Uploading Raw Data

To upload data to a project, move to the dataset directory that has the image files you wish to upload (with extension of .jpg, .png, .gif) and use the following CLI command:
1
$ cd some-folder
2
$ spb upload dataset
3
Project Name: my-project
4
Dataset Name: my-dataset
5
6
Uploading 3 data and 0 labels to dataset 'my-dataset' under project 'my-project'. Proceed? [y/N]: y
7
Uploading data:
8
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.06s/it]
Copied!

Uploading Label Files Only

If you already have raw data uploaded, and wish to upload (or update) the label files (annotation JSON files) only, you can use the following command. Note that you must enter the name of the Dataset that the raw data files which the label files describe belong to. For example, if you upload 1.jpg.json as the label file for 1.jpg, you must enter the name of the dataset and project this 1.jpg file belongs to.
1
$ cd some-folder
2
$ spb upload labels
3
Project Name: my-project
4
Dataset Name: my-dataset
Copied!
To learn how to create a label JSON file according to the Superb AI CLI format, please refer to the following JSON file:
1
{
2
“result”: {
3
“objects”: [
4
{
5
“id”: “********-****-****-****-************“, #random uuid for the label
6
“class_id”: “********-****-****-****-************“, #uuid of the class found in project.json
7
“tracking_id”: 1, #number that associates with the label
8
“class_name”: “example”, #class_name found in project.json
9
“annotation_type”: “box”,
10
“annotation”: {
11
“coord”: {
12
“x”: 10,
13
“y”: 20,
14
“width”: 20,
15
“height”: 20
16
},
17
“meta”: {
18
“z_index”: 0,
19
“visible”: true,
20
“alpha”: 1,
21
“color”: “#FF625A” #color of the class found in project.json
22
}
23
},
24
“properties”: []
25
}
26
],
27
“categories”: {
28
“properties”: []
29
}
30
}
31
}
Copied!

Uploading Raw Data and Labels Together

If you wish to upload the label files (annotation JSON files) along with the raw data, you can enable this by using the --include-label option. Note that the JSON files must be in the same directory as the raw data files.
1
$ cd some-folder
2
$ spb upload dataset --include-label
3
Project Name: my-project
4
Dataset Name: my-dataset
5
6
Uploading 3 data and 0 labels to dataset 'my-dataset' under project 'my-project'. Proceed? [y/N]: y
7
Uploading data:
8
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.06s/it]
9
Uploading labels:
10
100%|██████████████████████████████████████████████████| 3/3 [00:03<00:00, 3.40s/it]
Copied!
To learn how to create a label JSON file according to the Superb AI format, please refer to the Annotation JSON File Structure section.
Any other questions? E-mail us at [email protected].