Smart Objects Cameras
SVA MFA Interaction Design · Winter 2026
Edit locally → Copy to Pi → Run on Pi
YOUR LOCAL COMPUTER LOCAL
smart-objects-cameras/
├── person_detector.py
├── fatigue_detector.py
├── gaze_detector.py
├── discord_bot.py
├── utils/
└── README.md
RASPBERRY PI REMOTE
~/oak-projects/
├── person_detector.py
├── discord_notifier.py
├── .env ← never in GitHub!
├── latest_frame.jpg
└── camera_status.json
On your local computer LOCAL
# Clone the repository
git clone https://github.com/[your-org]/smart-objects-cameras.git
cd smart-objects-cameras
On the Raspberry Pi REMOTE
# SSH into Pi
ssh orbit # or gravity, or horizon
# Create project directory
mkdir -p ~/oak-projects
Run these commands from your local computer (not on the Pi!):
# Navigate to your local repo
cd ~/path/to/smart-objects-cameras
# Copy the files you need
scp person_detector_with_display.py orbit:~/oak-projects/
scp discord_notifier.py orbit:~/oak-projects/
# For fatigue/gaze, also copy the utils folder
scp -r utils orbit:~/oak-projects/
orbit with gravity or horizon for other Pis.
More scp patterns:
Already configured (DO NOT MODIFY)
# These are set on each Pi:
DISCORD_WEBHOOK_URL=...
DISCORD_APPLICATION_ID=...
DISCORD_PUBLIC_KEY=...
DISCORD_BOT_TOKEN=...
# (OrbitBot / GravityBot / HorizonBot)
Check with: ls ~/oak-projects/.env
What you add (optional)
# Edit the existing .env:
nano ~/oak-projects/.env
# Add at the bottom:
DISCORD_USER_ID=your_discord_user_id
DISCORD_DM_BOT_TOKEN=your_dm_bot_token
Then secure: chmod 600 ~/oak-projects/.env
NEVER commit .env to GitHub! It contains secret tokens.
Every time you want to run a script on the Pi:
activate-oak first to load the shared Python environment. You should see (venv) appear before your prompt.
Tip: Use hostname to verify you are on the Pi (shows orbit, gravity, or horizon).
The edit-copy-run loop you will repeat every time you change code:
Each detector needs specific files on the Pi. Copy only what you need:
| Detector | Files to Copy | Notes |
|---|---|---|
| Person Detection | person_detector_with_display.pydiscord_notifier.py |
Notifier only if using --discord |
| Fatigue Detection | fatigue_detector.pyutils/ folderdiscord_notifier.py |
Copy utils/ with scp -r |
| Gaze Estimation | gaze_detector.pyutils/ folderdiscord_notifier.py |
Copy utils/ with scp -r |
| Discord Bots | discord_bot.pydiscord_dm_notifier.py |
Public bot + personal DM bot |
utils/. Copy it once and both detectors can use it.
git clone on the Pi. It creates unnecessary files and risks accidentally committing .env to GitHub. The repo belongs on your local computer only.
scp to the Pi. The Pi still runs the old version! Always run scp after every edit before re-running on the Pi.
git add .env. The .env file contains secret tokens (Discord bot tokens, webhook URLs) that would be publicly visible on GitHub.
.env on Pi, never the other way around.
| Action | Where | Command |
|---|---|---|
| Clone repo | LOCAL | git clone ... |
| Edit code | LOCAL | Use your favorite editor |
| Copy files | LOCAL | scp file.py orbit:~/oak-projects/ |
| Create .env | PI | nano ~/oak-projects/.env |
| Run scripts | PI | activate-oak && python3 script.py |
| Commit changes | LOCAL | git add, git commit, git push |
| Check which machine | Either | hostname |
orbit, and edit files directly on the Pi. No scp needed — drag and drop between local and remote windows works too.
Remember: Repo on laptop, files on Pi, run on Pi!