IntellEventProcedure#
- class pyCGM2.Events.procedures.intellEventProcedures.IntellEventProcedure(progressionAxis, forwardProgression, min_peak_threshold=0.3, distance=25)#
Gait event detection procedure based on Intellevent
- __init__(progressionAxis, forwardProgression, min_peak_threshold=0.3, distance=25)#
Initializes the IntellEventProcedure class.
Methods
__init__(progressionAxis, forwardProgression)Initializes the IntellEventProcedure class.
detect(acq)Detect events using the intellevent.
setModels(trainedModelInitialContactFile, ...)Set the trained models used for the event detection.
- detect(acq: btkAcquisition) Tuple[int, int, int, int] | int#
Detect events using the intellevent.
- Parameters:
acq (btk.btkAcquisition) – A BTK acquisition instance containing motion capture data.
- Returns:
Union[Tuple[int, int, int, int], int] – Frames indicating the left foot strike, left foot off, right foot strike, and right foot off respectively. Returns 0 if detection fails.
- setModels(trainedModelInitialContactFile, trainedModelFootOffFile)#
Set the trained models used for the event detection.
- Parameters:
trainedModelInitialContactFile (str) – Path of the trained model detecting initial contacts.
trainedModelFootOffFile (str) – Path of the trained model detecting foot offs.
- Raises:
FileNotFoundError – If one of the model files does not exist.