Inspiration

Poker is most exciting when it's a psychological game with players bluffing and reading each other. Unfortunately, many beginners miss out on this part because the game feels too unfamiliar to pay attention to nervous tells or subtle body language, so the social mind-game side of poker can feel inaccessible.

This app is a lighthearted attempt to level the playing field. Using a custom computer vision model, it analyzes facial expressions through the phone’s camera and estimates how nervous someone appears, presenting a simple “bluff %” in real time.

How we built it & Challenges

Our first significant challenge was finding a suitable dataset. We needed one that was open-source, well-annotated, and varied enough to support reliable model accuracy and stability. After several attempts, we ultimately used one that was made in 2013! We then trained one of the lighter models on this dataset, running as many epochs as we could afford to before we became afraid of overfitting. We exported this model to tensorflow lite, so we could run it directly in our app using Flutter.

Despite detecting emotion with a good accuracy, our model wasn't too confident in its predictions, returning dozens of varying guesses for each emotion in any given frame. We handled this by taking the several most confident guesses for each emotion and using a weighted average to return a prediction that wouldn't skew because of relatively few outliers while still favoring the more confident results. These predictions were aggregated together and the general pattern occuring every second was used to compute our overall Bluff%.

Surprisingly, our biggest challenge was actually building the mobile app and testing its performance on a real iPhone, as we failed to realize that we could only build it for one of our phones using Xcode, which we were unable to run without MacOS. We were unable to get a virtual machine running it, so, we can't know if our optimizations were enough to get it running smoothly on one of our devices, but we hope so!

Accomplishments that we're proud of

Our model's overall performance rating was an 84%, which was surprisingly good for our choice of dataset and model size.

What we learned

Get something testable early on when working with projects that involve a big time constraint like training a model! If we had realized our issue with Xcode sooner, we could have left ourselves with enough time to try and fix it. Other than that, we got exposure to tools we'd never really used, and some much needed experience with mobile app design!

Built With

Share this project:

Updates