This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Editing & Utility Tools

Tools for modifying, grouping, filtering, and managing annotations.

This section covers tools that help modify shapes, manage large annotations, and streamline the annotation workflow.

Use these guides to learn how to join or split shapes, group them, filter objects, and work with contextual images and frame operations.

1 - Join and slice tools

This section explains how to slice or join several labels

In CVAT you can modify shapes by either joining multiple shapes into a single label or slicing a single label into several shapes.

This document provides guidance on how to perform these operations effectively.

See:

Joining masks

The Join masks tool (Join masks tool icon), is specifically designed to work with mask annotations.

This tool is useful in scenarios where a single object in an image is annotated with multiple shapes, and there is a need to merge these shapes into a single one.

Join masks

To join masks, do the following:

  1. From the Edit block, select Join masks Join masks tool icon.
  2. Click on the canvas area, to select masks that you want to join.
  3. (Optional) To remove the selection click the mask one more time.
  4. Click again on Join masksJoin masks tool icon (J) to execute the join operation.

Upon completion, the selected masks will be joined into a single mask.

Join masks gif

Slicing polygons and masks

The Slice mask/polygon (Slicing tool icon) is compatible with both mask and polygon annotations.

This tool is useful in scenarios where multiple objects in an image are annotated with one shape, and there is a need to slice this shape into multiple parts.

Slicing tool

To slice mask or polygon, do the following:

  1. From the Edit block, select Slice mask/polygon Slicing tool icon.
  2. Click on the shape you intend to slice. A black contour will appear around the selected shape.
  3. Set an initial point for slicing by clicking on the contour.
  4. Draw a line across the shape to define the slicing path.
    Hold Shift to add points automatically on cursor movement.
    Note: The line cannot cross itself.
    Note: The line cannot cross the contour more than twice.
  5. (Optional)> Right-click to cancel the latest point.
  6. Click on the contour (Alt+J) (outside the contour) to finalize the slicing.

Slicing tool

2 - Shapes converter

How to perform bulk actions on filtered shapes

The shapes converter is a feature that enables bulk actions on filtered shapes. It allows you to perform mutual conversion between masks, polygons and rectangles.

See:

Run actions menu

Annotations actions can be accessed from the annotation menu. To access it, click on the burger icon and then select Run actions.

Run actions menu open in annotation

You will see the following dialog:

Dialog for removing filtered shapes

With the following fields:

