MSAF comes with two types of algorithms: boundary detection and label clustering algorithms. Below, the included algorithms are discussed and classified based on these two categories. Note that some algorithms can actually approach both subproblems.
Additionally, two other algorithms published under a GPL license can be obtained from the msaf-gpl repo.
msaf.algorithms.foote
msaf.algorithms.cnmf
msaf.algorithms.olda
msaf.algorithms.scluster
msaf.algorithms.sf
msaf.algorithms.vmo
msaf.algorithms.fmc2d
msaf.algorithms.cnmf
msaf.algorithms.scluster
msaf.algorithms.vmo
To include a new algorithm in MSAF, the following steps should be performed:
- Create new directory in the algorithms directory with the desired algorithm name.
- Create 3 new files in this new directory:
__init__.py
,config.py
, andsegmenter.py
.- The
__init__.py
file should import everything from the newconfig.py
andsegmenter.py
files.The
config.py
should contain the following variables:
config
: variable with the parameters of the algorithm.algo_id
: string with the algorithm identifier.is_boundary_type
: boolean that determines whether the algorithm allows boundary detection.is_label_type
: boolean that determines whether the algorithm allows labeling.- The
segmenter.py
should contain a classSegmenter
that inherits fromSegmenterInterface
and implements the methodprocessFlat
. This is where the main algorithm is implemented.
In the folder algorithms/example an example of a new algorithm is included. The easiest way to add a new algorithm to MSAF is to copy and paste the example directory to use it as the base code of the new algorithm.