This Robot Keeps You on Task with a Combination of Computer Vision and Pain

Never stray from your goal with the help of Neuralalgorithmic's anti-procrastination robot and its array of "motivational" tools.

The problem with procrastination

For both students and workers, it can be very challenging to get through an assignment or task when fatigue/boredom begins to set in. This is why the YouTuber known as Neuralalgorithmic decided to create a smart device, which can monitor a user for perhaps the most common distractions: looking at a smartphone. By tracking when this devious object comes into view, the subject can then be nudged back onto task by blaring loud music and blinding them with light until focus is achieved once more.

Detecting objects

The first challenge that had to be overcome was figuring out how to determine if a phone is being held. To accomplish this, Neuralalgorithmic ran some initial experiments using OpenCV and the SSD MobileNet neural network trained on the COCO dataset. This allowed him to set up a webcam and track where various objects appear on the screen in real-time.

Distraction alerts

Once this crucial step had been figured out, he set to work writing a Python script that could turn the mere presence of a phone into some kind of action. Within an infinite loop, the latest frame is read from the camera and passed to the neural network where it is then labeled with every detected object. If any are detected that match the ID for a cell phone, then a Firebase database is updated with the value 1, otherwise it remains 0.

Maintaining focus

A mobile app was also created that controls a phone's flashlight functionality, thereby enabling it to receive information from the Firebase service and react whenever the value changes. A set of speakers were also connected so that blaring loud noise could be played for an added level of motivation. To see this project in action and watch how Neuralalgorithmic built this system, you can view his video here on YouTube.

Arduino “having11” Guy
20 year-old IoT and embedded systems enthusiast. Also produce content for Hackster.io and love working on projects and sharing knowledge.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles