Computer Vision Lets You Skip Songs With A Glance

Have you ever wished you could control your home automation devices with nothing more than a withering stare? Well then you’re in luck, as [Norbert Zare] has come up with a clever way of controlling an MP3 player with only your face. Though as you might imagine, the technique could be applied to a whole range of home automation tasks with some minor tweaks.

At the core of this project is the Raspberry Pi, specifically the 3 B+ model, though with the computational demands of computer vision you might want to bump it up to the latest-and-greatest Pi 4. From there you need to load up OpenCV and a model trained for face detection, which as luck would have it, tends to be a fairly common application for this technology.

With a relatively simple Python script, [Norbert] is able to determine when OpenCV detects he’s looking directly into the camera and fire off one of the Pi’s GPIO pins that’s been connected to the “Skip” button on a physical MP3 player. That’s right, you read that correctly. He’s using a dedicated MP3 player in the year 2021.

In all seriousness, we’re not really sure why [Norbert] went this route compared to simply playing the music on the Pi and controlling it through software, but this does serve as a good example of how you can interface with physical devices if need be. In any event, using the Python script he’s provided, you could easily modify the setup to control other tasks, virtual or otherwise.

While face recognition can be a scary thing out in the wild, we do think it has some interesting applications within the home, so long as the user is the one who is in control of where their data ends up.

7 thoughts on “Computer Vision Lets You Skip Songs With A Glance

      1. Is dinner cooked yet?
        (Looks at oven)
        *advertisement plays over entire house
        *announcement plays “to use this feature, please subscribe to our premium membership”
        Oven is remotely disabled.

  1. I’ve been wanting to make the speed-reading device from Stranger in a Strange Land, where it scrolls the text across a screen or something while you’re looking at it, but stopping when you look away. This sounds like it would work very well for that application.

  2. (Starts playing rap) – Dirty look
    (Starts playing heavy metal) – Surprised look.
    (Starts playing country) – Sad look
    (Starts playing classic rock) – Ok look

    It’s hooked to a dedicated MP3 player ? Well Star Lord….Zunes are really popular on Earth right now.. 😄

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.