Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML4F Model seems to perform worse when the using the correct number of samples #5

Open
microbit-carlos opened this issue Jun 3, 2024 · 0 comments

Comments

@microbit-carlos
Copy link
Collaborator

microbit-carlos commented Jun 3, 2024

Before commit cbddbc2 the "Data Processor" was only collecting 8 samples with the built-in model (model input length of 24 divided by 3):
https://github.com/microbit-foundation/pxt-ml-runner-poc/blob/e0e8e5e1494efe58b0c783a1297c6a1b7d6291aa/pxtextension.cpp#L109

Up to this point the model seemed to perform okay, although the "circle" gesture was a bit tricky to trigger.

After commit cbddbc2 the "Data Processor" samples 80 accelerometer data points, as done in the ML Trainer. And from that point when the micro:bit is not moving in the "face up" position, the "circle" ML gesture is constantly triggered.
Changing the orientation of the micro:bit does seem to correctly trigger the "still" gesture when not moving, and shaking does works well.
Taking the parent commit e0e8e5e, and changing the mlDataProcessor.init(inputLen / 3) call to mlDataProcessor.init(80), produces the same result, so that would discard a different issue or bug introduced by cbddbc2.

We'll need to check if this is an issue converting the model with ML4F, or if there is a bug in the implementation of the data processing before feeding it into the model.

Things we need to double check:

  • The ML trainner sampling period is 25ms
  • The ML trainer processes 80 samples for each model inferance
  • Does the changing the Data processor filter
@microbit-carlos microbit-carlos changed the title ML4F Model seems to perform worse when the right number of samples were implemented ML4F Model seems to perform worse when the using the correct number of samples Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant