Polite Type

Beth Fileti (she/her), a multidisciplinary designer exploring art and technology. I specialize in systems thinking, communication strategies, and design solutions.

Mirror Selfie

p5js + KNN Classifier

|

2022

Training a KNN classifier to recognize a mirror selfie.

On a mobile device? Give it a try.
A zoom in of bright green text over a photograph that reads: Mirror Selfie 234 | 100% // Not Mirror Selfie 224 | 0% // Label 2: 0 | 0%

Process Documentation: https://www.politetype.com/blog/mirror-selfie-ml-training

Mirror Selfie is the result of a 2-day code sprint to learn about KNN classifiers (a basic classification algorithm).

The camera goes back and forth between showing a woman's reflection in a mirror. When it is off the mirror the text on the screen reads "Find a mirror." When it is showing the selfie being taken in the mirror a variety of stickers pop up saying phrases like "Take that picture", "You look great!", "Now take a moody one.", "Qwitcher job.", and "You cheese ball."

In order to train the model on a mobile device, I had to create a simple interface for input and realtime data readouts. In the below video, you can see (apologies for the low contrast text!) the number of data points logged for both binaries: Mirror Selfie and Not Mirror Selfie. Using the buttons at the top of the screen, I corrected the model in real time and was able to quickly improve its performance. However, training the model solely on my own reflection and in very limited conditions clearly has an impact on the utility of its output.

A video demonstrating an early test of building an interface which allows data collection & model training from a mobile device.
A video demonstrating an early test of building an interface which allows data collection & model training from a mobile device.
A video demonstrating an early test of building an interface which allows data collection & model training from a mobile device.

Image Gallery

No items found.
Polite Type
© 2025, Polite Type