How to Label
Labeling your data is what Encord Annotate is about. Labeling is initiated in the Queue tab of your Project. Annotators use the Project’s Ontology to label data from Datasets that are attached to the Project.
Three types of annotation can be created:
- Objects: Label specific parts of the data unit using a specified shape. Objects are not supported for audio annotation.
- Classifications: Apply to a whole image or frame. They do not have a specific location.
- Attributes: Can be nested into objects and classifications to add more details to the annotation.
Introduction to Image Annotation
Introduction to Video Annotation
Labeling Audio Files
You can only use Audio Region objects, and classifications to label audio files. See our end-to-end guide on labeling audio files to learn how to set up audio specific Ontologies.
Navigate to the Queue tab of your Project and select the data unit you want to label.
To label an audio region:
-
Select a Audio Region class from the left side menu.
-
Click and drag your cursor along the waveform to apply the label between the desired start and end points. Repeat this as many times necessary while the class is selected.
-
If required, apply any attributes to the region.
-
Repeat these steps for as many regions as necessary.
To apply the classification to the entire audio file:
-
Select the Classification from the left side menu.
-
For radio buttons and checklists, select the value(s) you want to classification to have. For text classifications, enter the desired text.
Labeling Text and HTML Files
You can only use Text Region objects, and classifications to label text files including HTML.
Text files include formats such as .txt
, .md
, .rst
, .xml
, .html
, .json
, and more. However, HTML files are categorized slightly differently from other text file types. As a result, this documentation is divided into separate Text and HTML sections.
The following types of labels can be applied to all text files, and at least one must be present in your project’s ontology to enable text labeling:
- Text Region: Object labels applied to a specific region within the text file.
- Classifications: Classification labels applied to the entire file.
Text
HTML
Encord supports both raw HTML files and single-extension HTML files. The key difference is that single-extension HTML files include all the necessary elements to render the webpage, such as CSS and JavaScript.
This video tutorial demonstrates how to label raw HTML. The process for labeling rendered HTML is identical.
Creating Classification Labels
-
Navigate to the Queue tab of your Project.
-
Select the data unit you want to label. The task opens in the Label Editor.
-
Select the classification you want to apply to the frame / image from the list of classes on the left side of the Label Editor.
-
Provide a classification answer.
- Text classification: Type the classification answer in the text field that appears.
- Radio button: Select one classification answer from the list of options. Radio buttons can have nested options.
- Checklist: Select all applicable classification answers.
-
If labeling a video, several options appear above the editor timeline.
- This frame & save (hotkey Z): Apply the classification to the current frame and save.
- This frame (hotkey X): Apply the classification to the current frame.
- Set start to current (hotkey C): Defines the current frame as the start of the range to which the classification is applied.
- Set end to current (hotkey V): Defines the current frame as the end of the range to which the classification is applied.
- Add range (hotkey N): Applies the classification to the range of frames defined in the bar above the buttons.
- Save (hotkey M): Saves the classification.
- Ensure you save the classification. The classification appears in the list of all labels on the left side of the Label Editor.
Creating Object Labels
-
Navigate to the Queue tab of your Project.
-
Select the data unit you want to label. The task opens in the Label Editor.
-
Select the object you want to label from the list of classes on the left side of the Label Editor.
-
Apply the instance label.
- Bounding box: Click once to start drawing the shape. A second click completes the shape.
- Rotatable bounding box: Click once to start drawing the shape. A second click completes the shape. The box can be rotated.
- Polygon: Click once to start drawing the shape. Click again to add a vertex. Add as many vertices as necessary. To complete the shape, double-click or return to the first vertex.
- Polyline: Click once to start drawing the shape. Click again to add a vertex. Add as many vertices as necessary. Double-click to complete the shape.
- Keypoint: Click once to add a keypoint.
- Bitmask: Click and hold to draw a bitmask using the brush tool. For detailed information on using bitmasks, see our documentation here.
- Save the label by clicking the Save icon on the editor header.
Adding attributes
After creating an object or a classification you can add any attributes defined in your Ontology.
- In the Labels section of the Label Editor, click the Edit attributes button to add an attribute to an object or classification label.
- Add an attribute answer.
- Text attribute: Type the attribute answer in the text field that appears.
- Radio button: Select one attribute answer from the list of options. May have nested options.
- Checklist: Select all applicable attribute answers.
Dynamic attributes
Attributes marked as Dynamic can change value over the course of a data unit, and are therefore only applicable to videos, image sequences, and DICOM volumes.
Bulk Apply Dynamic Attributes
You can efficiently apply dynamic attributes in bulk to save time and effort. This is accomplished by identifying frames where the attribute changes value as “keyframes,” and then applying attribute values between these keyframes.
-
Apply object labels to all relevant frames.
-
Add the dynamic attribute to the label in the first frame that the object appears in.
-
Navigate to the point of the video or image sequence where the dynamic attribute changes value, and apply the attribute to the object here.
-
Use the **+****, or the keyboard shortcut Shift + L to set keyframes on frames where the attribute changes value.
-
Use the Play icon, or the keyboard shortcut Shift + P to apply attribute values to all frames following a keyframe, matching the value set in the keyframe.
Apply to new occurrences:
The Apply to new occurrences checkbox in the Label Editor is available for the first instance of a label with a dynamic attribute. Selecting this option propagates the attribute to all future instance labels, meaning all labels created for this instance share the attribute value of the initial instance label.
The ‘Apply to new occurrences’ functionality also holds for instance labels created automatically using interpolation.
Relation Attributes
The Relation attribute allows you link objects, and specify the relationship between them using text regardless of the annotation type used.
All Relation attributes must be text fields. They cannot be radio buttons or checklists. Relation attributes can be applied to object labels of any kind, but not classifications.
To create a Relation attribute, enable the Relation feature when creating an attribute during Ontology creation. The default name for all Relation attributes is #relation.
Using Relation attributes in the Label Editor:
Once an Ontology with Relation attributes has been set up, instances can be linked in the Label Editor during annotation.
-
Create both instance labels. For example, a chicken and its wing are labeled using bounding boxes.
-
Click the Edit classifications button for the object with the Relation attribute. For example, to the chicken wing.
- Click the Set relation… bar and select the instance you want to link the selected instance to. In this example the chicken and the wing appear on the same frame, and therefore appear under the This frame heading. Instances in different frames appear under the heading Rest.
- Click Done. The instances are now linked. This is shown in the Instance labels section with the name of the linked instance being displayed.
Object Primitives & Skeletons
The following tutorial covers creating Object Primitives and labeling using skeletons.
To label using Skeletons:
- Select your Skeleton class from the left-hand menu.
- Click on the canvas to place points one by one. The currently active point is highlighted in the left sidebar.
Once the final point is placed, the Skeleton is automatically completed.
- Use the toggle next to each point to mark it as visible, invisible, or occluded. By default, all points are set to visible.
Automated labeling
Encord provides several automated labeling techniques to accelerate your labeling.
-
Segment anything model (SAM) allows you to automatically create labels around distinct features in all supported file formats.
-
Interpolation is an automated process to estimate the location of labels between two manually created labels. Simply put, it is “filling in the blanks” between labels you have created.
-
Object tracking is a process to estimate the location of a label based on pixel information enclosed within the labels you have manually provided.
-
Auto segmentation tracking accurately tracks polygon and bitmask labels across a range of frames.
Was this page helpful?