The RedBrick CLI offers a simple interface to quickly import and export your images & annotations, and perform other high-level actions.
usage: redbrick [-h] [-v] [—completion {bash,zsh,tcsh}] {config,init,clone,info,export,upload,report} …
-v, —version
show program’s version number and exit
—completion
Possible choices: bash, zsh, tcsh
print shell completion script
command
Possible choices: config, init, clone, info, export, upload, report
Setup the credentials for your CLI.
redbrick config [-h] [—org ORG] [—key KEY] [—url URL] [—profile PROFILE] [—force] {list,set,add,remove,clear,verify} …
sub_command
Possible choices: list, set, add, remove, clear, verify
—org, -o
Org ID
—key, -k
API Key
—url, -u
Endpoint URL, should default to https://api.redbrickai.com.
—profile, -p
Profile name
—force, -f
Force create new credentials
Default: False
List all credential profiles
redbrick config list [-h]
Set your default credentials profile
redbrick config set [-h] [profile]
profile
Profile name
Add a new profile
redbrick config add [-h] [—org ORG] [—key KEY] [—url URL] [—profile PROFILE]
—org, -o
Org ID
—key, -k
Add your API Key.
—url, -u
Endpoint URL, should default to https://api.redbrickai.com.
—profile, -p
Define a name for your authentication profile.
Remove a profile
redbrick config remove [-h] [profile]
profile
Profile name
Clear all credentials
redbrick config clear [-h]
Verify a profile
redbrick config verify [-h] [profile]
profile
Profile name
Create a new project. We recommend creating a new directory and naming it after your project, initializing your project within the new directory.
cd new-project $ redbrick init
redbrick init [-h] [—name NAME] [—taxonomy TAXONOMY] [—reviews REVIEWS] [—workspace WORKSPACE] [—sibling-tasks SIBLING_TASKS] [path]
path
Local path of the empty project directory
Default: “.”
—name, -n
Project name
—taxonomy, -t
Taxonomy name
—reviews, -r
Number of review stages
—workspace, -w
The workspace that you want to add this project to
—sibling-tasks
Number of tasks created for each uploaded datapoint
The project will be cloned to a local directory named after your project name
.
redbrick clone [-h] [project] [path]
project
Project ID or Name
path
Local path of the empty project directory
Get a project’s information
redbrick info [-h] [—get {labelstorage}] [—set {labelstorage}] [path]
path
Path of project (Default: current directory)
Default: “.”
—get, -g
Possible choices: labelstorage
Get a project’s setting information
—set, -s
Possible choices: labelstorage
Set a project setting
Export data for a project
redbrick export [-h] [—with-files] [—dicom-to-nifti] [—old-format] [—without-masks] [—semantic] [—binary-mask] [—single-mask] [—no-consensus] [—png] [—rt-struct] [—mhd] [—clear-cache] [—concurrency CONCURRENCY] [—stage STAGE] [—destination DESTINATION] [type]
type
Export type: (latest [default], groundtruth, )
Default: “latest”
—with-files
Export with files (e.g. images/video frames)
Default: False
—dicom-to-nifti
Convert DICOM images to NIfTI. Applicable when --with-files
is set.
Default: False
—old-format
Whether to export tasks in old format. (Default: False)
Default: False
—without-masks
Exports only tasks JSON without downloading any segmentation masks. Note: This is not recommended for tasks with overlapping labels.
Default: False
—semantic
Whether to export all segmentations as semantic_mask. This will create one segmentation file per class. If this is set to True and a task has multiple instances per class, then attributes belonging to each instance will not be exported.
Default: False
—binary-mask
Whether to export all segmentations as binary masks. This will create one segmentation file per instance.
Default: False
—single-mask
Whether to export all segmentations in a single file. Binary mask will be considered if both binary_mask and single_mask are set.
Default: False
—no-consensus
Whether to export tasks without consensus info. If None, will default to export with consensus info, if it is enabled for the given project.
Default: False
—png
Export labels as PNG masks
Default: False
—rt-struct
Export labels as DICOM RT-Struct. (Only for DICOM images)
Default: False
—mhd
Export segmentation masks in MHD format.
Default: False
—clear-cache
Clear local cache
Default: False
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
—stage, -s
Export tasks that are currently in the given stage. Applicable only with redbrick export
and redbrick export latest
—destination, -d
Destination directory (Default: current directory)
Default: “.”
Upload files to a project
redbrick upload [-h] [—as-frames] [—type [{DICOM3D,NIFTI3D,NRRD3D,IMAGE2D,VIDEO,VIDEOFRAMES}]] [—as-study] [—json] [—segment-map SEGMENT_MAP] [—storage STORAGE] [—label-storage LABEL_STORAGE] [—ground-truth] [—label-validate] [—prune-segmentations] [—rt-struct] [—mhd] [—clear-cache] [—concurrency CONCURRENCY] directory
directory
The directory containing files to upload to the project
—as-frames
Upload video from image frames
Default: False
—type, -t
Possible choices: DICOM3D, NIFTI3D, NRRD3D, IMAGE2D, VIDEO, VIDEOFRAMES
Import file type [’DICOM3D
’, ‘NIFTI3D
’, ‘NRRD3D
’, ‘IMAGE2D
’, ‘VIDEO
’, ‘VIDEOFRAMES
’]
Please refer to our documentation, to understand the required folder structure and supported file types.
Default: “DICOM3D”
—as-study
Group files by study
Default: False
—json
Upload json files with list of task objects
Default: False
—segment-map, -m
Segmentation mapping file path
—storage, -s
Storage method: (redbrick [default], public, )
Default: “redbrick”
—label-storage
Label Storage method: (same as items storage --storage
[default], redbrick, public, )
—ground-truth
Upload tasks directly to ground truth.
Default: False
—label-validate
Validate NIfTI label instances and segmentMap. By default, the uploaded NIfTI files are not validated during upload, which can result in invalid files being uploaded. Using this argument validates the files before upload, but may increase the upload time.
Default: False
—prune-segmentations
Prune segmentations that are not part of the series.
Default: False
—rt-struct
Upload segmentations from DICOM RT-Struct files.
Default: False
—mhd
Upload segmentations from MHD files.
Default: False
—clear-cache
Clear local cache
Default: False
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
Generate an audit report for a project. Exports a JSON file containing all actions & events associated with every task, including:
Who annotated the task
Who uploaded the data
Who reviewed the task
and more.
redbrick report [-h] [—concurrency CONCURRENCY] [type]
type
Export type: (all [default], groundtruth)
Default: “all”
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
Copyright © 2023, RedBrick AI
Made with Sphinx and @pradyunsg’s Furo
On this page
The RedBrick CLI offers a simple interface to quickly import and export your images & annotations, and perform other high-level actions.
usage: redbrick [-h] [-v] [—completion {bash,zsh,tcsh}] {config,init,clone,info,export,upload,report} …
-v, —version
show program’s version number and exit
—completion
Possible choices: bash, zsh, tcsh
print shell completion script
command
Possible choices: config, init, clone, info, export, upload, report
Setup the credentials for your CLI.
redbrick config [-h] [—org ORG] [—key KEY] [—url URL] [—profile PROFILE] [—force] {list,set,add,remove,clear,verify} …
sub_command
Possible choices: list, set, add, remove, clear, verify
—org, -o
Org ID
—key, -k
API Key
—url, -u
Endpoint URL, should default to https://api.redbrickai.com.
—profile, -p
Profile name
—force, -f
Force create new credentials
Default: False
List all credential profiles
redbrick config list [-h]
Set your default credentials profile
redbrick config set [-h] [profile]
profile
Profile name
Add a new profile
redbrick config add [-h] [—org ORG] [—key KEY] [—url URL] [—profile PROFILE]
—org, -o
Org ID
—key, -k
Add your API Key.
—url, -u
Endpoint URL, should default to https://api.redbrickai.com.
—profile, -p
Define a name for your authentication profile.
Remove a profile
redbrick config remove [-h] [profile]
profile
Profile name
Clear all credentials
redbrick config clear [-h]
Verify a profile
redbrick config verify [-h] [profile]
profile
Profile name
Create a new project. We recommend creating a new directory and naming it after your project, initializing your project within the new directory.
cd new-project $ redbrick init
redbrick init [-h] [—name NAME] [—taxonomy TAXONOMY] [—reviews REVIEWS] [—workspace WORKSPACE] [—sibling-tasks SIBLING_TASKS] [path]
path
Local path of the empty project directory
Default: “.”
—name, -n
Project name
—taxonomy, -t
Taxonomy name
—reviews, -r
Number of review stages
—workspace, -w
The workspace that you want to add this project to
—sibling-tasks
Number of tasks created for each uploaded datapoint
The project will be cloned to a local directory named after your project name
.
redbrick clone [-h] [project] [path]
project
Project ID or Name
path
Local path of the empty project directory
Get a project’s information
redbrick info [-h] [—get {labelstorage}] [—set {labelstorage}] [path]
path
Path of project (Default: current directory)
Default: “.”
—get, -g
Possible choices: labelstorage
Get a project’s setting information
—set, -s
Possible choices: labelstorage
Set a project setting
Export data for a project
redbrick export [-h] [—with-files] [—dicom-to-nifti] [—old-format] [—without-masks] [—semantic] [—binary-mask] [—single-mask] [—no-consensus] [—png] [—rt-struct] [—mhd] [—clear-cache] [—concurrency CONCURRENCY] [—stage STAGE] [—destination DESTINATION] [type]
type
Export type: (latest [default], groundtruth, )
Default: “latest”
—with-files
Export with files (e.g. images/video frames)
Default: False
—dicom-to-nifti
Convert DICOM images to NIfTI. Applicable when --with-files
is set.
Default: False
—old-format
Whether to export tasks in old format. (Default: False)
Default: False
—without-masks
Exports only tasks JSON without downloading any segmentation masks. Note: This is not recommended for tasks with overlapping labels.
Default: False
—semantic
Whether to export all segmentations as semantic_mask. This will create one segmentation file per class. If this is set to True and a task has multiple instances per class, then attributes belonging to each instance will not be exported.
Default: False
—binary-mask
Whether to export all segmentations as binary masks. This will create one segmentation file per instance.
Default: False
—single-mask
Whether to export all segmentations in a single file. Binary mask will be considered if both binary_mask and single_mask are set.
Default: False
—no-consensus
Whether to export tasks without consensus info. If None, will default to export with consensus info, if it is enabled for the given project.
Default: False
—png
Export labels as PNG masks
Default: False
—rt-struct
Export labels as DICOM RT-Struct. (Only for DICOM images)
Default: False
—mhd
Export segmentation masks in MHD format.
Default: False
—clear-cache
Clear local cache
Default: False
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
—stage, -s
Export tasks that are currently in the given stage. Applicable only with redbrick export
and redbrick export latest
—destination, -d
Destination directory (Default: current directory)
Default: “.”
Upload files to a project
redbrick upload [-h] [—as-frames] [—type [{DICOM3D,NIFTI3D,NRRD3D,IMAGE2D,VIDEO,VIDEOFRAMES}]] [—as-study] [—json] [—segment-map SEGMENT_MAP] [—storage STORAGE] [—label-storage LABEL_STORAGE] [—ground-truth] [—label-validate] [—prune-segmentations] [—rt-struct] [—mhd] [—clear-cache] [—concurrency CONCURRENCY] directory
directory
The directory containing files to upload to the project
—as-frames
Upload video from image frames
Default: False
—type, -t
Possible choices: DICOM3D, NIFTI3D, NRRD3D, IMAGE2D, VIDEO, VIDEOFRAMES
Import file type [’DICOM3D
’, ‘NIFTI3D
’, ‘NRRD3D
’, ‘IMAGE2D
’, ‘VIDEO
’, ‘VIDEOFRAMES
’]
Please refer to our documentation, to understand the required folder structure and supported file types.
Default: “DICOM3D”
—as-study
Group files by study
Default: False
—json
Upload json files with list of task objects
Default: False
—segment-map, -m
Segmentation mapping file path
—storage, -s
Storage method: (redbrick [default], public, )
Default: “redbrick”
—label-storage
Label Storage method: (same as items storage --storage
[default], redbrick, public, )
—ground-truth
Upload tasks directly to ground truth.
Default: False
—label-validate
Validate NIfTI label instances and segmentMap. By default, the uploaded NIfTI files are not validated during upload, which can result in invalid files being uploaded. Using this argument validates the files before upload, but may increase the upload time.
Default: False
—prune-segmentations
Prune segmentations that are not part of the series.
Default: False
—rt-struct
Upload segmentations from DICOM RT-Struct files.
Default: False
—mhd
Upload segmentations from MHD files.
Default: False
—clear-cache
Clear local cache
Default: False
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
Generate an audit report for a project. Exports a JSON file containing all actions & events associated with every task, including:
Who annotated the task
Who uploaded the data
Who reviewed the task
and more.
redbrick report [-h] [—concurrency CONCURRENCY] [type]
type
Export type: (all [default], groundtruth)
Default: “all”
—concurrency, -c
Concurrency value (Default: 10)
Default: 10
Copyright © 2023, RedBrick AI
Made with Sphinx and @pradyunsg’s Furo
On this page