Marsyas  0.5.0-beta1
Public Member Functions
TimelineLabeler Class Reference

A MarSystem that loads a TimeLine object with label info corresponding to an audio file, where at each timeline region a class or label is assigned. Can be used for training a classifier, using the different labeled regions of the signal as ground truth. More...

#include <TimelineLabeler.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () const
void myProcess (realvec &in, realvec &out)
 Processes data.
 TimelineLabeler (std::string name)
 TimelineLabeler (const TimelineLabeler &a)
 ~TimelineLabeler ()

Detailed Description

A MarSystem that loads a TimeLine object with label info corresponding to an audio file, where at each timeline region a class or label is assigned. Can be used for training a classifier, using the different labeled regions of the signal as ground truth.

This MarSystem is intended to be used in series right after a SoundFileSource (or other sound source MarSystem - e.g. a CollectionFileSource), linking its labelFiles and currentLabelFile controls to the SoundFileSource labelNames and currentLabel controls, respectively. It then exposes the same controls that SoundFileSource would expose if not using timelines at all, so that the label, labelNames and nLabels controls of an Annotator or an WekaSink MarSystem can be linked to this MarSystem similarly to the way they are connected to a SoundFileSource MarSystem. TimelineLabaler assumes that the regions in the timeline are non-overlapping and ordered by their start sample.

There is an implicit assumptions that each time-line file contains examples from all the desired classes. This can easily be added by adding a few regions with short duration and the "missing" labels if a particular timeline does not have regions for all the labels. Alternatively it is possible to use an externally provided lexicon with the desired labelNames and nLabels.

Controls:

Definition at line 90 of file TimelineLabeler.h.


Constructor & Destructor Documentation

TimelineLabeler ( std::string  name)

Definition at line 27 of file TimelineLabeler.cpp.

Definition at line 39 of file TimelineLabeler.cpp.

Definition at line 67 of file TimelineLabeler.cpp.


Member Function Documentation

MarSystem * clone ( ) const [virtual]

Implements MarSystem.

Definition at line 72 of file TimelineLabeler.cpp.

void myProcess ( realvec in,
realvec out 
) [virtual]

Processes data.

Parameters:
inInput data to read.
outOutput data to write.

Implement this method in subclass to define specific data processing.

Implements MarSystem.

Definition at line 254 of file TimelineLabeler.cpp.


The documentation for this class was generated from the following files: