There is probably something like this already, but probably not free and open source, as quick search through F-Droid did not show it.
A fitness app where you place your phone under your face and it counts how many push ups you did.
What would be the best way to detect a push-up?
My idea is to have user touch the touchscreen with their nose. That would initiate the first part.
Second part would be more complex: use the front-facing camera to figure out if user’s face is far enough to be considered a completed push-up. User would have to calibrate the app at the start, or maybe even at the start of each session, indicating how far away is the max height that they achieve. Probably no need for full facial recognition for this, some colour-matching algorithm should be enough.
And use phone’s gyro to check whether phone is actually in a horisontal position.
Maybe this idea has enough potential to actually get a project going.
Did you check some articles on that? https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=push+up+smartphone+detection