L2CS-Net
L2CS-Net gaze detection is deprecated on Roboflow servers. It still runs in the browser with inferencejs.
L2CS-Net is a gaze direction model. It finds faces in an image and predicts where each face is looking, as yaw and pitch angles.
Run Gaze Detection in the Browser
The inferencejs browser SDK runs gaze detection on the user's device and does not depend on Roboflow Inference. Start a worker with the model name gaze and version 1:
import { InferenceEngine } from "inferencejs";
const inferEngine = new InferenceEngine();
const workerId = await inferEngine.startWorker("gaze", 1, "[publishable key]");
const video = document.getElementById("video"); // a webcam <video> element
const gazes = await inferEngine.infer(workerId, video);Each result holds the eye positions plus yaw and pitch in radians. See GazeDetections for the full type. Learn how to turn yaw and pitch into a point on screen in the gaze detection guide.
Last updated
Was this helpful?