toloka.client.project.template_builder.fields.ImageAnnotationFieldV1 | Source code

data: Optional[BaseComponent] = None,
image: Optional[Union[BaseComponent, str]] = None,
disabled: Optional[Union[BaseComponent, bool]] = None,
full_height: Optional[Union[BaseComponent, bool]] = None,
labels: Optional[Union[BaseComponent, List[Union[BaseComponent, Label]]]] = None,
min_width: Optional[Union[BaseComponent, float]] = None,
ratio: Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] = None,
shapes: Optional[Union[BaseComponent, Dict[Union[BaseComponent, Shape], Union[BaseComponent, bool]]]] = None,
hint: Optional[Any] = None,
label: Optional[Any] = None,
validation: Optional[BaseComponent] = None,
version: Optional[str] = '1.0.0'

Adds an interface for selecting areas in images.

If you need to select different types of objects, classify the areas using the labels property.

You can select areas using points, polygons, and rectangles. In the shapes property, you can keep some of the selection modes and hide the rest.

Parameters Description


Data with values that will be processed or changed.

imageOptional[Union[BaseComponent, str]]

The image you want to select areas in.

disabledOptional[Union[BaseComponent, bool]]

Determines whether adding and deleting areas is allowed:

  • False (default) — Allowed.
  • True — Not allowed. You can use this feature when creating an interface to check whether the selection is correct, or if you need to allow selection only when a certain condition is met.
full_heightOptional[Union[BaseComponent, bool]]

If True, the element takes up all the vertical free space. The element is set to a minimum height of 400 pixels.

labelsOptional[Union[BaseComponent, List[Union[BaseComponent, Label]]]]

Used to classify areas. You can add several area types. When adding an area type, a button to select it appears in the interface, and when setting a new value, a new area selection color is added. This feature is instrumental if you need to select different types of objects: you can use one color to select cars and a different one for pedestrians.

min_widthOptional[Union[BaseComponent, float]]

Minimum width of the element in pixels. Takes priority over max_width.

ratioOptional[Union[BaseComponent, List[Union[BaseComponent, float]]]]

An array of two numbers that sets the relative dimensions of the sides: width (first number) to height (second number). Not valid if full_height=True.

shapesOptional[Union[BaseComponent, Dict[Union[BaseComponent, Shape], Union[BaseComponent, bool]]]]

Used to add and hide selection modes: points, polygons, and rectangles. All three modes are available by default. Use this property if you only need to keep certain modes. Modes with the True value are available.


Hint text.


Label above the component.


Validation based on condition.

OverviewGetting OAuth tokenQuick start
toloka.autoquality [autoquality]