Exporting tasks
You can use the SDK to export your annotations using a Python script. The CLI also provides a simple and optimized workflow for exporting annotations.
Annotations are exported in two ways:
- 1.The
export_tasks
function returns a Python object containing important meta-data information and any vector annotations (measurements, landmarks, etc.). Please see the format of the object here. - 2.Segmentation data is written to your disk in the NIfTI format. Segmentation data can also be exported in PNG format. Please see the folder structure here.
project = redbrick.get_project(org_id, project_id, api_key)
annotations = project.export.export_tasks()
You can export only the tasks in Ground Truth, i.e., tasks that have successfully made it through all Labeling and Review stages.
annotations = project.export.export_tasks(only_ground_truth=True)
Export select tasks by specifying Task IDs.
annotations = project.export.export_tasks(task_id="...")
Generating an audit trail can be useful material for regulators interested in your quality control processes and for managing your internal QA processes.
You can generate a detailed audit trail of all actions/events associated with every task using
get_task_events
.Perform the standard RedBrick AI SDK set-up to create a project object and retrieve the audit trail for all tasks.
project = redbrick.get_project(org_id, project_id, api_key)
audit_trail = project.get_task_events()
Generate the audit trail for all tasks (not only the ones in ground truth).
audit_trail = project.get_task_events(only_ground_truth=False)
The returned object will contain data similar to what is shown below. Each entry will represent a single task (uniquely identified by
taskId
). The events
array contains all key events/actions performed on the task, with events[0]
being the first event.[
{
"taskId": "...",
"currentStageName": "Label",
"events": [
{
"eventType": "TASK_CREATED",
"createdAt": "...",
"isGroundTruth": false,
"createdBy": "..."
},
{
"eventType": "TASK_ASSIGNED",
"createdAt": "...",
"assignee": "...",
"stage": "Label"
}
]
}
]
Last modified 2mo ago