Project Info
This project did not submit a demo video on Devpost.
Inspiration
We were inspired by the emotional impact of losing a pet and wanted to create a tech-powered solution to help reunite animals with their families. Combining edge AI with remote sensing felt like the perfect fit for this challenge.
What it does
Raspberry Pet detects cats and dogs in real-time using a Raspberry Pi and Coral TPU. When a pet is spotted, it captures images and a short video clip, uploads them to Supabase Storage, and logs the detection for review in a web app — all without human supervision.
How we built it
We retrained and tuned a TensorFlow Lite object classification model (MobileNetV2) on a dataset of labeled pet images. The model runs on the Coral Edge TPU for low-latency inference. A motion detection pipeline using OpenCV on the Pi triggers the camera, processes detections, and uploads media and metadata to Supabase. The frontend is built with Flask, and detections appear in a live dashboard.
What's next
for RaspberryPet
🐾 Pet Finder – Pi Camera + Coral TPU + Flask Stream
Real-time object detection using a Raspberry Pi with a Pi Camera Module V2 and Coral USB Accelerator. Streams video over Flask. Training and model prep is done on a laptop, and inference runs on the Pi.
🔧 Raspberry Pi Setup (Bookworm 64-bit)
1. System packages
sudo apt update && sudo apt install -y \
python3-picamera2 v4l-utils libusb-1.0-0-dev libedgetpu1-std \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev git
2. Install pyenv
curl https://pyenv.run | bash
Then add to your ~/.bashrc:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
Restart your shell:
exec "$SHELL"
3. Python 3.9 + virtualenv
pyenv install 3.9.18
python3.9 -m venv ~/coral-venv --system-site-packages
source ~/coral-venv/bin/activate
4. Install Python packages
pip install -r requirements.txt
pip install --extra-index-url https://google-coral.github.io/py-repo/ tflite-runtime
pip install https://github.com/google-coral/pycoral/releases/download/v2.0.0/pycoral-2.0.0-cp39-cp39-linux_aarch64.whl
5. Run the stream
python stream.py
View at:
http://<your-pi-ip>:5000/video_feed
💻 Laptop Setup (Training + Model Prep)
1. Python env for training
pyenv install 3.9.18
'''
#### Create a virtual environment using Python 3.9
```bash
python3.9 -m venv coral-train
source coral-train/bin/activate
Alternative (if you prefer pyenv-virtualenv)
pyenv virtualenv 3.9.18 coral-train
pyenv activate coral-train
'''
#### Install training dependencies
```bash
pip install tensorflow-macos==2.13.0 numpy pandas opencv-python
2. (After building/tuning your model): Convert + compile model
tflite_convert --output_file=model.tflite ...
edgetpu_compiler model.tflite
3. Copy model to Pi
scp model_edgetpu.tflite pi@<pi-ip>:~/models/
🧠 Notes
- Uses
picamera2for fast streaming libedgetpu1-stdis installed (not max)- Tested on Raspberry Pi OS Bookworm 64-bit + Coral USB Accelerator
Analysis
View
Metric
- 17
- 6
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- TypeScriptIn code
- SupabaseClaimed
- TensorFlowClaimed
6 of 8 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
68 KB
Source files
26
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
annasehgal/PetPal
44 files · 292 KB · @ 8f19f4c
Structure
Interface
23 files · 52%Screens, components and styles rendered to the user.
Application logic
5 files · 11%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript84%
- Python12%
- Markdown3%
- HTML1%
- JavaScript0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
my-app/package.json
npm · 35- @expo/vector-icons
- @react-navigation/bottom-tabs
- @react-navigation/elements
- @react-navigation/native
- expo
- expo-audio
- expo-av
- expo-blur
- expo-constants
- expo-font
- expo-haptics
- expo-image
- expo-image-picker
- expo-linking
- expo-router
- expo-splash-screen
- expo-status-bar
- expo-symbols
- +17 more
requirements.txt
pypi · 3- Flask
- Flask-Migrate
- Flask-SQLAlchemy
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.