---
title: "Eye Detector: the focus where you are looking"
url: "https://www.sparkfabrik.com/en/lab/eye-detector/"
lang: "en"
type: "project"
date: "2026-10-17"
lastmod: "2026-10-17"
description: "Luca Rossi wanted the focus where he is looking, across several screens: Eye Detector, a story from the SparkFabrik Laboratorio."
image: "https://www.sparkfabrik.com/images/og/laboratorio-eye-detector-en.webp"
translations:
  it: "https://www.sparkfabrik.com/it/laboratorio/eye-detector/index.md"
schema: {"@context":"https://schema.org","@id":"https://www.sparkfabrik.com/en/lab/eye-detector/#webpage","@type":"WebPage","breadcrumb":{"@id":"https://www.sparkfabrik.com/en/lab/eye-detector/#breadcrumb"},"dateModified":"2026-10-17T23:36:08+02:00","description":"Luca Rossi wanted the focus where he is looking, across several screens: Eye Detector, a story from the SparkFabrik Laboratorio.","inLanguage":"en","isPartOf":{"@id":"https://www.sparkfabrik.com/#website"},"name":"Eye Detector: the focus where you are looking","publisher":{"@id":"https://www.sparkfabrik.com/#organization"},"url":"https://www.sparkfabrik.com/en/lab/eye-detector/"}
---

# With several screens, the focus where you are looking.

I work with several screens and wanted the focus to go by itself where I am looking, without hunting for the window with the mouse.

Luca Rossi, Software Developer · tells Eye Detector

### How I approached it

I wrote it with Claude Code, in Swift. Apple's Vision reads the face twenty times a second; a hand-written logistic regression works out which screen you are looking at. I chose it over k-NN because it also holds for postures close to the calibrated ones.

> Every click is also training data. (From the README)

### What came out

A macOS menu bar app: look at a screen and its top window comes to the front. Every click becomes an example and the model retrains by itself, all on the Mac.

20 fps: the face read from the webcam, processed only on the device

## Il progetto

- Built with: Swift, Vision, Claude Code
- Runs on: macOS 14 or later
- Needs: A webcam and several screens
- Status: Open source, MIT

[The repository](https://github.com/luxx91/eye-detector)

## Before we bring it to you, we try it on ourselves.

Have a need like this? Let's talk: we approach it the same way.

[Tell us about your project](https://www.sparkfabrik.com/en/contact-us/)

More stories:

- [A radio voice in every call, without knowing anything about audio.](https://www.sparkfabrik.com/en/lab/voice-strip/): Voice Strip · Paolo Mainardi
- [For the pleasure of making music by writing code.](https://www.sparkfabrik.com/en/lab/coding-misk/): Coding Misk · Alessandro De Vecchi
- [For the pleasure of playing on a tube television.](https://www.sparkfabrik.com/en/lab/omacrt/): OmaCRT · Stefano Mainardi
- [To see if our engravings could become a game.](https://www.sparkfabrik.com/en/lab/lultima-scintilla/): L'ultima scintilla · Stefano Mainardi

---

*This is the Markdown version of the page, to facilitate reading by AI and crawlers. Visit [https://www.sparkfabrik.com/en/lab/eye-detector/](https://www.sparkfabrik.com/en/lab/eye-detector/) for the full version with images and interactions.*
