Stop People Peeking at Your Screen: The Complete Gaze Guard Guide

Use your webcam to detect when someone is peeking at your screen — flash a visual alert or quietly switch tabs. All processing is local; frames never leave your device.

分享
Stop People Peeking at Your Screen: The Complete Gaze Guard Guide
Photo by Towfiqu barbhuiya on Unsplash
Use your laptop's webcam to detect when someone is peeking at your screen from behind or beside you. The moment it detects a watcher, it flashes a visual alert across the page — or quietly switches your tab to an innocent-looking "safe" screen.

Gaze Guard is a Chrome extension. At its core, MediaPipe FaceLandmarker (WASM) runs continuous face detection in the background at ~10 FPS, estimating each face's distance from the camera and its head orientation to decide whether "someone is looking at your screen."

All image analysis happens locally in your browser. Video frames and face data never leave your computer and are never uploaded to any server.

When it spots someone watching, you can have it flash a glow around the screen to warn you, or just switch straight to a safe tab you've set up — hiding whatever you were actually looking at. Installing takes a moment: open the store page, hit "Add to Chrome," and pin the eye icon to your toolbar. The rest of this guide walks you through it step by step.


How do I install Gaze Guard?

Install straight from the Chrome Web Store — no developer mode needed:

  1. Open the Gaze Guard listing.
  2. Click Add to Chrome, then Add extension to confirm.
  3. Once installed, click the puzzle-piece icon on the toolbar and pin Gaze Guard's eye icon there.

How do I start monitoring and grant camera access?

Click the eye icon in the toolbar to open the settings panel. On first open it's in the Idle state — the status dot is gray, the values show "—", and the top-right button reads Start.

Gaze Guard settings panel before starting, status Idle

Click Start in the top-right. Because the offscreen background page can't raise the browser permission dialog itself, Gaze Guard opens a permission tab automatically:

Gaze Guard camera permission page, noting frames stay local

Click Allow Camera Access. Chrome shows "Allow Gaze Guard to use your camera?" at the top → click Allow. The tab closes itself once permission is granted.

Reopen the settings panel and the status turns to Monitoring: a green dot, plus live readouts of detected face count, estimated distance, and head orientation.

Gaze Guard panel while monitoring, showing face count and 82cm distance

The three values in the status box update in real time — handy for confirming detection is working:

Gaze Guard status box close-up: faces, distance, orientation
Field Meaning
Faces Detected Number of faces currently in frame; the value in parentheses is how many are "watching" (facing you)
Estimated Distance Estimated centimeters from the nearest face to the camera (via a pinhole-camera model)
Orientation (yaw / pitch) Head left/right and up/down tilt; closer to 0 means more directly facing the camera

What is the "target tab" and how do I set it?

The target tab is the safe screen Gaze Guard jumps to when you're being watched — usually a document, a blank search page, anything that looks ordinary.

  1. First, open the tab you want as your safe screen.
  2. While that safe tab is active, click the Gaze Guard icon to open the panel (it captures the current tab).
  3. Click Set current tab as target. The text below the button changes from "Not set" to that tab's title or URL.
Gaze Guard target tab section, set current tab as target

What trigger actions and alert styles are there?

Gaze Guard settings: trigger action, alert style, color, display duration

Trigger Action

Option Behavior
Visual Alert + Switch Tab (default) Plays the alert animation on the current page, then jumps to the target tab
Visual Alert Only Plays the animation only; no tab switch
Switch Tab Only No animation; switches away silently

Alert Style

Option Visual
Clockwise Border Glow A glowing border sweeps clockwise around the whole window edge
Mark Face Position A warning banner appears at the top and a circle marks each detected face

Border / Marker Color

Three swatches: gold, teal, red. The selected one gets a white outline.

Display Duration

How long the alert animation stays on screen, from 500 to 5000 ms (default 1500 ms). Larger means longer on screen.


How do I tune the detection parameters?

This section decides what actually counts as "someone peeking." The defaults work for most people, but understanding each parameter lets you tune it for your environment.

Gaze Guard detection parameters: extra face threshold, distance, hold, cooldown, angle, focal length

Extra Face Threshold (most important)

Range 0–5, default 1. How many "watching" faces — beyond your own — are required to trigger.

Setting Behavior When to use
1 (recommended) Besides your own face, a second face must be facing you up close Normal single-user use; you looking at the camera won't false-trigger
0 Any watching face triggers (including your own) When your face shouldn't be in front of the screen (testing)
2 Requires 3 faces at once Crowded office environments

Trigger Distance

Range 40–150 cm, default 80 cm. Only faces within this distance are counted.

  • Lower (e.g. 50 cm): only very close people trigger it.
  • Higher (e.g. 120 cm): more distant people trigger it too.

Hold Duration / Cooldown

  • Hold Duration (0.5–6 s, default 2.5 s): how long someone must stare continuously before it triggers. Longer is harder to false-trigger but slower to react.
  • Cooldown (1–60 s, default 20 s): after one trigger, no re-trigger during this window — prevents alert spam.

Frontal Yaw Tolerance

Range ±8° to ±40°, default ±22°. The angular tolerance for counting a face as "watching."

  • Smaller: the person must face the camera almost head-on; fewer false positives but harder to trigger.
  • Larger: even a slight side-profile triggers.

