Jev: a model that returns decisions, not text
Most of our AI code isn't asking a model to write anything — it's asking it to decide something. We spent a few days with Jev, a model built to skip text and return typed decisions instead.
Discover the impact of gaze tracking technology on human behavior. Explore applications and insights in this journey with Codemonk.
Have you ever strolled through a shopping mall or browsed an online store and found yourself drawn to certain products? Ever wondered why some items seem to catch your eye more than others? It's no accident. Behind the scenes, there's a sophisticated system of attention catching at work.
Think about it – why do certain products sit prominently on shelves, or why do ads on TV seem to grab your attention so effectively? It's all about strategically capturing your attention. Whether you're in a physical store or browsing online, designers carefully arrange products and advertisements to grab your attention.
Attention is a powerful tool that can reveal a lot about human behaviour. Think of those personality tests, where you're asked to describe what you see in an image to get a glimpse of your mind. By analysing where your gaze lingers, experts can paint a picture of your personality and preferences. Also based on this data many cognitive studies have been conducted which are used in medical tests.
In this blog, we'll delve into the world of gaze tracking technology – exploring how it works, its applications in everyday life, and the insights it can unlock about human behaviour. So, let's embark on this journey together and uncover the secrets behind where your eyes wander.

The significance of understanding where our gaze falls cannot be overstated. The implications are vast and varied, spanning across industries such as e-commerce, graphic design, healthcare, sports, gaming, and more.
Think about it – our eyes are constantly drawn to points of interest, whether it's a captivating image, a crucial piece of information, or a compelling advertisement. By harnessing the power of gaze tracking technology, businesses can gain invaluable insights into user behaviour and preferences.
Imagine using your laptop, mobile phone, or tablet, and effortlessly controlling the cursor with just your gaze. It's not science fiction – it's the future of user interaction. With advancements in AI algorithms, we're on the brink of a revolution in gaze tracking technology.
By understanding where users are looking on their screens, developers can create more intuitive interfaces and personalised experiences. From enhancing accessibility for individuals with disabilities to revolutionising how we play games or shop online, the possibilities are endless.
So, let's delve deeper into the fascinating world of gaze tracking and explore how this technology is reshaping the way we interact with digital devices.
Gaze tracking is a process of identifying where a person is looking on the screen. Using artificial intelligence based on data, we can predict the gaze direction and screen point where the user is looking at (i.e. mapping from real world to pixel world!).

The two main underpinnings for understanding and modelling the gaze are physics, and maths. The change in Gaze on screen can be determined by the movement of eyeball.
The main input feed for the AI algorithm in gaze tracking is your face image captured by a camera (web camera). The important role as said before is played by your eyes. Hence eye regions are cropped off from the captured image. You can see the measurable difference between these images when a person’s gaze changes as shown above.
Researchers have found multiple methods and ways to estimate gaze location. Using features of your eyes, an AI model can predict the location of gaze on the screen. Gaze can be determined using these 2 setups -
Before moving into these methods and understanding them, let’s take a look at some of the terminologies used in gaze tracking. These would help us in understanding the concepts better.
Head pose/orientation: Position or orientation of your head while holding a mobile, when sitting in front of a desktop/laptop, or while wearing an eye-wear.
Head Pitch: Pitch is the angle in the z-y plane with the horizontal axis at the origin.
Head Yaw: Yaw is the angle in the x-z plane with the vertical axis at the origin.
Head Roll: Roll is the angle in the x-y plane with the third axis(z) at the origin.

Fig - head pitch, yaw, and roll (Source)
Gaze vector: It represents gaze direction with values from the user realm (object coordinate axis).
Gaze location: It represents a point on the screen in the screen realm(screen coordinate system).
Error in degrees: It is the shift between the actual gaze vector and the predicted gaze vector.
Error in pixels/cm: It is the shift between the actual gaze location and the predicted gaze location.
Fixations: These are phases when the eyes are stationary at some point on the screen. Duration of concentration of gaze on a particular location of the screen.
Saccades: These are rapid and involuntary eye movements that occur between fixations. Measurable saccade-related parameters include saccade number, amplitude, and fixation-saccade ratio.
Scan-path: This includes a series of short fixations and saccades alternating before the eyes reach a target location on the screen. Movement measures derived from scanpath include scanpath direction, duration, length, and area covered.
Gaze duration: It refers to the sum of all fixations made in an area of interest on screen before the eyes leave that area and also the proportion of time spent in each area.
Pupil size and blink: Pupil size and blink rate are measures used to study cognitive workload.
Having seen these terminologies now we will see different approaches and methods used for gaze tracking.
2D Regression
X = a0 + a1x + a2y + a3xy
Y = b0 + b1x + b2y + b3xy

