SMART OBJECTS

OAK-D + Raspberry Pi 5

Template for Discord bots with computer vision

SVA MFA Interaction Design ยท Winter 2026

OVERVIEW

What's Included

๐Ÿ‘๏ธ Person detection (YOLO) ๐Ÿ˜ด Fatigue detection (EAR) ๐Ÿ‘€ Gaze estimation ๐Ÿ“ Whiteboard OCR ๐Ÿค– Discord bot commands ๐Ÿ“ข Webhook notifications ๐ŸŽฏ Temporal smoothing ๐Ÿ–ผ๏ธ Live screenshots
Pre-configured: Your instructor set up the Pis โ€” just connect and start!

HARDWARE

Three Camera Stations

CameraHostnameRAMAccess
Orbitorbit16GBSSH + VNC
Gravitygravity16GBSSH + VNC
Horizonhorizon16GBSSH + VNC

VNC: one desktop user at a time ยท SSH: multiple users OK

IMPORTANT

Repo Stays on Your Laptop

Your Laptop

  • Clone the GitHub repo
  • Edit code locally
  • Copy files via scp

Raspberry Pi

  • Receives Python files
  • Has .env with secrets
  • Runs the detectors

See WORKFLOW.md for details.

CONNECTING

Three Ways to Access

MethodBest ForCommand
SSHTerminal accessssh orbit
VNCDesktop GUIRealVNC Viewer โ†’ orbit
VS CodeFull dev environmentRemote-SSH extension
Recommended: VS Code Remote-SSH gives you the best editing experience.

RUNNING CODE

Activate Environment First

$ ssh orbit
$ activate-oak
$ cd ~/oak-projects

Then run any detector:

# Person detection
python3 person_detector.py --display

# Fatigue detection with DM notifications
python3 fatigue_detector.py --dm

# Gaze estimation
python3 gaze_detector.py --display --log

OPTIONS

Common Flags

FlagWhat It Does
--displayShow live video window (VNC/X11)
--logSave events to timestamped log file
--discordSend notifications to class channel
--dmSend personal DM notifications
--threshold 0.7Set detection sensitivity (0.0โ€“1.0)

Combine flags: python3 fatigue_detector.py --display --log --dm

PROJECT

File Structure on Pi

/opt/oak-shared/
โ””โ”€โ”€ venv/                    # Shared Python environment

~/oak-projects/
โ”œโ”€โ”€ person_detector.py       # Person detection (YOLO)
โ”œโ”€โ”€ fatigue_detector.py      # Fatigue detection (EAR)
โ”œโ”€โ”€ gaze_detector.py         # Gaze estimation
โ”œโ”€โ”€ whiteboard_reader.py     # OCR text detection
โ”œโ”€โ”€ discord_bot.py           # Bot for commands
โ”œโ”€โ”€ utils/                   # Helper modules
โ”œโ”€โ”€ depthai_models/          # Model YAML configs
โ”œโ”€โ”€ .env                     # Your Discord tokens
โ””โ”€โ”€ *.log                    # Detection logs

REFERENCE

Quick Commands

# Activate environment
activate-oak

# Check if camera is connected
python3 -c "import depthai as dai; \
  print(dai.Device.getAllAvailableDevices())"

# View logs
tail -f ~/oak-projects/*.log

# Stop a running script
Ctrl+C

VS CODE

Remote SSH Setup

  1. Install VS Code + "Remote - SSH" extension
  2. macOS: Grant Local Network permission in System Settings
  3. Ctrl+Shift+P โ†’ "Remote-SSH: Connect to Host"
  4. Select orbit (or gravity, horizon)
  5. Open folder: /home/[username]/oak-projects
  6. Select Python interpreter: /opt/oak-shared/venv/bin/python

DISCORD

Two Integration Options

Webhooks (Simple)

One-way notifications. Run with --discord flag.

โ†’ discord-integration.md

Bot (Advanced)

Two-way commands: !status, !screenshot, etc.

โ†’ DISCORD_BOT_PLAN.md

Camera bots already configured! OrbitBot, GravityBot, HorizonBot are ready to use.

EXTEND

Next Steps

  • Different models โ€” Browse models.luxonis.com
  • Depth features โ€” Use the OAK-D's stereo cameras
  • Multi-camera โ€” Coordinate all three Pis
  • Cross-detector fusion โ€” Combine fatigue + gaze + person count

See NEXT_IDEAS.md for detailed project ideas.

RESOURCES

Learn More

Quick StartStudent Quickstart Slides
CommandsCheatsheet Slides
VersionsWorking Versions
DepthAI Docsdocs.luxonis.com
GitHub Repokandizzy/smart-objects-cameras

SMART OBJECTS

Start Building!

Clone the repo, connect to a Pi, and run your first detector.

$ ssh orbit && activate-oak && python3 person_detector.py --display