LabeledImage
Last updated
Last updated
LabeledImage
widget in Supervisely is designed to display an image with annotations and provides additional features such as the ability to toggle the visibility of individual class annotations, change fill opacity, and includes a zoom function.
annotations_opacity
float
Figures opacity
show_opacity_slider
bool
Determines the presence of opacity slider on LabeledImage
enable_zoom
bool
Enable zoom on LabeledImage
resize_on_zoom
bool
Resize card to fit figure
fill_rectangle
bool
Fill rectange
border_width
int
Border width (thickness)
empty_message
str
If no images are given, this message will be displayed.
widget_id
str
ID of the widget
Figures opacity.
type: float
default value: 0.5
Determines the presence of opacity slider on LabeledImage
.
type: bool
default value: true
Enable zoom on LabeledImage
.
type: bool
default value: false
Resize card to fit figure.
type: bool
default value: false
Resize card to fit figure.
type: bool
default value: true
Resize card to fit figure.
type: int
default value: 3
If no images are given, this message will be displayed.
type: str
default value: No image was provided
ID of the widget.
type: str
default value: None
id
Get image id property.
loading
Get or set loading
property.
set(title: str, image_url: str, ann: Annotation, image_id: int, zoom_to: int, zoom_factor: float, title_url: str)
Set item in LabeledImage
.
clean_up()
Clean LabeledImage
from item.
is_empty()
Check LabeledImage
is empty.
You can find this example in our Github repository:
ui-widgets-demos/media/002_labeled_image/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
LabeledImage
widget and fill it with image dataPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.