Skip to content

KySm227/EmotiScan

Repository files navigation

Meet AI Extension

AI assistant + computer vision overlay for Google Meet.
Built with Python Flask · MediaPipe · Anthropic Claude API · Chrome Extension (MV3)


Architecture

meet-ai-extension/
├── backend/
│   ├── app.py          ← Flask server (AI chat + vision API + WebSocket)
│   ├── vision.py       ← MediaPipe face mesh + attention scoring
│   └── requirements.txt
├── extension/
│   ├── manifest.json   ← Chrome Extension MV3
│   ├── content.js      ← Injected into Google Meet
│   └── sidebar/
│       └── sidebar.css ← Island styles
├── test_page/
│   └── index.html      ← Standalone test environment (no Chrome needed)
└── .vscode/
    └── launch.json     ← One-click run in VSCode

Quick Start

1. Install Python dependencies

cd backend
pip install -r requirements.txt

macOS/Linux: if mediapipe fails, try pip install mediapipe --pre
Windows: use pip install mediapipe-silicon on Apple Silicon

2. Set your Anthropic API key

export ANTHROPIC_API_KEY="sk-ant-..."
# Windows PowerShell:
$env:ANTHROPIC_API_KEY="sk-ant-..."

3. Run the Flask server

Option A — VSCode (recommended)

  • Open the project folder in VSCode
  • Press F5 or go to Run → Start Debugging → "▶ Run Meet AI Server"

Option B — Terminal

cd backend
python app.py

Server starts at http://localhost:5000

4. Test in your browser (no extension needed)

Open http://localhost:5000 — you'll see the full simulated Google Meet environment with the AI island.

  • Click 👁 to activate computer vision (requires camera permission)
  • Type in the chat box to talk to the AI assistant
  • Click ⬜ to toggle compact view (shrinks island, keeps camera visible)
  • Drag the island by its header to reposition
  • 🧠 button toggles whether vision data is sent as context to the AI

Loading the Chrome Extension

Once you're happy testing locally, load it into Chrome:

  1. Go to chrome://extensions
  2. Enable Developer mode (top right toggle)
  3. Click Load unpacked
  4. Select the extension/ folder
  5. Join any Google Meet call — the island appears automatically

The extension communicates with your local Flask server (localhost:5000), so keep it running.


Features

Feature Description
AI Assistant Claude-powered chat with full conversation history
Vision context Face detection + head pose → attention score sent to AI
Emotion insights Server returns a very short suggestion based on predicted remote emotion. Feedback appears periodically in the island.
Compact mode Shrinks island to camera + status bar — looks like a camera preview
Gaze detection Estimates yaw/pitch from face landmarks, warns on attention drift
Draggable island Reposition anywhere on screen
WebSocket frames Real-time frame analysis via Socket.IO
Graceful fallback Works without camera; AI chat still functions without vision

Attention Score

The attention score (0–100%) is derived from head pose:

  • > 65% → green ring (looking at screen)
  • 40–65% → yellow ring (slight drift)
  • < 40% → red ring + alert shown

This keeps the assistant subtle — the compact view with a small camera preview looks entirely natural in a meeting context, so participants won't notice you're consulting the AI.


Environment Variables

Variable Required Description
ANTHROPIC_API_KEY Your Claude API key
FLASK_ENV Optional Set development for hot reload logs

Customisation

Change the AI personality → edit the system prompt in backend/app.py
Change analysis frequency → adjust the 1100 ms timeout in test_page/index.html / extension/content.js
Adjust attention thresholds → edit _attention_from_pose() in backend/vision.py
Compact size → adjust .mai-compact in sidebar/sidebar.css

About

Facial detector

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors