Gaze Guard Power Draw: How Much Battery Does Running MediaPipe in a Chrome Extension Cost?

How much battery does running MediaPipe face detection in a Chrome extension cost? Measured SoC-level numbers comparing monitoring on vs. off, with a GPU/ANE breakdown.

分享
Gaze Guard Power Draw: How Much Battery Does Running MediaPipe in a Chrome Extension Cost?
Photo by Panos Sakalakis on Unsplash

Background

Gaze Guard is a Chrome extension that uses your webcam to detect when someone is peeking at your screen from a distance. All processing happens locally.

The core: MediaPipe FaceLandmarker (WASM) runs continuous face detection at ~10 FPS inside an offscreen document, estimating distance and head orientation to decide whether to alert you.

I'd always wondered how much that background inference actually costs. The most direct question: monitoring on vs. off — what's the difference?

Bottom line: turning monitoring on costs about 277 mW more (SoC level), mostly from the GPU and ANE. That's roughly 12–17 minutes of MacBook Pro M4 battery life (~2.8%). Lowering the detection FPS barely helps.

How was it measured?

sudo powermetrics --samplers cpu_power,battery -i 5000 -n 1

One snapshot was taken in each of two states:

  • Idle: extension installed but monitoring off (no camera stream, no inference)
  • Monitoring: normal use, detecting continuously at 10 FPS

Test machine: MacBook Pro M4 Pro / macOS 15

⚠️ Only one snapshot per condition — single measurements are noisy, so treat this as a trend, not a precise figure.

On vs. off — how big is the gap? (SoC level)

State CPU GPU ANE SoC Total
Idle (monitoring off) 110 mW 78 mW 0 mW 188 mW
Monitoring 165 mW 259 mW 41 mW 465 mW
Delta +55 mW +181 mW +41 mW +277 mW

Turning monitoring on raises total SoC power from 188 mW to 465 mW — about 277 mW extra.


Which component draws the most?

1. The GPU is the main cost

Once monitoring starts, GPU power jumps from 78 mW to 259 mW (+232%) — the largest increase of the three blocks. Two sources:

  • Chrome's webcam pipeline: the video stream is handled by Chrome and runs constantly — the bulk of the GPU increase
  • MediaPipe detectForVideo() inference: the per-frame GPU cost of face detection

2. The ANE holds a steady +41 mW

Whenever monitoring is active, the Apple Neural Engine sits at 41 mW — a constant overhead after MediaPipe's WASM initialization, versus 0 when idle.

3. The CPU barely moves

CPU only rises from 110 mW to 165 mW (+55 mW). Inference and image processing land mostly on the GPU and ANE; the CPU isn't the bottleneck.


How much does it hit battery life?

Assuming a light workload draws 10 W total system power (screen, Wi-Fi, SSD, etc.):

Model Battery Idle Monitoring Loss
MBP M4 Pro 14" 72.0 Wh 7 h 12 min 7 h 00 min -12 min
MBP M4 Pro 16" 99.6 Wh 9 h 58 min 9 h 41 min -17 min

Monitoring costs roughly 2.8% of battery life — about 12–17 minutes.


Conclusion

Figure
Extra power with monitoring on +277 mW SoC (vs. idle)
Main sources GPU +181 mW, ANE +41 mW, CPU +55 mW
Battery-life loss ~12–17 min on a MBP M4 Pro (2.8%)

For a privacy tool that requires continuous local inference, 277 mW of overhead is acceptable. To save power, the effective approach isn't lowering the detection rate — it's pausing inference when no external face has been seen for a while. But that's a feature for another day.


FAQ

Does Gaze Guard drain the battery? Monitoring costs about 277 mW more than off. Under a light workload that's roughly 12–17 minutes of laptop battery (~2.8%) — an acceptable trade-off.

Does lowering the detection FPS save power? Barely. The bulk of the draw is Chrome's webcam pipeline and the GPU, and that cost is independent of FPS — so dropping the rate saves very little.

Which component uses the most power? The GPU sees the biggest jump (+181 mW), followed by the Apple Neural Engine (+41 mW); the CPU rises only 55 mW.


中文版:Gaze Guard 耗電量實測 Test date: 2026-06-17 / Extension version: v1.0.3 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