RandomSplitsTable
Last updated
Last updated
RandomSplitsTable
widget in Supervisely allows users to create random splits of their data for training, validation, and testing purposes. The widget enables users to define the percentage of data they want to allocate to each split, and then randomly assigns images or annotations to each split. This widget is particularly useful for machine learning projects, as it allows users to easily manage their training, validation, and testing data without having to manually split the data themselves. RandomSplitsTable
widget provides a flexible and convenient way for users to organize their data splits, and can be customized to match the requirements of their project. RandomSplitsTable
widget is a valuable tool for improving the accuracy and efficiency of machine learning projects that require data splits.
items_count
int
Number of items to split
start_train_percent
int
Start %
to split items
disabled
bool
Disable widget
widget_id
str
ID of the widget
Determine number of items to split.
type: int
Determine start %
to split items. If start_train_percent
not in range [1; 99] raise ValueError
.
type: int
default value: 80
Disable widget.
type: bool
default value: False
ID of the widget.
type: str
default value: None
get_splits_counts()
Returns the result of separating items { "total": <int>, "train": <int>, "val": <int>}
.
You can find this example in our Github repository:
ui-widgets-demos/tables/005_random_splits_table/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
RandomSplitsTable
widgetButton
and Text
widgetsPrepare 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.