Prediction of gait events in walking activities with a Bayesian perception system