mobilise-d / mobgap

The Mobilise-D algorithm toolbox - Implemented in Python
https://mobgap.readthedocs.io
Apache License 2.0
24 stars 2 forks source link

[META] Algorithms to implement #8

Open AKuederle opened 10 months ago

AKuederle commented 10 months ago

Image

The Picture above shows the full pipeline we need to implement. For most algorithmic steps this means one algorithm. Only for GSD and CAD there are two.

In addition to the blocks shown above, there is a Reorientation Block that should catch instances where the signal is wrongly oriented.

Overview

How to implement new algorithms

When implementing a new algorithm, create a new issue with the template and update this issue with a link to all relevant issues and PRs.

  1. Find the old implementation and try to understand it. What is the actual core algorithm? What is just pre-processing? What are the relevant parameters of the algorithm? What is the output type (per-second, per-step)? What inputs are required (raw data, sensor height, detected steps, ...)?
  2. Get the old version to run offline on the example data. "Mock" previous outputs using the ground truth. Store the results somewhere
  3. Discuss in the group, before starting any implementation. Are the outputs as expected? Do we understand how the algorithm is supposed to work?
  4. Start building an Example (i.e. a notebook or Python file to prototype). Have your raw inputs and your example output from before there to play around.
  5. Create a first implementation of the core functionality. Just build a simple Python function. Ignore class interface for now (I would suggest to try AI-tools to make the initial conversion from matlab to Python). Check if your implementation gets the same output as before. If there are deviations, that can not/should not be "fixed" document them
  6. Build the class interface + tests + docu + example. Example should cover basic usage of algorithm + comparison to old matlab output. Write down anything that could interesting for someone in the future.
AKuederle commented 10 months ago

Most algorithm implementation can be found here: https://github.com/mobilise-d/Mobilise-D-TVS-Recommended-Algorithms/tree/master

However, we should double-check if the implementations match watch we use in the pipeline

AKuederle commented 10 months ago

Instructions to run many algorithms "offline" can be found here: https://gitlab.insight-centre.org/mobilise-d/mobilised-pipeline