Distance Calibration (Focal Length)

Range 400–1000 px, default 650. Distance is estimated with a pinhole-camera model: distance = (9.0 cm × focal length) / inter-eye pixels. If the estimated distance is clearly off from reality, adjust this to calibrate — the reading should decrease as a face gets closer.

Just leave the detection rate at 10 FPS. Measurements show the power savings from lowering FPS are minimal, so there's no reason to change it.

What happens when someone is peeking?

Once configured, close the panel and have another person step in front of the camera, within ~80 cm, facing your screen for about 2.5 seconds.

Clockwise Border Glow — a gold band of light lights up the window edge and sweeps clockwise:

Gaze Guard border glow alert, gold light around the window edge

Mark Face Position — a warning banner pops up at the top and a circle marks the watcher's face:

Gaze Guard mark-face-position alert, circle around the watcher

If your action mode includes "Switch Tab," the browser jumps to your target tab once the animation ends. After a trigger it enters the cooldown window (no re-trigger for 20 s by default).


How do I stop monitoring?

Open the panel; while monitoring, the top-right button reads Stop. Click it to end: the dot goes dark, status returns to "Idle," the three values reset to "—", and the button returns to "Start."


Can I switch the interface language?

Yes. The Interface Language dropdown at the top of the panel switches instantly — no reload needed. Supported:

  • Auto (follows the browser language)
  • 繁體中文 / 简体中文 / English / 日本語 / 한국어 / Français / Deutsch / Español

FAQ

Does Gaze Guard upload my video or face data? No. All image analysis runs locally in your browser via MediaPipe and is discarded immediately — nothing is stored or uploaded to any server.

Is Gaze Guard free? Yes, it's free to install and use.

Which browsers are supported? Chrome, and Chromium-based browsers that support Chrome extensions (Edge, Brave, etc.).

Why doesn't looking at my own camera false-trigger it? The default "Extra Face Threshold" is 1, meaning a second face — beyond your own — must be facing you up close before it triggers.

Does Gaze Guard drain the battery? Monitoring adds about 277 mW versus off — roughly 12–17 minutes of laptop battery life (~2.8%). See the measured power results.


中文版:防止別人偷看螢幕:Gaze Guard 完整教學 GitHub: steepinglogic/gaze-guard

Read more

Gaze Guard 短影片旁白的 TTS 成本與隱私防護示意圖

短影片旁白的成本,其實比我想像低

我最近在做一支 Gaze Guard 的 20 秒產品介紹影片。 原本想說簡單做個動畫就好。 後來想說如果有配音,會感覺比較生動也比較能夠描述使用的情境和達成的效果。 這次我測了什麼 我測的是產品介紹影片用的英文旁白。 工具底層使用的是 Edge TTS,也就是 Microsoft Edge 的線上 Text-to-Speech 服務。常見的底層工具是 edge-tts。 這不是正式 Azure Speech API 的計費路徑。 在我這次的環境裡,它沒有要求 API key,也沒有回傳可見的 per-use billing。 所以這次測試本身,比較像是快速 prototype。 如果未來要正式商用、穩定大量產出,就要回頭看 Azure Speech、OpenAI TTS、ElevenLabs 這類正式付費方案。

By SteepingLogic
用 Cloudflare Tunnel,從外面連回本機 Hermes Dashboard

用 Cloudflare Tunnel,從外面連回本機 Hermes Dashboard

# 用 Cloudflare Tunnel,從外面連回本機 Hermes Dashboard 我有一台 local Hermes。 平常它就在自己的機器上跑。 可能是家裡的桌機。 可能是 NAS。 可能是一台一直開著的 Linux box。 也可能只是我自己的筆電。 問題是,人一離開那個網路,Hermes dashboard 就變成一個只存在於 localhost 的東西。 我想在外面打開它。 但我沒有 static IP。 沒有買網域。 也不想進路由器開 port forwarding。 因為那條路通常長這樣: * 找 public IP * 設定 NAT * 開 port * 處理防火牆 * 補 HTTPS * 設定憑證 * 再擔心 origin IP 被掃 非常友善。 所以這篇先走另一條路:

By SteepingLogic
Invoshot 開發日記|正向回饋

Invoshot 開發日記|正向回饋

想信很多人在開發的時候都常常會做一件事,那就是: 不斷地反覆思考,在腦袋內把流程跑過很多次,然後思考哪裡可以做得更好 不限坐在電腦前的時後,可能是在捷運上,在人行道上, 在馬桶上或是在洗澡的時候 🤪 我不斷地在想:AI 辨識完一張發票後,使用者接下來最需要的是什麼? 每個欄位都要核對嗎? 這麼多欄位真的不會漏看嗎? 所以我在 Invoshot 裡加了提醒功能。 辨識結果出來後,系統會把比較需要注意的地方標出來。 不是把所有不確定都丟給使用者,而是把他真正需要介入的那幾秒鐘留出來。 今天收到一則訊息: 今天用了有新增提醒功能很棒! 真的有變輕鬆 😎 看到這句的時候,我第一個想到的是: 原來那些只是我腦內風暴的優化項目,使用者是真的可以感受到差異的! 感覺又有動力了!

By SteepingLogic