It's so annoying when you take a photo and one or two people blink in sync with the camera - it ruins the whole photo! Wouldn't it be better if people didn't blink out of sync?
We've fixed this by making everyone blink. Blynk is the ultimate ragebait camera that takes a burst shot and stitches together the photo such that everyone is blinking.
We increase the probability of blinking by flashing the phone's torch.
How we built it
The project is a Python server that processes the images and a vanilla JS frontend. We take the images, use a the BlazeFaceFullRange model to identify the location of faces and eyes. Then we use our own high-accuracy Convolutional Neural Network that we trained to check whether the eyes are open or closed.
Then we stitch the photos together (we do not edit the images with AI) such that everyone is blinking (or we redact them from the photo if they weren't blinking).
Challenges we ran into
Detecting blinks was hard in a range of lighting conditions, so we trained our own model that runs extremely fast (quantised to run in a few kilobytes on the CPU in a few milliseconds per eye). We added significant data augmentation to make it robust to noise and scaling.
View the training notebook here: https://github.com/s4m-mo/camhack/blob/main/blynk/research/open_closed.ipynb
Accomplishments that we're proud of
- Training a model with such high accuracy (>96% on validation data)
- Ragebaiting our friends
- Creating an interface that replicates standard cameras UIs so well
- Working the first morning without coding agents
What we learned
- People don't blink as much as you'd think when you flash bright lights at them
What's next for Blynk
- Further ragebaiting of friends is always helpful