Project Info
This project did not submit a demo video on Devpost.
What inspired us to build it Guns are now the leading cause of death among American children and teens, with 1 in every 10 gun deaths occurring in individuals aged 19 or younger. School shootings, in particular, have become a tragic epidemic in the U.S., underscoring the urgent need for enhanced safety measures. Our team united with a shared vision to leverage AI technology to improve security in American schools, helping to protect children and ensure their safety.
What it does
Our product leverages advanced AI technology to enhance school safety by detecting potential threats in real-time. By streaming surveillance footage, our AI system can identify weapons, providing instant alerts to security personnel and administrators. In addition to visual monitoring, we integrate audio streaming to analyze changes in sentiment, such as raised voices or signs of distress. This dual approach—combining visual and auditory cues—enables rapid response to emerging threats.
How we built it
We partnered with incredible sponsors—Deepgram, Hyperbolic, Groq, and Fetch.AI—to develop a comprehensive security solution that uses cutting-edge AI technologies. With their support, we were able to conduct fast AI inference, deploy an emergency contact agent, and create intelligent systems capable of tracking potential threats and key variables, all to ensure the safety of our communities. For real-time data processing, we utilized Firebase and Convex to enable rapid write-back and retrieval of critical information. Additionally, we trained our weapon detection agent using Ultralytics YOLO v8 on the Roboflow platform, achieving an impressive ~90% accuracy. This high-performance detection system, combined with AI-driven analytics, provides a robust safety infrastructure capable of identifying and responding to threats in real time.
Challenges we ran into
Streaming a real-time AI object detection model with both low latency and high accuracy was a significant challenge. Initially, we experimented with Flask and FastAPI for serving our model, followed by trying AWS and Docker to improve performance. However, after further optimization efforts, we ultimately integrated Roboflow.js directly in the browser using a Native SDK. This approach gave us a substantial advantage, allowing us to run the model efficiently within the client environment. As a result, we achieved the ability to track weapons quickly and accurately in real time, meeting the critical demands of our security solution.
Accomplishments we're proud of
We are incredibly proud of the features our product offers, providing a comprehensive and fully integrated security experience. Beyond detecting weapons and issuing instant alerts to law enforcement, faculty, and students through AI-powered agents, we also implemented extensive sentiment analysis. This enables us to detect emotional escalations that may signal potential threats. All of this is supported by real-time security data displays, ensuring that key decision-makers are always informed with up-to-the-minute information. Our system seamlessly brings together cutting-edge AI and real-time data processing to deliver a robust, proactive security solution.
What we learned
We learned that the night is darkest right before the dawn... and that we need to persevere and be steadfast as a team to see our vision come to fruition.
What's next
We want to get incorporated in the American school system!
🛡️ Watchdog: AI-Powered School Safety System
Images
Weapon Detection
Alert System
Police Report
Real-time voice analysis
🚀 Inspiration
Gun violence is now the leading cause of death among American children and teens, with 1 in every 10 gun fatalities involving individuals aged 19 or younger. In the U.S., school shootings have escalated into a tragic epidemic, underscoring the urgent need for enhanced security in schools. United by a shared vision, our team leveraged AI technology to create a platform aimed at improving school safety, protecting children, and giving peace of mind to students, parents, and educators alike.
🎯 What It Does
Watchdog uses advanced AI to enhance school security by detecting threats in real-time. Our platform streams live surveillance footage, leveraging AI to identify weapons and other indicators of potential violence, and issues instant alerts to security personnel and administrators. Additionally, our audio streaming feature detects sentiment changes, such as raised voices or distress signals, allowing security teams to respond rapidly to unfolding threats. By combining visual and auditory cues, Watchdog offers a comprehensive and proactive approach to school safety.
🛠️ How We Built It
With the support of our incredible sponsors—Deepgram, Hyperbolic, Groq, and Fetch.AI—we developed a robust AI security solution. Here’s an overview of our tech stack and approach:
- Real-Time Data Processing: Integrated Firebase and Convex for rapid data retrieval and write-back to facilitate real-time communication and alerts.
- Weapon Detection: Trained an agent using Ultralytics YOLO v8 on the Roboflow platform, achieving ~90% accuracy in weapon detection.
- Audio Analysis: Implemented sentiment analysis through Deepgram’s API to detect audio patterns like raised voices, signaling potential distress.
- Model Deployment: We experimented with Flask and FastAPI for model serving and explored AWS and Docker to optimize performance. Ultimately, we chose to implement Roboflow.js directly in the browser with a Native SDK, enabling fast and efficient model inference on the client side.
🧩 Challenges We Encountered
Achieving low latency and high accuracy with real-time AI object detection presented challenges, especially during initial model deployment. We experimented with various backends and infrastructures but ultimately found that running the model directly in the browser yielded optimal results. By leveraging Roboflow.js's Native SDK, we achieved efficient tracking with fast response times, meeting the stringent performance requirements of our safety solution.
🏆 Key Accomplishments
We’re proud of the capabilities we built into Watchdog:
- Instant Weapon Detection: Our AI agents quickly detect weapons and alert law enforcement, faculty, and students in real-time.
- Sentiment Analysis: Integrated sentiment detection to identify emotional escalations that could indicate potential threats.
- Comprehensive Data Display: We developed real-time data dashboards that provide school officials and security teams with up-to-the-minute information, helping them make informed decisions swiftly.
- Integrated AI-Driven Safety Solution: Bringing together visual and auditory detection in a unified system, Watchdog offers a robust, proactive approach to school security.
💡 What We Learned
Building Watchdog reinforced our belief in the power of perseverance. We learned that each challenge pushed us closer to our goal, and that by standing firm as a team, we could achieve our vision of a safer learning environment.
🚀 What's Next for Watchdog
Our ultimate vision is to see Watchdog incorporated into the American school system, providing a safer educational environment across the nation.
🛠️ Built With
- AI & Machine Learning: Ultralytics YOLO v8, Roboflow
- Audio Analysis: Deepgram API
- Data Management: Firebase, Convex
- Backend: Roboflow.js Native SDK, Flask, FastAPI, AWS, Docker
- Real-Time Streaming & Dashboard: Custom JavaScript integrations with Convex
Analysis
View
Metric
- 3
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
- CSSIn code
- FirebaseIn code
- JavaScriptIn code
- Next.jsIn code
- OpenAIIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- ExpressClaimed
- PythonClaimed
8 of 10 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
122 KB
Source files
51
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
oviozz/watchDog-UC-Berkeley-2025-
62 files · 501 KB · @ fb90dc6
Structure
Interface
30 files · 48%Screens, components and styles rendered to the user.
API & routing
2 files · 3%Request entry points: routes, handlers and controllers.
Application logic
19 files · 31%Domain rules, services and shared utilities.
+2 more
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
- JavaScript84%
- TypeScript7%
- CSS5%
- Markdown4%
- XML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 37- @deepgram/sdk
- @radix-ui/react-dialog
- @radix-ui/react-icons
- @radix-ui/react-slot
- @tensorflow-models/coco-ssd
- @tensorflow/tfjs
- @uploadthing/react
- class-variance-authority
- clsx
- convex
- cross-fetch
- dotenv
- firebase
- firebase-admin
- framer-motion
- inferencejs
- lucide-react
- moment
- +19 more
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.
Feature verification
Automatic weapon alert dialog shown to security personnel/adminsVerified
Instant alerts are provided to security personnel and administrators when a weapon is detected
Claimed on Devposthigh confidencesrc/components/WeaponAlertDialog.jsx:26— Subscribes to getUnnotifiedAlerts via Convex useQuery and opens a dialog automatically when a new unnotified alert exists
Convex real-time data processingVerified
Integrated Convex for rapid data retrieval and write-back to facilitate real-time communication and alerts
Claimed on readmehigh confidenceconvex/schema.js:6— Defines an alerts tableconvex/securityAlert.js:6— Mutations/queries/actions (insertAlert, createSecurityAlert, getUnnotifiedAlerts, getRecentAlerts) implement the real-time alert pipeline via Convex
Groq fast AI inferenceVerified
Used Groq for fast AI inference
Claimed on Devpostmedium confidenceconvex/imageAnalysis.js:50— ImageAnalysisService posts to GROQ_CONFIG.API_URL with a Groq-style bearer token for image analysis
Real-time audio streaming transcriptionVerified
Audio streaming is integrated to analyze changes in sentiment such as raised voices
Claimed on Devposthigh confidencesrc/app/voice/page.jsx:39— connectToDeepgram is called with live nova-2 model config and mic audio chunks are streamed via connection.send(e.data)src/providers/DeepgramContextProvider.jsx:1— Provides the live Deepgram connection context used by the voice page (file exists to support live transcription)
Sentiment/distress analysis on transcribed speech (raised voices, emotional escalation)Verified
Sentiment analysis detects emotional escalations such as raised voices or signs of distress
Claimed on readmehigh confidencesrc/app/voice/SecurityAudioAnalysis.jsx:45— Calls Deepgram's /v1/read endpoint with sentiment=true, custom_topic=guns,killing,weapons,knife,gun,shooting and intents=true, then renders sentiment/topic/intent charts from the response
Weapon detection via Groq vision analysis triggered from live camera feed, creating a Convex alertVerified
AI system identifies weapons from streamed surveillance footage and provides instant alerts
Claimed on readmehigh confidencesrc/app/(dashboard)/_components/right/LiveCameraFeed.jsx:79— Captures a camera frame, calls imageAnalysisService.analyzeImage(base64Image) and passes the groqResult into createSecurityAlertconvex/imageAnalysis.js:45— Sends the image to a Groq-style chat completions endpoint with a security prompt and parses a weapon/person JSON resultconvex/securityAlert.js:25— createSecurityAlert action writes the weapon/suspect data into the alerts table via insertAlert
Comprehensive real-time security data dashboard for decision-makersCode-supported
Real-time security data displays ensure decision-makers are always informed with up-to-the-minute information
Claimed on Devpostmedium confidencesrc/app/(dashboard)/_components/left/RecentThreats.jsx:49— Live Convex query renders recent threats dynamicallysrc/app/(dashboard)/_components/right/SecurityLog.jsx:22— Security Event Log panel only renders three hardcoded static messages/timestamps, not a real live logsrc/app/(dashboard)/_components/left/ThreatIndicator.jsx:9— Component body has no return statement (just a stray <h1>a</h1> and an unused useQuery import), so it renders nothing; this piece of the dashboard is unfinished/dead code
In-browser real-time weapon detection using Roboflow.js on the /cctv pageCode-supported
Roboflow.js Native SDK runs the YOLOv8 weapon detection model directly in the browser for real-time tracking
Claimed on readmemedium confidencesrc/app/cctv/page.jsx:12— Loads the Roboflow.js CDN script and renders the detection componentsrc/app/cctv/WeaponObjectDetectionVideo.jsx:82— Loads a Roboflow model named weapon-detection-3esci and runs detect() on the webcam stream, but the detection logic inside detect() only checks for classes 'garbageTruck', 'garbagePickingUp' and 'GarbageBin' (leftover from an unrelated trash-detection template), so no weapon-specific alerting logic actually exists on this page
Interactive floor plan / building map with security zonesCode-supported
Track potential threats and key variables with real-time visualization of building layout and security zones
Claimed on Devpostmedium confidencesrc/app/(dashboard)/_components/right/BuildingMap.jsx:18— Embeds a third-party Mappedin iframe for the floor plan; no code wires live alert/zone data into the map itself
Automatic real-world notifications to law enforcement/faculty/students and security team deploymentClaimed only
AI-powered agents issue instant alerts to law enforcement, faculty, and students, with security team deployed
Claimed on Devposthigh confidenceChroma vector database usageClaimed only
Built with chroma (listed in Devpost Built With)
Claimed on Devposthigh confidenceExpress.js backendClaimed only
Built with express.js (listed in Devpost Built With)
Claimed on Devposthigh confidenceFetch.AI emergency contact agentClaimed only
Deployed an emergency contact agent using Fetch.AI
Claimed on Devposthigh confidenceFirebase real-time data processingClaimed only
Utilized Firebase for rapid write-back and retrieval of critical information
Claimed on readmehigh confidenceHyperbolic integration for AI inferenceClaimed only
Partnered with Hyperbolic to develop the security solution / conduct fast AI inference
Claimed on Devposthigh confidencePolice report generationClaimed only
Police Report feature shown in README screenshot
Claimed on readmehigh confidenceQuick emergency resource actions (call 911, alert security, contact police)Claimed only
Comprehensive security experience including emergency contact options for law enforcement and students
Claimed on Devposthigh confidenceWeapon detection model trained with Ultralytics YOLOv8 on Roboflow achieving ~90% accuracyBlocked
Weapon detection agent trained using Ultralytics YOLO v8 on Roboflow, achieving ~90% accuracy
Claimed on Devpostlow confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.