ImageAnnotationFieldV1

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

ImageAnnotationFieldV1(
self,
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'
)

A component for annotating areas in an image.

For more information, see field.image-annotation.

Parameters description

ParametersTypeDescription
dataOptional[BaseComponent]

A data path.

imageOptional[Union[BaseComponent, str]]

The URL of the image.

disabledOptional[Union[BaseComponent, bool]]

Disabling the component:

  • False — Annotating is allowed.
  • True — Annotating is disabled.

Default value: False.

full_heightOptional[Union[BaseComponent, bool]]

If True, the component takes up all the vertical free space. Note, that the minimum height required by the component is 400 pixels.

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

Labels used to classify image areas.

min_widthOptional[Union[BaseComponent, float]]

The minimum width of the component in pixels.

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

A list with the aspect ratio of the component. Specify the relative width and then the height. This setting is not used if full_height=True.

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

Area selection modes: point, polygon, and rectangle. Use mode names as keys in the shapes dictionary. Modes set to True are available in the component. By default, all modes are available.

hintOptional[Any]

A hint.

labelOptional[Any]

A label above the component.

validationOptional[BaseComponent]

Validation rules.

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming