Models Window
This component takes care of the display of the WhisperSeg models. User can select models to annotate the audio or train new custom models.
Get labels from WhisperSeg API
callWhisperSeg()
makes a request to the WhisperSeg API to generate labels. Before we can make that request we will have to convert our custom label objects into generic objects using filterAndConvertLabelsForWhisper()
. In addition, we will filter out the annotated areas from our labels
array and pass them to the WhisperSeg API separately, in addition to some other properties (see requestParameters
variable).
Once the WhisperSeg API has returned a response we first update speciesArray
with the newly created species, individuals and clusternames. We then convert the generic objects into our custom label objects using assignSpeciesInformationToImportedLabels()
. As a last step remove the annotated areas from the labels
array and combine them with the new whisperLabels
array, which then becomes the new value of labels
.
Train a custom model
handleClickSubmitTrainingRequestBtn()
sends a training request for a custom model to the WhisperSeg API. Before we can make that request we will have to convert our custom label objects into generic objects using filterAndConvertLabelsForWhisper()
. In addition, we will filter out the annotated areas from our labels
array and pass them to the WhisperSeg API separately, in addition to some other properties (see requestParameters
variable).
Two checks will be made before that, the user will have to provide at least one annotated area and one label, as well as a new unique model name that follows a naming scheme.
Last updated