Import Data & Annotations
You can easily import large amounts of data from the command line interface. Before following this guide, make sure to set up credentials for the CLI.
Make sure your data is stored within the correct folder structure as defined in our documentation. You can only upload a single data type in one upload operation - see the supported file types here.
$ redbrick upload path/to/data/ --type DICOM3D
$ redbrick upload path/to/data/ --as-study
$ redbrick upload path/to/videoframes/ --as-frames --type VIDEOFRAMES
To import data that is stored externally, (e.g. in an AWS s3 bucket), you must specify the storage ID. You can find your storage solution's unique Storage ID in the Storage tab of the RedBrick AI platform.

Click on the field in order to copy the value to your clipboard.
$ redbrick upload items.json --storage STORAGEID # replace STORAGEID with your Storage ID
To import annotations with your data, you must create an Items List that contains annotation information in the proper annotation format.
Please note that you can only import an Items File that contains annotations using the SDK & CLI. The RedBrick AI UI does not support importing JSON Items Files that contain annotations.
The file paths within the Items List can point to locally stored data or data in your external storage.
If your image data is stored externally, be sure to provide the Storage ID with
--storage.
If your annotation files are stored externally, be sure to provide the Storage ID with --label-storage.
Here is a sample Items List that contains annotation information:
1
[
2
{
3
"name": "study1",
4
"series": [
5
{
6
"items": "series1.nii",
7
"name": "series1",
8
"segmentations": "series1_seg.nii"
9
},
10
{
11
"items": "series2.nii",
12
"name": "series2",
13
"segmentations": "series2_seg.nii"
14
}
15
],
16
"segmentMap": {
17
"1": {
18
"category": "necrosis"
19
},
20
"2": {
21
"category": "edema"
22
},
23
"3": {
24
"category": "non-enhancing tumor"
25
},
26
"4": {
27
"category": "enhancing tumor"
28
}
29
}
30
},
31
{
32
"name": "study2",
33
"series": [
34
{
35
"items": "series1.nii",
36
"name": "series1",
37
"segmentations": "series1_seg.nii"
38
},
39
{
40
"items": "series2.nii",
41
"name": "series2",
42
"segmentations": "series2_seg.nii"
43
}
44
],
45
"segmentMap": {
46
"1": {
47
"category": "necrosis"
48
},
49
"2": {
50
"category": "edema"
51
},
52
"3": {
53
"category": "non-enhancing tumor"
54
},
55
"4": {
56
"category": "enhancing tumor"
57
}
58
}
59
},
60
]
$ redbrick upload path/to/items.json # items.json must have local file paths.
The following command will upload your (locally stored) annotation files and your image files (stored in
STORAGEID
):$ redbrick upload path/to/items.json --storage STORAGEID
If your annotation files are also stored externally, you can run the following command:
$ redbrick upload path/to/items.json --storage STORAGEID --label-storage LABELSTORAGEID
You can follow along with this Jupyter notebook to upload the Brain Brats data along with its annotations.
Last modified 1mo ago