RandomSplitsTable
Introduction
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.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
| Number of items to split |
|
| Start |
|
| Disable widget |
|
| ID of the widget |
items_count
Determine number of items to split.
type: int
start_train_percent
Determine start %
to split items. If start_train_percent
not in range [1; 99] raise ValueError
.
type: int
default value: 80
disabled
Disable widget.
type: bool
default value: False
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Returns the result of separating items |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/tables/005_random_splits_table/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare items count
Initialize RandomSplitsTable
widget
RandomSplitsTable
widgetCreate Button
and Text
widgets
Button
and Text
widgetsCreate 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.
Add function to control widget from code
Last updated