You are reading a single comment by @HughB and its replies. Click here to read the full conversation.
  • The last version of the Oxford step counter in C was optimised for Bangle

    Yes - I looked at this code. I took the filter taps from its and scaled them down to work with the Bangle. A lot of the code is around the pipeline and buffers. It would be interesting to see what it looked like without the buffering and pipeline and was just sequential.

    The approach the Bangle currently takes is very similar

    1) The magnitude value is taken. 2) There is a small threshold that must be crossed for 3 samples before we pass the output to the low pass filter - otherwise we dont pass to the next stages. 3) The filtered output is passed through a simple peak detection 4) the peak event is passed through a state machine that checks that the current peak event is within the expected step time 0.3-1 second from the previous peak event. I think this is the same as your sliding window, though I dont understand the terminology - could do with a diagram 5) The state machine also counts up to 6 steps before starting to return step events to the clients in the Bangle. The first event once 6 steps are reached returns 6 steps. The state machine screens out a lot of non stepping activity.

    We have some good accelerometer data at:
    https://github.com/gfwilliams/step-count­/tree/master/data

    I would be really interested to see how the oxford step counter performs using the logs below:

    HughB-drive-a3-b136.csv
    HughB-general-a260-b573.csv
    HughB-housework-a958-b2658.csv

    HughB-walk-a10021-b10248.csv - is a 10K step log which can be used to test walking

    The a value is the steps recorded by the AmizFit Bip.
    The b value is the steps recorded by the 2.10.27 step counter.

    These 4 test cases are enough to assess the accuracy when walking and not walking.

    not optimised to distinguish between genuine walk and other activities.

    This where all the difficulty lies. I am pretty certain any student can make a step counter that is reasonably accurate when walking. I have seen all sorts of code / papers that claim good accuracy but they never discuss a real world test methodology around not counting steps for non step activities. This is the bit that no one seems to do. As you say some of the other parts of the algorithm are not really contributing much when the problem is just counting steps. It is the screening out of the non step activities that is the important thing otherwise you count 2000+ steps just typing at a computer sitting at a desk for 4 hours.

    As for the competition,...prepare the testing dataset and add some wrapping code that runs >the algorithm and compares it with the reference.

    If you could build a framework around those test cases above then I think we would have what we need. I'd really like to see what the oxford results are for the 3 non stepping cases, if it does this well then we might not need a competition.

About

Avatar for HughB @HughB started