Fig - Pupil and the corneal glint in eyes (reference)
3D modeling method
This method uses a geometrical model of the human eye with the center of the cornea, optical and visual axes of the eye, which are used to estimate the gaze as points of intersection where the visual axes meet the screen.
The optical axis is shown as the line joining the center of curvature of the cornea with the pupil center. The visual axis passes through the fovea and the center of corneal curvature. The Kappa angle is the angular deviation between the optical and visual axis
Using information like pupil center, glint reflection, and courtier points the optical axis is obtained, and then estimates of the visual axis using kappa angle which is generally 5 degrees. For precise measurements, user calibration (studying unique user) is done.
In the user calibration process, a few target locations are shown on the screen and the user looks at them, in the back-end gaze estimation happens with all measurements of above said terms. This helps in the estimation of the gaze, which is personalized to the user.
Here 3D eye model is used for the estimation of gaze, where cameras are required as well as infrared light is used. Accuracy is said to be highest in such methods but requires a complex setup for making it work.

Fig - 3D model of the human eye (source)
Cross-ratio based method

Fig - Cross-ratio-based method setup (reference)
Appearance-based method
| Evaluation Criteria | 3D Model Method | Regression Method | Cross Ratio Method | Appearance-based Method |
|---|---|---|---|---|
| Setup Complexity | High | Medium | Medium | Low |
| System Calibration | Fully-Calibrated | Optional | Optional | Optional |
| Hardware Requirements (cameras) | 2 + infrared (stereo) | 1 + infrared | 1 + infrared | 1 + Ordinary |
| Gaze Estimation Error | < 1 degree | ~ 1-2 degree | ~1-2 degree | > 2 degree |
| Implicit Robustness to Head Movements | medium to high | low to medium | low to medium | low |
| Robustness to varying illumination | medium to high | medium to high | medium to high | low |
| Robustness to use of eyewear | low | low | low | medium |
In the above methods, we have seen how different input feeds are used to track the gaze. Features like eye patches, corneal glint reflection images, eye corners, pupil centre values, full face feature values, etc. are used in the input feed for these methods. But, what if, e.g., your eyes are not detected, images are blurry, and image features are of lower quality? This will interrupt the application and we may get the wrong results for those instances. Hence, we need to ensure some physical conditions which won’t cause problems to our system’s operations. The following are some of the conditions.
So, the system must be made considering such situations and other physical scenarios around us. These are the recommendations given to have a smooth experience.

2. Shopping Malls:
As stated at the start of article, shopping malls use specific user patterns to arrange products. Using Gaze Tracking technology IKEA tested and studied its customers by understanding what actually the customer looks at and how the customer’s attention rolls over various items. After the customer has completed his shopping the collected data is used for further analysis which are useful for marketing strategies.
3. Gaming:
Similarly, taking another use case, with gaze tracking we can play PlayStation/desktop games. Here you won’t be using any joystick or mouse but, you can control and play the game with your eyes.
There are many applications that can be derived using gaze tracking. At the same time, although with AI we can create robust systems, there are cautions that need to be taken off while using such applications. As these systems are built on data, so need to ensure that input feeds are correct and valid in real time.
Gaze tracking systems offer various methods to determine a person's point of focus on a screen. The applications of gaze estimation are wide-ranging and have significant potential across different industries. The point of gaze in our daily lives provides valuable insights about individuals if observed closely. Leveraging gaze tracking technology can enhance our interactions with mobile devices, tablets, laptops, and desktops, streamlining their operations and management. Furthermore, gaze tracking can be applied effectively in eye-testing scenarios. Gaming experiences can be taken to the next level by incorporating gaze-operated controls. Gaze estimation, as a branch of artificial intelligence or deep learning, holds immense promise for the future.
Want more insights and expert tips? Don't just read about Gaze tracking! Work with brilliant engineers at Codemonk and experience it's effective use case firsthand!
Most of our AI code isn't asking a model to write anything — it's asking it to decide something. We spent a few days with Jev, a model built to skip text and return typed decisions instead.
Akshay Kumar
Discover how to create a sentiment analysis tool for Twitter using Langflow and Llama 2. This no-code guide walks you through building a real-time API for classifying tweets as positive, negative, or neutral, perfect for business insights and analysis.
Karan Kariappa
This guide walks you through installing Langchain and Langflow locally, followed by an exploration of Langflow’s components and GUI. Learn to build visual workflows, connect LLMs, and create content pipelines for tasks like summarization, transcription, and more using a user-friendly interface.
Karan Kariappa
Get our thinking
The same signal as the footer signup — sent when we actually have something worth saying.
you@company.com SubscribeWe'll respond within one business day.