LogoLogo
RedBrick AIGuides
  • Quick Start
    • Walkthrough Guides
    • Get Started with a Project
    • Get Started with Workspace
      • Cohort Creation
      • Datapoint Classification
      • Configuring Metadata Schema
    • Creating a RedBrick AI Account
  • Organizations
    • Organization and Project Roles
    • Inviting Your Team
      • Single Sign-on
  • Dashboard
    • Account Settings
    • User Preferences
    • Worklist
    • Preview Tool
    • Integrations
    • Taxonomies
    • Boost
      • Auto Annotator
    • Home
      • Sections
  • Importing Data
    • Uploading Data to RedBrick
    • Import Cloud Data
      • Configuring AWS s3
      • Configuring Azure Blob
      • Configuring GCS
      • Configuring AltaDB
      • Creating an Items List
    • Troubleshooting
  • Projects
    • Tasks & Assignment
    • Comments & Raise Issue
    • Reference Standards
    • Project & Task Analytics
    • Labeler Evaluation
  • Project Pages
    • Data Page
    • Settings Page
      • Custom Label Validation
      • Custom Hanging Protocol
      • Webhooks
    • Multiple Labeling
      • Consensus
        • Agreement calculation
      • Task duplication
  • Annotation & viewer
    • Viewer Basics
      • Document Viewer
      • Multiple Modalities
      • Intellisync
      • Annotation Mirroring
    • Creating, Editing and Deleting Annotations
    • Visualization and Masking
    • Segmentation
      • Segmentation Tools
      • Instance vs. Semantic
      • Overlapping Segmentations
    • Heat maps
  • Python SDK & CLI
    • Full documentation
    • Installation & API Keys
    • SDK Overview
      • Importing Data & Annotations
      • Programmatic Label & Review
      • Assigning & Querying Tasks
      • Exporting Annotations
    • CLI Overview
      • Creating & Cloning Projects
      • Import Data & Annotations
      • Exporting Annotations
    • Importing Annotations Guide
    • Formats
      • Full Format Reference
      • Export Structure
  • Useful Links
    • Privacy Policy
Powered by GitBook
On this page
  • Import locally stored images
  • Import externally stored images
  • Import annotations
  • Importing locally stored annotations & images
  • Importing locally stored annotations with externally stored images
  • Importing externally stored annotations and images

Was this helpful?

  1. Python SDK & CLI
  2. SDK Overview

Importing Data & Annotations

PreviousSDK OverviewNextProgrammatic Label & Review

Last updated 1 year ago

Was this helpful?

The RedBrick AI SDK allows you to programmatically import data and/or annotations with a Python script. You can import either locally or externally stored data via the SDK using the create_datapoints method.

Please see the full reference documentation for .

Perform the to create a Project object.

project = redbrick.get_project(org_id, project_id, api_key)

Import locally stored images

To import locally stored data, create a list of points with relative file paths to your locally stored data, and use the storage ID.

# create a list of file paths to your locally stored data
points = [{"items": ["path/to/data.nii"], "name": "..."}]

# perform the upload operation
project.upload.create_datapoints(
    storage_id=redbrick.StorageMethod.REDBRICK, 
    points=points
)

The points array follows the format of the .

Import externally stored images

To import data stored in an external storage method such as AWS s3, be sure to use the Storage ID found on the Storage tab of your RedBrick AI account instead of redbrick.StorageMethod.REDBRICK.

Import annotations

Importing locally stored annotations & images

project.upload.create_datapoints(
    storage_id=redbrick.StorageMethod.REDBRICK, 
    points=points
)

Importing locally stored annotations with externally stored images

project.upload.create_datapoints(
    storage_id="your_storage_id", 
    label_storage_id=redbrick.StorageMethod.REDBRICK
    points=points
)

Importing externally stored annotations and images

project.upload.create_datapoints(
    storage_id="your_storage_id", 
    label_storage_id="your_storage_id"
    points=points
)

to learn how to integrate your own external storage like AWS s3, GCS, or Azure blob.

First, please follow our guide on import to prepare your points object correctly.

Visit our documentation on external storage
preparing your items list for annotation
Importing Annotations Guide
create_datapoints here
redbrick.StorageMethod.REDBRICK
items list
Click on the field to copy the Storage ID to your clipboard!
standard RedBrick AI SDK setup