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
Copy MatchDatasets (
left_datasets = None ,
right_datasets = None ,
left_name = None ,
right_name = None ,
widget_id = None ,
) Parameters
Type
Description
List of NamedTuple, containing information about left datasets
List of NamedTuple, containing information about right datasets
Determine information about left datasets.
type: List[DatasetInfo]
default value: None
Determine information about right datasets.
type: List[DatasetInfo]
default value: None
Determine left part datasets name.
type: str
default value: None
Determine right part datasets name.
type: str
default value: None
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods
Description
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.
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.pyarrow-up-right
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
Create 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.