Here’s Looking at You, Kid

This inexpensive eye tracking system is so simple to build that a child could do it.

nickbild
about 3 years ago Wearables
Controlling a robot with eye movements (📷: S. Stoetzer)

Eye tracking technologies have been around for decades, but recent advancements, especially in machine learning, have made them more accessible, efficient, and accurate. Eye trackers use sensors to monitor the movement and behavior of the eyes, providing a wealth of information that can be used in a variety of fields. From marketing to medicine, eye tracking technology has the potential to revolutionize the way we interact with the world around us.

While applications of the technology, like assessing a patient's neurological health or ensuring that drivers are focused on the road, may sound very complicated and inaccessible, the underlying tracking technology has actually become highly accessible. Building an eye tracker with off the shelf parts has become both simple and inexpensive. An engineer and educator by the name of Sergej Stoetzer took notice of these facts, and decided to create instructions for a DIY eye tracker that can be constructed by children as young as nine.

Inexpensive, DIY eye tracking glasses (📷: S. Stoetzer)

Building this project not only allows children to have the experience of creating a useful device, but it also teaches them about software engineering, machine learning, and electronics along the way. With a little over $20, the handful of components needed for the project can be purchased, and the software development can be done entirely with free, online tools. Stoetzer developed two versions of the device — one that is bare bones, and another featuring infrared illumination for better imaging and a custom case for the camera.

To build the device, a USB endoscope camera is attached to a pair of safety goggles with a length of flexible wire and zip ties such that it is pointing directly at the wearer’s eye. To get the positioning correct, the camera can be plugged into a computer so that you get a real-time view while making adjustments. Once everything is lined up, such that the entire eye is in view — not just the pupil — the zip ties can be tightened down and the hardware is finished.

Processing camera data with Python and OpenCV (📷: S. Stoetzer)

In order to keep the software portion of the project manageable for younger children, Stoetzer came up with a plan that is based on the graphical programming language called Scratch. This language allows users to drag and drop blocks on the screen to create the desired functionality. In particular, an online tool called mBlock, produced by robotics manufacturer Makeblock, offers a simple Scratch 3-based interface, and also the ability to add “Teachable Machine” blocks. These are special elements that allow the user to train and run neural networks.

Stoetzer walks step-by-step through the process of creating the program and setting up the neural network, which involves uploading images of the eye from the tracker glasses. About 15 to 30 images of the eye in each of four positions — up, down, left, and right — were collected and uploaded to train a classifier.

It was also demonstrated how these classifications could be used to trigger a signal being sent to a wheeled mBot2 robot to control it. In this way, looking left causes the robot to turn left; looking up makes it move forward, and so on. This may be a small-scale experiment, but it shows how easily this technology could be adapted to, for example, control a wheelchair.

Instructions are also included to build a more professional version of the hardware, with infrared illumination to improve eye tracking accuracy and a case to house the camera. And if you want a bit more flexibility in the software design, a sample Python script that leverages OpenCV for image processing is provided.

Whether you want to learn more about this technology, teach your children some new skills, or build a useful device, Stoetzer’s tutorial has got you covered. Be sure to check it out.

nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles