8 ms·
Show HN: Pushup alarm – A React app that uses your webcam to count pushups
- faris-ssj 9y agoI've been working on a web app which counts your pushups via your webcam. You place your laptop/phone on the floor, do pushups whilst looking at the camera, and the app counts how many you do. I integrated this functionality into an alarm clock which you can only turn off by doing a preset number of pushups. I've posted it here for two reasons. First to see if it works. It work well for me. BUT, there must be a data/sample bias based on how I do pushups. Second, to see if people get value from this. Would appreciate feedback around how well it counts pushups (if you can't do pushups, you can try sit-ups, just make sure your head leaves the camera at the top). And let me know if you are interested in future testing.
- ravroid 9y agoVery cool. Going to try this out tomorrow morning.
- sua_3000 9y agoso it works by identifying the location of your face/head?
- supermdguy 9y agoThis is a cool idea! The pushup detection works ok for me. A couple of minor issues I noticed: - In my browser (firefox), the time on the main page overflows the black background - The webcam is still turned on after the pushup detection is done
- aduric 9y agoThis is great! I've been working on something like this as well (an automatic tracker for various body movements). Would love to have a chat about how you've accomplished this.
- eyeino 9y agoRuntastic Push-Ups on iOS counts pushups either with touch input (nose touches screen) or the proximity sensor (you get close enough but your nose doesn’t quite hit the screen).
- throwaway2016a 9y agoI couldn't try it because there is no space near my webcam that I can nock out some pushups but I did set the alarm to see. But it looks like a great idea! It might not work for people in a co-living relationship. My wife would kill me if that alarm sound went off for more than 20 seconds (I get up before her). What about React helps make this project easier than say vanilla Javascript? I would live to see a writeup on how it is made. Also, random idea, think it'd be fun to be able to replace that alarm sound with the whooping sound from Rogue One.
- cholantesh 9y ago>It might not work for people in a co-living relationship. My wife would kill me if that alarm sound went off for more than 20 seconds (I get up before her) Good use case for Bluetooth headphones. >Also, random idea, think it'd be fun to be able to replace that alarm sound with the whooping sound from Rogue One. Or, to prank my pushup loving flatmate, Gene Belcher's fart keyboard sample.
- yoz-y 9y agoHm, are there any wake up alarms that actually go off through connected bt headphones? It seems like a recipe for being late.
- cholantesh 9y agoI don't really use wake up alarms so I'm not sure; I get up pretty regularly at 6AM (even if I went to bed at 1, it's pretty awful.
- ryanbertrand 9y agoMy Bluetooth headphones would die before I wake up. :(
- zodPod 9y agoYeah, until they fall out or die or the connection stops for whatever reason. Plus I can't imagine it's good for your ears to have headphones in for 5-8hrs every night.
- jstanley 9y agoI only took a brief look, but I was pleased to find that this seems to count the pressups client-side and doesn't send off a video feed to the server. Good job.
- jutaz 9y agoA while ago I also made a Slack bot that calculates the amount of pushups based on open Pull Requests on GH on our private repos: https://github.com/robinpowered/swolebot https://github.com/robinpowered/swolebot
- robotmay 9y agoSome of my projects might end up killing me if I enable that.
- salmonfamine 9y agoDoes this use facial recognition? That is, do you have to actually face the camera, or does it simply use some basic object recognition to determine if something is moving up and down?
- faris-ssj 9y agoNo, I did try that but it was too slow. I will write up an article once I have improved it if people are interested in. In a nutshell, I take a stream of frames from the camera, then do a diff on the frames to see what has moved, I then see if the diff of pixels over time is what I'd expect a pushup to look like using basic logic. The movement of pixels over time should look similar to a sine wave. I threw in some simple logic to account for noise in the data.
- salmonfamine 9y agoThe pixels' diff over time resembling a sine wave is really interesting -- but it makes sense! I'd read an article/blog post about this. Cool app!
- zhan_eg 9y agoI managed to fool it by hand movements (up and down and bending my fingers), so for sure no face needed.
- vorotato 9y agoThere's always the distinct possibility your hands have a face you haven't noticed.
- stevenking86 9y agoNice job. Worked for me without having to fiddle with the camera or anything. Well done!
- vxNsr 9y agoI was able to fool it by doing pushups off my desk, though I was impressed that it worked at all.
- vinchuco 9y agorepeat this cool trick and check yourself for a six pack
- xiphias 9y agoIt's cool :) But it should just make noise if I'm lazy and not doing the pushups... and have a nice sound at the end
- keerthiko 9y agoWe've been working on RepCam [1], built in react-native -- it's currently iOS only, as we found activation energy to use it on a laptop to be too high. Real-time computer vision for fitness tracking is our core competency. [1] https://itunes.apple.com/us/app/repcam/id1118115900?mt=8 https://itunes.apple.com/us/app/repcam/id1118115900?mt=8
- hluska 9y agoHijacking a 'show HN' thread to promote your own product is a very dangerous form of marketing. To you, it might seem like some edgy 'growth hacking'. But, frankly, it hurts your brand way more than it helps.
- keerthiko 9y agoThanks for the feedback. My impression is that HN usually likes to see alternatives and similar products in the space when one is shared. I know I do, when I see a Show HN or even a general product share here, and is often the top comment. This space in particular is sparsely populated (indoor exercise tracking without specialized sensors) so if it's interesting to people, it may be hard to find other similar projects. That said, I wanted to comment on the usability activation energy aspect as much as the shameless plug.
- Jarwain 9y agoI would generally agree that people like to hear about alternatives that are available in a similar field. It's possible that your initial post sounded more like a Plug and less like a Contribution, but that's a wording/tone thing. -shrugs- just food for thought
- vinchuco 9y agofeedback: - annoying sound! Not motivational. Instead, have snooze option when detecting movement (but activate alarm again if no pushups). This also allows for some warmup. - some feedback or countdown of pushups needed could be valuable (when I started, chunking and counting down helped go through them) see the 'seven' app for inspiration (also shows proper form) - why limit to pushups? https://www.youtube.com/watch?v=jU6PcBS1pWw https://www.youtube.com/watch?v=jU6PcBS1pWw motion tracking printable tags - make it easy for me to setup a routine and challenge myself
- sparaker 9y agoI just moved up and down and it detected that as a push up
- hluska 9y agoFeedback: - I flat out love the idea. I have a two year old and for me, the biggest thing that I've noticed about parenting is that it's made working out harder. I love food, so needless to say, I've watched my level of fitness steadily decline. This is very bad for me. An app like this would force me to get up and be active because frankly, the sound is worse than a pissed off toddler. - The sound is worse than a pissed off toddler. My girlfriend said it sounds like a nuclear bomb siren. The sound is bad enough that it would motivate me to do pushups, just to get it to turn off. But, it's in a frequency range that causes lots of people problems. If you choose to keep developing, I'd suggest that having the ability to change/install a custom sound would be a great place to start. - The pushup detection was poor. Either that, or either my form sucks or we have different definitions of what a pushup is. I did 10 pushups and it registered one and to shut down the infernal alarm, I ended up doing the 'raise the roof' motion. Oddly, the 'raise the roof' motion registered as a pushup every single time. I'm a nerdy 40 year old, so I should likely never do the 'raise the roof' motion. It's arguably even more personally limiting than air drumming along to Led Zeppelin (which is, incidentally, a wonderful workout though when you become known as 'the guy who drums at work', you'd be surprised how few people invite you out for lunch). :) - You could be onto something amazing. Getting someone into the habit of dropping and doing pushups a few times a day would transform lives. I would pay for it if it checked my form and counted proper pushups for me. Though, it didn't seem to register my pushups, so maybe it does check my form. Nice work and congratulations on front paging HN! I've got a lot of respect for what you've done and you should feel proud of what you have accomplished. I would be incredibly proud if I were in your shoes.
- faris-ssj 9y agoThanks a lot hluska! I'll work on those points. I'll have to work on making the pushup/'raise the roof' detection smarter. Generally I get good results when I face the webcam whilst on the floor such that when I push up some portion of my forehead goes out of view. I do this before clicking start. My intention isn't to only count pushups with perfect form, as I want it to be useable by all audiences, even if you can only do box push ups.
- megy 9y ago> An app like this would force me to get up and be active because frankly, the sound is worse than a pissed off toddler. There are dozens of apps that would help you exercise in short periods of time.
- beatboxrevival 9y agoI built an iOS app that does this exact same thing a few years ago: https://itunes.apple.com/us/app/100-pushups-all-star/id708510497?mt=8 https://itunes.apple.com/us/app/100-pushups-all-star/id70851... It uses face detection to determine a pushup.
- rootlocus 9y agoSo if I move the phone up and down in front of my face it will count pushups?
- beatboxrevival 9y agoYep, you have to be fairly close to the screen for it to count. Obviously you can cheat if you want to, but what good is that.
- iandanforth 9y agoI like that it's all local by default. The ML practitioner in me though craves an option to share frame data so that you can build a deeplearn.js compatible network and distribute that!
- matte_black 9y agoHow hard would it be to make a pull-up alarm instead?
- razer31961 9y agoReally love the idea, I've been planning on working on my calisthenics and this was the best thing I've ran across, however, I do have some problems with it. - I realized that many people have already complained about the sound so I don't think I really need to go into much detail about having optional alarm sounds - When I had my cam on the ground so it would be able to see my face and detect my head going up and down I ended up having to do about 30 perfect form push ups to complete my goal of 5 push ups. One idea that popped into my head was maybe show some sort of outline for where the face, shoulders, arms, etc. should be so that it could be more efficient in detecting a push up. - I found that when I kept my laptop on my desk and bent the cam down it had counted all of my push ups which was much less frustrating than when my cam was on the ground.
- faris-ssj 9y agoThanks for the feedback. Glad you found an orientation which works. I'll definitely look at ways like you mentioned to help people get into that position first time round.
- secret-throwa 9y agoThis idea reminds me of this little web app, which is quite popular in certain circles : https://cornertime.herokuapp.com/ https://cornertime.herokuapp.com/ (NSFW, but nothing graphic)