Taxonomies

Taxonomies allow you to define the structures that you'd like to annotate in your project and apply them to your data quickly and accurately. They ensure all annotations follow a structured schema which is automatically imported to the left hand sidebar of RedBrick AI's Annotation Tool.

Object Label Types

Object Labels are the structures that your team will annotate on RedBrick AI.

When creating your Taxonomy, you must define a Label Type (e.g. "Segmentation") and a Name (e.g. "Edema") for each Object Label.

RedBrick AI supports the following Object Label Types:

Object Label Type2D Image 3D Image 2D Video

Segmentation

Landmarks

Angle Measurement

Length Measurement

Bounding Box

Ellipse

Polygon

Polyline

Cuboid

Object Label Attributes

Attributes allow you to add a deeper level of classification to your Object Labels. Attributes are commonly used to collect more information about a particular object (e.g. "True/False" for an Object titled "tumor malignancy"). RedBrick AI offers the following Attribute Types:

Attribute TypeDescription

Boolean

A checkbox that can be either True or False

Select

A dropdown that can be a single value from a list of predefined values

Multi-select

A dropdown that can have multiple values from a list of predefined values

Textfield

A text input that can record free form text

Classifications

Classifications are data attributes that can be affixed to studies, individual Series, or individual video frames.

Just like Object Label Attributes, Classifications can be Booleans, Single Selects, Multi-selects, or Text fields, and there is no limit to the number of Classifications you can have in your Taxonomy.

Study-Level Classifications are a classification for an entire Task (e.g. an MRI study consisting of 4 Series).

Series-Level Classifications are applied to a single series (e.g. the T1 sequence from an MRI study).

Instance-Level Classifications are applied to a single frame of a video and are only available for 2D video formats.

Classification Type2D Image3D Image2D Video

Study

Series

Instance

Creating Taxonomies

Taxonomies are created and stored at the Organization level, which allows you to use a single Taxonomy for several Projects.

To create a new Taxonomy in the UI, navigate to the Taxonomies page in the left hand side bar of the RedBrick web app and click on Create Taxonomy.

Taxonomies can also be created using the create_taxonomy() SDK method.

All Taxonomies must contain at least one Object Label or Classification in order to be successfully created.

Modifying Taxonomies

Taxonomies can be modified on the Taxonomies page of the UI at any time.

Alternatively, you can use the update_taxonomy() SDK method to modify a Taxonomy outside of the UI. Please note the following about modifying existing Taxonomies:

  1. the update_taxonomy() method overwrites the current Taxonomy in its entirety;

  2. If you delete an Object Category, Attribute, or Classification from your Taxonomy, all existing associated annotations will need to be updated;

  3. Taxonomies that are being used in Projects cannot be deleted;

Nesting Taxonomy Elements

Taxonomies now support the nesting of Object Labels, Study-Level and Series-Level Classifications both in the UI and via the RedBrick AI Python SDK.

By adding the parents attribute to your Taxonomy, you can create and/or designate Parent Tiers for a given Object Label.

Nested Object Labels in the Annotation Tool

Nesting Object Labels in the UI

In the Taxonomies page, simply click on Add Folder and give your folder a name.

You can then easily drag and drop your Objects Labels or Classifications into your folder.

Nesting Object Labels via SDK

You can create Parent Tiers by adding the parents:[] attribute to any Object Label, Study-Level, Series-Level, or Instance-Level Classification within your Taxonomy. Parent Tiers are created and assigned from left to right and in descending order, which means the first string in parents:[] will always be a Tier 1 Parent, the second string will be a Tier 2 Parent, and so on.

For full documentation, please see our Taxonomy Object reference.

For an example of a two-tiered Object Label structure, please see the example code below:

org.create_taxonomy_new(
    "Clinical Study 1",
        
    object_types=
    [
        {
            "category": "Herniated Disc",
            "labelType": "SEGMENTATION",
            "attributes": [],
            "color": "#7FFFD4",
            "classId": 0,
            # Creates the Tier 1 Parent 'Spine Pathologies' and Tier 2 Parent 'Disc Pathologies'
            "parents": ['Spine Pathologies', 'Disc Pathologies'],
        },
        {
            "category": "Bulging Disc",
            "labelType": "SEGMENTATION",
            "attributes": [],
            "color": "#DEB887",
            "classId": 1,
            "parents": ['Spine Pathologies', 'Disc Pathologies'],
        },
        {
            "category": "Degenerated Disc",
            "labelType": "SEGMENTATION",
            "attributes": [],
            "color": "#00FFFF",
            "classId": 2,
            "parents": ['Spine Pathologies', 'Disc Pathologies'],
        },
        {
            "category": "Vertebral Fracture",
            "labelType": "SEGMENTATION",
            "attributes": [],
            "color": "#FF7F50",
            "classId": 3,
            "parents": ['Spine Pathologies'],
        },
    ],
)

The above Taxonomy will be nested in the Annotation Tool as well. Tiers can also be collapsed or expanded as necessary, allowing you to easily navigate through Label Tiers and save screen space.

HTML Tooltips

RedBrick AI allows users to attach custom HTML tooltips to any Object Label, Study-Level Classification, Series-Level, or Instance-Level Classification. For larger, more complex Taxonomies, these tooltips can be a great form of input for annotators or serve as a record for any internal standards that may be associated with the annotation itself.

Creating HTML Tooltips in the UI

First, open a Taxonomy and click on any Object Label or Classification. The Hint field will then appear, allowing you to copy/paste your HTML into RedBrick or write your own using our intelligent autocomplete feature.

Creating HTML Tooltips via SDK

If you're prefer to create HTML Tooltips with the SDK, you can use the hint: string attribute to insert a string of HTML that will display in a tooltip next to an annotation upon hover. Please see the following code for an example of an Object Label with an HTML tooltip.

object_types=
    [
        {
           "category": "Herniated Disc",
           "labelType": "SEGMENTATION",
           "attributes": [],
           "color": "#7FFFD4",
           "classId": 0,
           "parents": ['Spine Pathologies', 'Disc Pathologies'],
           "hint": '<h2>Annotate each instance separately!</h2><a href=https://en.wikipedia.org/wiki/Spinal_disc_herniation>Reference</a><p>Send qs to Jason</p>'
         },
]

All HTML elements can be included within the hint: string attribute, but images must be inserted using <img src> and a relevant link.

The above code displays as follows in the Annotation Tool:

For security reasons, we do not allow scripts to be executed within HTML Tooltips.

Last updated