Distraction detection system for more effective chess training

circle anim 3
Education, Machine Learning
Research team
3 data scientists
JS, Python, TensorFlow, SQLite, Flask

About FocusTrainer

A new feature for the ChessGrow platform

Assuming that kids lose interest during chess classes if the task is practised for too long or the lesson takes too long, Emphie’s AI team created an algorithm that detects human distraction using a computer camera. The goal was to increase the number of tasks completed by children as more effective training speeds up the learning process.

This new feature can be used to adjust the training to each learner by changing exercise type and also to adjust the training duration time in specific age groups.

circle anim 3
Distraction detection system

The Challenge

Client side ML and how to measure distraction

The first and foremost challenge was to make a machine learning algorithm that works in real time and entirely in the browser, to avoid transmitting sensitive data (e.g. kids' photos) outside the user’s computer. Another aspect was inventing a method that assesses whether a pupil is distracted or focused. Last but not least, the 'base' child’s position in relation to the camera was difficult to capture as it's only natural for children to never stay still :)

The Solution

Real time detection with TensorFlow.js tuned up by chess trainers

Every second a frame is captured from the camera. TensorFlow.js is used to find characteristic points on the face. The distraction is estimated based on the head rotation around each of 3 axes for a group of consecutive frames.

An app for chess trainers that will be used during lessons in Emphie's educational center was prepared. It enables to confirm or deny detected distraction and to report undetected distraction. Based on this feedback the best values of parameters will be found and applied to the final version of the system.

JavaScript JavaScript
Python Python
TensorFlow TensorFlow
SQLite SQLite
Flask Flask


1000 hours

of video material analyzed per month

< 2 months

To create effective MVP

100% privacy

Sensitive data does not leave user’s computer

Next project

SkyTech Research
trailers, sensors and the platform to rule them all

circle anim 3