Field Description
Select action Drop-down list with available actions:
  • Remove filtered shapes - removes all shapes in alignment with the set-up filter. Doesn’t work with tracks.
  • Propagate shapes - propagates all the filtered shapes from the current frame to the target frame.
  • Shapes converter: masks to polygons - converts all masks to polygons.
  • Shapes converter: masks to rectangles - converts all masks to rectangles in alignment with the set-up filter.
  • Shapes converter: polygon to masks - converts all polygons to masks.
  • Shapes converter: polygon to rectangles - converts all polygons to rectangles.
  • Shapes converter: rectangles to masks - converts all rectangles to masks.
  • Shapes converter: rectangles to polygons - converts all rectangles to polygons.

  • Note: only Propagate shapes and Remove filtered shapes is available in the community version.
    Specify frames to run action Field where you can specify the frame range for the selected action. Enter the starting frame in the Starting from frame: field, and the ending frame in the up to frame field.

    If nothing is selected here or in Choose one of the predefined options section, the action will be applied to all fields.
    Choose one of the predefined options Predefined options to apply to frames. Selection here is mutually exclusive with Specify frames to run action.

    If nothing is selected here or in Specify frames to run action section, the action will be applied to all fields.

    Convert shapes

    Recommended Precautions Before Running Annotation Actions

    • Saving changes: It is recommended to save all changes prior to initiating the annotation action. If unsaved changes are detected, a prompt will advise to save these changes to avoid any potential loss of data.

    • Disable auto-save: Prior to running the annotation action, disabling the auto-save feature is advisable. A notification will suggest this action if auto-save is currently active.

    • Committing changes: Changes applied during the annotation session will not be committed to the server until the saving process is manually initiated. This can be done either by the user or through the auto-save feature, should it be enabled.

    To convert shapes, do the following:

    1. Annotate your dataset.

      Example of annotated dataset with different shapes

    2. Set up filters.

      Example of a filter for shapes

    3. From the burger menu, select Run actions.

    4. Choose the action you need from the Select action drop-down list.

    5. (Optional) In the Starting from frame field, enter the frame number where the action should begin, and in the up to frame field, specify the frame number where the action should end.

    6. (Optional) Select an option from Or choose one of the predefined options to apply the action.

    7. Click Run.
      A progress bar will appear. You may abort the process by clicking Cancel until the process commits modified objects at the end of pipeline.

      Progress bar for shapes converter with defined parameters

    Convert shapes video tutorial

    3 - Contextual images

    Contextual images of the task

    Contextual images (or related images) are additional images that provide context or additional information related to the primary image.

    Use them to add extra contextual about the object to improve the accuracy of annotation.

    Contextual images are available for 2D and 3D tasks.

    See:

    Folder structure

    To add contextual images to the task, you need to organize the images folder into one of the supported file layouts. A task with contextual images can be created both from an archive or from raw files.

    Example for 2D tasks:

    1. In the folder with the images for annotation, create a folder: related_images.
    2. Add to the related_images a subfolder with the same name as the primary image to which it should be linked.
    3. Place the contextual image(s) within the subfolder created in step 2.
    4. Add folder to the archive.
    5. Create task.

    Supported file layouts for 2D and 3D tasks:

    root_directory/
      image_1_to_be_annotated.jpg
      image_2_to_be_annotated.jpg
      related_images/
        image_1_to_be_annotated_jpg/
          context_image_for_image_1.jpg
        image_2_to_be_annotated_jpg/
          context_image_for_image_2.jpg
        subdirectory_example/
          image_3_to_be_annotated.jpg
            related_images/
            image_3_to_be_annotated_jpg/
                context_image_for_image_3.jpg
    

    Point clouds and related images are put into the same directory. Related files must have the same names as the corresponding point clouds. This format is limited by only 1 related image per point cloud.

    root_directory/
      pointcloud1.pcd
      pointcloud1.jpg
      pointcloud2.pcd
      pointcloud2.png
      ...
    

    Each point cloud is put into a separate directory with matching file name. Related images are put next to the corresponding point cloud, the file names and extensions can be arbitrary.

    root_directory/
      pointcloud1/
        pointcloud1.pcd
        pointcloud1_ri1.png
        pointcloud1_ri2.jpg
        ...
      pointcloud2/
        pointcloud2.pcd
        pointcloud2_ri1.bmp
    

    Context images are placed in the image_00/, image_01/, image_N/ (N is any number) directories. Their file names must correspond to the point cloud files in the data/ directory.

    image_00/
      data/
        0000000000.png
        0000000001.png
        0000000002.png
        0000000003.png
    image_01/
      data/
        0000000000.png
        0000000001.png
        0000000002.png
        0000000003.png
    image_N/
      data/
        0000000000.png
        0000000001.png
        0000000002.png
        0000000003.png
    velodyne_points/
      data/
        0000000000.bin
        0000000001.bin
        0000000002.bin
        0000000003.bin
    
    root_directory/
      pointcloud/
        pointcloud1.pcd
        pointcloud2.pcd
      related_images/
        pointcloud1_pcd/
          context_image_for_pointclud1.jpg
        pointcloud2_pcd/
          context_image_for_pointcloud2.jpg
    

    For more general information about 3D data formats, see 3D data formats.

    Contextual images

    The maximum amount of contextual images is twelve.

    By default they will be positioned on the right side of the main image.

    context_images_1

    When you add contextual images to the set, small toolbar will appear on the top of the screen, with the following elements:

    Element Description
    context_images_4 Fit views. Click to restore the layout to its original appearance.

    If you’ve expanded any images in the layout, they will returned to their original size.

    This won’t affect the number of context images on the screen.

    context_images_5 Add new image. Click to add context image to the layout.
    context_images_6 Reload layout. Click to reload layout to the default view.

    Note, that this action can change the number of context images resetting them back to three.

    Each context image has the following elements:

    context_images_2

    Element Description
    1 Full screen. Click to expand the contextual image in to the full screen mode.

    Click again to revert contextual image to windowed mode.

    2 Move contextual image. Hold and move contextual image to the other place on the screen.

    context_images_3

    3 Name. Unique contextual image name
    4 Select contextual image. Click to open a horizontal listview of all available contextual images.

    Click on one to select.

    5 Close. Click to remove image from contextual images menu.
    6 Extend Hold and pull to extend the image.

    4 - Filter

    Guide to using the Filter feature in CVAT.

    There are some reasons to use the feature:

    1. When you use a filter, objects that don’t match the filter will be hidden.
    2. The fast navigation between frames which have an object of interest. Use the Left Arrow / Right Arrow keys for this purpose or customize the UI buttons by right-clicking and select switching by filter. If there are no objects which correspond to the filter, you will go to the previous / next frame which contains any annotated objects.

    To apply filters you need to click on the button on the top panel.

    Filter button in user interface

    Create a filter

    It will open a window for filter input. Here you will find two buttons: Add rule and Add group.

    Filter window with highlighted “Add rule” and “Add group” buttons

    Rules

    The Add rule button adds a rule for objects display. A rule may use the following properties:

    Available objects, operators, and values for filter rules

    Supported properties for annotation

    Properties Supported values Description
    Label all the label names that are in the task label name
    Type shape, track or tag type of object
    Shape all shape types type of shape
    Occluded true or false occluded (read more)
    Width number of px or field shape width
    Height number of px or field shape height
    ServerID number or field ID of the object on the server
    (You can find out by forming a link to the object through the Action menu)
    ObjectID number or field ID of the object in your client
    (indicated on the objects sidebar)
    Attributes some other fields including attributes with a
    similar type or a specific attribute value
    any fields specified by a label

    Supported operators for properties

    == - Equally; != - Not equal; > - More; >= - More or equal; < - Less; <= - Less or equal;

    Any in; Not in - these operators allow you to set multiple values in one rule;

    Example of &ldquo;any in&rdquo; filter

    Is empty; is not empty – these operators don’t require to input a value.

    Between; Not between – these operators allow you to choose a range between two values.

    Like - this operator indicate that the property must contain a value.

    Starts with; Ends with - filter by beginning or end.

    Some properties support two types of values that you can choose:

    Choosing value type in a filter property

    You can add multiple rules, to do so click the add rule button and set another rule. Once you’ve set a new rule, you’ll be able to choose which operator they will be connected by: And or Or.

    Filter window with highlighted operators

    All subsequent rules will be joined by the chosen operator. Click Submit to apply the filter or if you want multiple rules to be connected by different operators, use groups.

    Groups

    To add a group, click the Add group button. Inside the group you can create rules or groups.

    Filter window with highlighted group and &ldquo;Add group&rdquo; button

    If there is more than one rule in the group, they can be connected by And or Or operators. The rule group will work as well as a separate rule outside the group and will be joined by an operator outside the group. You can create groups within other groups, to do so you need to click the add group button within the group.

    You can move rules and groups. To move the rule or group, drag it by the button. To remove the rule or group, click on the Delete button.

    Part of the filter window with highlighted buttons for moving and deleting groups and rules

    If you activate the Not button, objects that don’t match the group will be filtered out. Click Submit to apply the filter. The Cancel button undoes the filter. The Clear filter button removes the filter.

    Once applied filter automatically appears in Recent used list. Maximum length of the list is 10.


    Sort and filter lists

    On the projects, task list on the project page, tasks, jobs, and cloud storage pages, you can use sorting and filters.

    Sort by

    You can sort by the following parameters:

    • Jobs list: ID, assignee, updated date, stage, state, task ID, project ID, task name, project name.
    • Tasks list or tasks list on project page: ID, owner, status, assignee, updated date, subset, mode, dimension, project ID, name, project name.
    • Projects list: ID, assignee, owner, status, name, updated date.
    • Cloud storages list: ID, provider type, updated date, display name, resource, credentials, owner, description.

    To apply sorting, drag the parameter to the top area above the horizontal bar. The parameters below the horizontal line will not be applied. By moving the parameters you can change the priority, first of all sorting will occur according to the parameters that are above.

    Pressing the Sort button switches Ascending sort/Descending sort.

    Quick filters

    Quick Filters contain several frequently used filters:

    • Assigned to me - show only those projects, tasks or jobs that are assigned to you.
    • Owned by me - show only those projects or tasks that are owned by you.
    • Not completed - show only those projects, tasks or jobs that have a status other than completed.
    • AWS storages - show only AWS cloud storages
    • Azure storages - show only Azure cloud storages
    • Google cloud storages - show only Google cloud storages

    Date and time selection

    When creating a Last updated rule, you can select the date and time by using the selection window.

    Filter window with opened date and time filter and marked elements

    You can select the year and month using the arrows or by clicking on the year and month. To select a day, click on it in the calendar, To select the time, you can select the hours and minutes using the scrolling list. Or you can select the current date and time by clicking the Now button. To apply, click Ok.