jranaraki / steps

This application counts your steps based on accelerometer data and calculates travelled distance based on computed stride length using the user's demographic information
https://open-store.io/app/steps.jranaraki
Other
1 stars 4 forks source link

discussion: calibration and sensitivity #23

Closed Danfro closed 2 years ago

Danfro commented 3 years ago

Today I did some tests regarding sensitivity and stride length.

  1. the result depends on the kind of walk you are doing: slow/normal walking/strolling, walking quickly.
  2. sensitivity and stride length need to be adjusted depending of the type of walk to provide good results

I was using two Xperia X devices and a normal step counter, all kept in the same pocket. Because I was walking on my own, the walk type was mainly walking quickly. I take the step counter as reference.

Here my results for walking quickly: sensitivity 7.0 steps counted: 50 % less sensitivity 7.3 steps counted: almost equal sensitivity 7.5 steps counted: 25 % more sensitivity 8.0 steps counted: 25 % more stride length: short by 50%

Walking slowly/strolling: sensitivity 7.3 steps counted: 65 % less sensitivity 7.5 steps counted: 50 % less sensitivity 8.0 steps counted: 30 % less sensitivity 8.5 steps counted: 15 % less stride length: good match

Shopping: sensitivity 8.5 steps counted: 40 % less sensitivity 9.0 steps counted: 20 % less

So I think for accurate results we almost need two profiles: slow walking - quick walking. Normal walking Your stride calculation is fine. The default value for sensitivity should not be below 8.5, better higher (?). Quick walking Stride length needs to be increased. Sensitivity should be about 7.3.

Note: all numbers may depend on where exactly the device is carried. They may also vary depending on the device.

gbdomubpkm commented 3 years ago

I raised some questions here when testing with my Volla.

But I think that the default minimum sensitivity could be increased (the current one is probably a nonsense) and for example brought to what corresponds to index 5 of the current sensitivity setting bar. This setting bar could be further refined in presentation and the current maximum sensitivity of 10 increased a little.

Location but also position (standing, flat..) of the smartphone is important (I got more accuracy by holding the smartphone in my hand without shaking it too much rather than in the front pocket of a trouser with the device standing). But the right place and the best position remain hard to define. The inside pocket of a waistcoat or equivalent seemed to me to be a good place (smartphone little shaken).

Danfro commented 3 years ago

@gbdomubpkm thanks for the pointer to issue 1. I had missed that.

I agree, that the values below 7 are not needed at all. For quick walks although around 7 can be useful as explained above.

I already have been playing around with a ComboButton for sensitivity. This would only use values between 7 and 10. And it would also solve the issue, that currently we can not see the set sensitivity value, only when sliding.

What do you think of this? Needs some more work to it though...

Btw. it looks like a non integer value is currently used? :thinking:

Draft status screenshot below: screenshot20211102_070035835

gbdomubpkm commented 3 years ago

Personally, only my opinion, I like the current principle of a bar with an adjustable slider but as detailed as your model.

the old 7 would correspond to 1

7.25......................... 1.25 10 .........4 11 or 12..........6 or 7 (the max a little high than you if possible)

Danfro commented 3 years ago

Yeah, I agree, the ComboBox might not be perfect. What I don't like about the slider, our UbuntuComponent does not allow to snap to a certain value. That - in my opinion - makes it a bit uncomfortable to use.

:thinking: The Qt version has got a snap property. Our component might need updating? Or we should/can use the Qt component instead?

Danfro commented 3 years ago

Just for the record, I opened #24 to use Qt version of the slider. That does allow snapping to values. Better than the ComboBox approach I think.

jranaraki commented 3 years ago

Yeah, I agree, the ComboBox might not be perfect. What I don't like about the slider, our UbuntuComponent does not allow to snap to a certain value. That - in my opinion - makes it a bit uncomfortable to use.

thinking The Qt version has got a snap property. Our component might need updating? Or we should/can use the Qt component instead?

I have tried to implement some code to mimic snap property but no success :( Can we use the Qt version here?

jranaraki commented 3 years ago

Just for the record, I opened #24 to use Qt version of the slider. That does allow snapping to values. Better than the ComboBox approach I think.

Agreed!

jranaraki commented 3 years ago

What I am thinking is that since different devices and different types of walking would affect the number of steps counted by the app, what do you guys think if I provide an option in the setting page to switch to a machine-learning (ML) version where the steps are detected by feeding the accelerometer data into an ML model? In this way, any movement that is an actual step is counted as steps and the rest are discarded.

gbdomubpkm commented 3 years ago

In this way, any movement that is an actual step is counted as steps and the rest are discarded.

This is interesting. Nothing to lose by putting this mechanism as an option. It will, if enabled, probably require an even more precise sensitivity setting so as not to underestimate the number of steps recorded I think. Wouldn't it?

Danfro commented 3 years ago

Would that AI method be an offline method? If yes, then why not, worth a try. But if that is online, I guess many (including me) would be cautious if personal usage data is gathered by someone.

Danfro commented 3 years ago

Another thing (new issue?), the step counter counts every single movement. When I turned it on, by the time I had left my car (put phone in pocket, grab bag, get up, close door, get out mobile again) I had already 10 steps counted - without having done any steps.

The commercial step counters I know, do only start counting if there are more than 7 steps in a row registered. If there are up to 7 steps, they are not counted. If there are more than 7 steps, the 7 steps + all others are counted.

gbdomubpkm commented 3 years ago

Personally, when I take my car, I close the app so as not to risk incrementing the step counter falsely.

Another observation: the step counter doesn't seem to increment when I climb stairs

jranaraki commented 3 years ago

Would that AI method be an offline method? If yes, then why not, worth a try. But if that is online, I guess many (including me) would be cautious if personal usage data is gathered by someone.

It is completely offline, with a zero data collection policy.

jranaraki commented 3 years ago

Another thing (new issue?), the step counter counts every single movement. When I turned it on, by the time I had left my car (put phone in pocket, grab bag, get up, close door, get out mobile again) I had already 10 steps counted - without having done any steps.

The commercial step counters I know, do only start counting if there are more than 7 steps in a row registered. If there are up to 7 steps, they are not counted. If there are more than 7 steps, the 7 steps + all others are counted.

Probably, the ML model can handle these situations.

jranaraki commented 3 years ago

Personally, when I take my car, I close the app so as not to risk incrementing the step counter falsely.

Another observation: the step counter doesn't seem to increment when I climb stairs

Climbing stairs is a completely different story regarding accelerometer data patterns. Again, potentially, ML models can deal with different behaviours and make more informed decisions regarding the number of steps in each scenario.

gbdomubpkm commented 3 years ago

Thanks @jranaraki for the 1.0.8 update. Thanks @Danfro for your work for this. Observation :

In fact, with version 1.0.7, the sensitivity refinement was approximately 0.1, and goes to 0.25 with version 1.0.8 which seems to be less refined?

Danfro commented 3 years ago

Yes, I did set the stepsize to 0.25. I believe a finer setting is of not much use. No one is playing around with that in that much detail. And from my experience, to match sensitivity to the type of walking it does need more than an 0.01 sensitivity stepsize.

Of course it could be set to 0.1, but is that really needed? I may be wrong and a smaller stepsize WOULD help.

--

gbdomubpkm commented 3 years ago

It's hard to say whether a very fine tuning is more or less useful, so many parameters make the step count more or less accurate. It all depends on how much work it would take for you to get the accuracy down to 0.1. Personally, with your nice sensitivity bar I would be for this. I had found a balance (I think, is it really) at 9.6.