Very low model accuracy

I am working on a project that involves identifying the number of push-ups using a signal that has corresponding number of peaks. For example, during a round of 3 push-ups the change in pressure applied to a pressure sensor will show three peaks. I collected data for one to ten push ups and labeled them one to ten accordingly. However, the accuracy of my model is very low(19%). Please How can I solve this?

Hi @usmansalehtoro,

How many minutes of data have you captured and what is your window size?
Though it’s probably possible to identify the number of push-ups in a given window, it would probably work better to train the model on detecting one push-up, and then count them by adding some simple logic in the embedded firmware.
Feel free also to share your project ID.


Thanks for the response. The details you requested are as follows
Project ID- 95031
Window size-322 ms
Minutes of data- 3m 51s
Please have a look at the project first then you can probably advise me further on the detection on one push-up and making the logic for detecting the rest

Hi @usmansalehtoro,

Within a 322ms window, the number of push-ups will be zero or 1 so there is a mismatch with the labels. You could increase the window to a larger value if we imagine the window can contain from 1 to 10 push-ups but it’s not the best way.
Actually a simple peak detection algorithm (without ML) could solve this problem if you don’t need to detect other type of movements.

Using ML with your existing dataset, you’d need to crop each sample in smaller window, ie:

and relabel as “pushup” for instance.

You should also capture additional “static” data.

From there you should be able to get a fair accuracy to detect between push-ups and static movements. Once you have a good accuracy, you just need to add logic in your embedded code to count the detected “push-ups” in a given time.


Thanks for your suggestions. However, I wish to use ML for peak detection (and hence counting of pushups) because the peak detection algorithm (without ML) I tried using earlier produced errors in the counting process due to threshold values set. Therefore, I have opened a new project with the ID-119861 and made the following changes:

  1. I collected ten set of data containing one pushup each and labeled each as “1”

  2. I also collected ten set of data containing static data and labeled each as "0’

After splitting the data and training the model, I got an accuracy of 100%.

The Question is, Can I deploy the model on arduino uno and test for the peak detection? Also, can you suggest a reference where i can learn more on the logic I can adopt for counting?

Hello @usmansalehtoro,

No, you won’t be able to run your impulse on an Arduino Uno as the ATmega328P will be too constraint.
To count the number of pushups, there are several techniques that you can use, I would use a simple filter to check if the previous inference value is different from your current one, if so, I would increase your count buffer.
Not sure it matches your use case, you can also add a time variable to fine-tune your filter.