MatchDatasets
Introduction
MatchDatasets widget in Supervisely allows users to compare datasets by matching objects and displaying the results in a table. It also provides the comparison results in the form of a dictionary grouped into matched, unique_left, and unique_right categories. This widget helps users identify differences and similarities between datasets quickly and efficiently.
Function signature
MatchDatasets(
left_datasets=None,
right_datasets=None,
left_name=None,
right_name=None,
widget_id=None,
)
Parameters
left_datasets
List[DatasetInfo]
List of NamedTuple, containing information about left datasets
right_datasets
List[DatasetInfo]
List of NamedTuple, containing information about right datasets
left_name
str
Left part datasets name
right_name
str
Right part datasets name
widget_id
str
ID of the widget
left_datasets
Determine information about left datasets.
type: List[DatasetInfo]
default value: None
right_datasets
Determine information about right datasets.
type: List[DatasetInfo]
default value: None

left_name
Determine left part datasets name.
type: str
default value: None
right_name
Determine right part datasets name.
type: str
default value: None

widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
set(left_datasets: List[DatasetInfo] = None, right_datasets: List[DatasetInfo] = None, left_name=None, right_name=None)
Set DatasetInfo data in left and right part of widget.
get_stat()
Return datasets match statistics.
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/compare data/001_match_datasets/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare datasets we will matched
Initialize MatchDatasets widget
MatchDatasets widgetCreate app layout
Prepare a layout for app using Card widget with the content parameter and place widget that we've just created in the Container widget.
Create app using layout
Create an app object with layout parameter.

Last updated
Was this helpful?