Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 2.24 KB

algorithms.rst

File metadata and controls

49 lines (36 loc) · 2.24 KB

Algorithms

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.

Boundary Algorithms

msaf.algorithms.foote

msaf.algorithms.cnmf

msaf.algorithms.olda

msaf.algorithms.scluster

msaf.algorithms.sf

msaf.algorithms.vmo

Label Algorithms

msaf.algorithms.fmc2d

msaf.algorithms.cnmf

msaf.algorithms.scluster

msaf.algorithms.vmo

Adding A New Algorithm to MSAF

To include a new algorithm in MSAF, the following steps should be performed:

  1. Create new directory in the algorithms directory with the desired algorithm name.
  2. Create 3 new files in this new directory: __init__.py, config.py, and segmenter.py.
  3. The __init__.py file should import everything from the new config.py and segmenter.py files.
  4. 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.
  5. The segmenter.py should contain a class Segmenter that inherits from SegmenterInterface and implements the method processFlat. 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.