Configure your Labelmap

Now that your DatasetVersion has been created and populated with Asset, it is time to start dealing with Annotation.

Setting up a clean, well-typed Labelmap before annotating is what lets Computer Vision teams later trust their Dataset: it guarantees every Annotation follows the same structure, makes a DatasetVersion directly usable to train a compatible ModelVersion, and avoids relabeling work down the line.

1. DatasetVersion Version Type and Labelmap

Before annotating the Asset composing your DatasetVersion, you need to initialize it by defining its Version Type and its Labelmap, so that Picsellia can ensure consistency at each step of the process in the future.

For instance, make sure that the Version Type of a DatasetVersion matches the Detection Type of the ModelVersion you might be retraining as part of an Experiment.

🚧

You can skip this initialization part, as it is done automatically by Picsellia when reading the information (Version Type and Labelmap) contained in your annotation file during the import.

A. Set DatasetVersion Version Type

To set up your DatasetVersion properly, go to the Settings of the DatasetVersion, then Configuration > Labels. From here, first select your Version Type and click on Set dataset version type.

Set type

The available Version Type are:

  • Classification
  • Object Detection
  • Segmentation
  • Mask
  • Point
  • Keypoint (skeletons)
  • Line
❗️

You can change the Version Type of a DatasetVersion that is already defined, but to do so, the DatasetVersion must be free of Label, which means deleting all existing Label and associated Shape. It is therefore preferable to fork your DatasetVersion first, to keep a safe copy, as detailed here.

B. Create your Labelmap

A Labelmap is the list of Label attached to a DatasetVersion. Its Label can be left flat or organized into LabelGroup, and each Label can carry its own Attribute. Independently of the Labelmap, Picsellia also lets you attach Attribute directly to the Asset as a whole, as introduced below.

Once your Version Type is defined, you can start creating your Label; there are two ways to do it.

a. From Scratch

With the + Add Label/Group button, you create a new, empty Label line. For each new line, you will be able to choose:

  • The type between Label or LabelGroup (in the case of LabelGroup, you'll then have to create the Label composing the LabelGroup as detailed below)
  • The name of this new Label (or LabelGroup)
  • The color associated with this Label (not applicable for LabelGroup), all the Shape with that Label will then be displayed with that color.

Label creation

At any moment, you can rename a Label or LabelGroup by clicking on its name and confirming with the check mark icon; this updates the Label name or color of every existing Shape using it. You can also delete one or several Label from your DatasetVersion — be aware that deleting a Label deletes all the Shape carrying it from their Annotation (deleting every Label of a DatasetVersion still leaves its Annotation in place, but without any Shape), so use this feature with caution.

Label editing

b. Importing them from another DatasetVersion

With the Import labels from another version button, you can browse the Label of other DatasetVersion of the current Dataset. To do so:

  • Select the DatasetVersion name from which you want to import
  • Define if you want to keep the LabelGroup and Attribute structure of the selected DatasetVersion in the current one
  • Select the Label names and LabelGroup to import in the current DatasetVersion

Once the Labelmap import is properly configured, click on the import button.

Labelmap import form

This also carries over each Label's Attribute configuration. Since no Annotation is imported at this step, you can import Label from a DatasetVersion that has another Version Type.

c. Organize Label into a LabelGroup

Besides individual Label, the + Add Label/Group button also lets you create a LabelGroup. A LabelGroup is a named container that can hold several Label, and even other LabelGroup, forming a multi-level hierarchy instead of a single flat Labelmap. In the Label list, a LabelGroup shows up as an expandable row that you can fold and unfold to reveal the Label (or nested LabelGroup) it contains.

Example of LabelGroup

Usage of LabelGroup in Studio

This becomes especially valuable once a Dataset grows a large number of fine-grained Label: organizing them under a handful of broader LabelGroup (for instance, grouping car, truck, and bus under a vehicle LabelGroup) keeps the Labelmap structured and easy to navigate, both from the UI and through the SDK, which exposes the same hierarchy via create_label_group, list_label_groups, and Label.get_group() / Label.set_group().

You can create a LabelGroup as shown below:

LabelGroup creation

Once a LabelGroup is created, you can add under this one either a proper Label or another LabelGroup to create a multi-level hierarchy:

Label or LabelGroup creation under a LabelGroup

Please note that at the end of the day, any Shape that will be created will have a specific Label, not a LabelGroup. LabelGroup are only there to group actual Label together and to improve the visibility and structure of your Labelmap.

Once created, LabelGroup names can be edited, as is the case for Label, by clicking on the pen icon.

You can move a Label in or out of a LabelGroup, or change which LabelGroup it belongs to, at any time, the same way you created it.

When all your Label are created, you can visualize them and the number of Shape in the current DatasetVersion with this Label. The set of Label attached to a DatasetVersion is called the Labelmap.

d. Add Attribute to a Label

Each Label can carry one or several Shape Attribute, added with the + Add attribute button next to it and filled in for each Shape using that Label when annotating. This captures structured information beyond the Label name, directly on each Shape (for instance a color or a severity Attribute on a defect Label). Their configuration is detailed in Attributes.

e. Asset Attribute

An Asset Attribute describes the Asset as a whole rather than one of its Shape, for instance the weather conditions or the acquisition device for an image. It is configured from the same Labels page, as detailed in Attributes.

2. How to create Annotation

An Annotation is a set of Shape that are linked to an Asset in a DatasetVersion. Depending on the DatasetVersion's Version Type, a Shape can be a Classification, Rectangle, Polygon, Mask, Point, Keypoints, or Line.

A Shape always has a Label among the ones defined previously, which may itself belong to a LabelGroup. Depending on that Label, a Shape can also carry values for its Attribute, and, for OCR use cases, a free text field used to transcribe the text it contains.

There are four ways to create or modify Annotation on Picsellia:

In summary, an Asset of a DatasetVersion has up to one associated Annotation. Each Annotation can have several Shape, each Shape has a Label among the Labelmap defined in the DatasetVersion Settings.

3. Visualize and delete Annotation

Once your DatasetVersion is annotated, its Assets overview displays the Annotation of each Asset: the number of Shape, the review status, and when and by whom it was last modified in the Table view, and the Shape themselves on the Asset in the Grid and Details views. From the same page, you can delete the Annotation of a selection of Asset, as detailed here.

📘

Picsellia computes analytics and lets you build charts to assess the quality of your Dataset, detailed here.


Did this page help you?