4 ms·
Show HN: Play snake by moving your head
- ml_basics 6y agoLink to demo: https://paruby.github.io/snake-face/ https://paruby.github.io/snake-face/
- roll57 6y agoThere is a tutorial about that https://www.youtube.com/watch?v=UPgxnGC8oBU https://www.youtube.com/watch?v=UPgxnGC8oBU
- ml_basics 6y agoVery cool, but that video works by using normal supervised learning (to detect hand gestures) while mine detects the direction your face is pointing in using pose estimation. Edit: I didn't train the pose estimation model myself, it's taken from a tensorflow.js example: https://github.com/tensorflow/tfjs-models/tree/master/facemesh https://github.com/tensorflow/tfjs-models/tree/master/faceme...
- imglorp 6y agoHow hard would it be to use these tools to detect someone touching their face and throwing a chime to help remind them not to? It could run in the background all day for laptop/webcam users. #covid etc.
- johnmoberg 6y agoCheck this out: https://news.ycombinator.com/item?id=22548708 https://news.ycombinator.com/item?id=22548708
- imglorp 6y agoYeah, that!
- sleepychu 6y agoVery impressive! Callibration took a fair minute or two but I didn't have to do anything complicated like show it all the different poses. Fun couple of games. I had trouble getting it to recognise down but I think that's because I can't bend my neck forward and keep looking at the screen (glasses) to see the snake moving. Also I am definitely team: Screen edge should wrap around!
- ml_basics 6y agoThanks for the feedback, I will take it into account for v2!
- sairamkunala 6y agoYou should rename the title to 'snake game with free head streches'
- thereyougo 6y agoGreat way to discover muscles you didn't know you had
- fpopa 6y agoI did a similar thing, but used left / right head tilting for scrolling the page. Reading and peeling oranges became easier.
- caspx 6y agoVero cool
- syx 6y agothis is very nice and fun!
- nallo 6y agoKeep making these things for me. :)
- xiphias2 6y agoLots of fun, but my head hurts a bit :)
- jahn716 6y agoYea, I had to stop after scoring 5
- jbverschoor 6y agoI think I need a beard for this to work.
- blotter_paper 6y agoThis is cool! I appreciate the printed direction under the video of my face, but I feel like it might have been a little bit easier for me to learn to direct it if there was also a face mesh drawn on the displayed camera frame as debug info. This has seemed to allow me to adjust easier to facial controls in the past, and other people I polled about the helpfulness of displaying such debug info to the end user seemed to overwhelmingly agree (polls were of about 20 people, and super unscientific -- this is essentially still anecdotal advice to be taken with a grain of salt, but I got literally no negative reactions). As an example of how this could help learning, I jumped straight to the demo without really reading the instructions (hurpadurpa), and I foolishly assumed that you were just detecting head position in the frame and using the coordinates, rather than the direction my face was pointing, to determine control direction. It wasn't until I looked at the code that I realised what I was doing wrong. I probably could have read more and picked up on this without diving into the code, but I also probably would have picked it up immediately if I saw a mesh of some facial landmarks (rather than assuming an invisible bounding box). I think smaller adjustments would be assisted as well -- the user can figure out how far off screen their face can go while still being a face way easier if you show them what you think looks like a face. Another maybe-helpful-maybe-not thought: adding an additional direction indicator to the art in the main game screen might make it easier to get used to the controls as well, and let the user know exactly when they trigger a change in direction without drawing their eyes away from the action. This could be as simple as two pixels for eyes on the snake head.
- ml_basics 6y agoThanks a lot for the detailed feedback, that's really helpful!