Dialogs for running training and/or inference in GUI.
LearningDialog(mode: str, labels_filename: str, labels: Optional[sleap.io.dataset.Labels] = None, skeleton: Optional[Skeleton] = None, *args, **kwargs)¶
Dialog for running training and/or inference.
In training mode, the model hyperpameters are editable unless you’re using a trained model; they are read-only in inference mode.
mode – either “training” or “inference”.
labels_filename – path to labels file, used for default location to save models.
labels – the Labels object (can also be loaded from given filename)
skeleton – the Skeleton object (can also be taken from Labels), used for list of nodes for (e.g.) selecting anchor node
Returns dictionary with frames that user has selected for learning.
Run with current dialog settings.
TrainingEditorWidget(video: Optional[sleap.io.video.Video] = None, skeleton: Optional[Skeleton] = None, head: Optional[str] = None, cfg_getter: Optional[TrainingConfigsGetter] = None, require_trained: bool = False, *args, **kwargs)¶
Dialog for viewing and modifying training profiles (model hyperparameters).
video – Video to use for receptive field preview
skeleton – Skeleton to use for node option list
head – If given, then only show configs with specified head name
cfg_getter – Object to use for getting list of config files. If given, then menu of config files will be shown so user can either copy hyperameters from another profile/model, or use a model that was already trained.
require_trained – If True, then only show configs that are trained, and don’t allow user to uncheck “use trained” setting. This is set when
LearningDialogis in “inference” mode.