Inspiration

Most camera systems are either too simple or too noisy. Motion detection triggers constantly, but it still misses the things that actually matter. Walking through real spaces like offices and stores made it clear: security depends on where something happens, not just that it happens.

At the same time, many modern surveillance tools rely on cloud processing, raising privacy concerns and slowing response times. We wanted to build a system that could react immediately to real threats while keeping all data on-device.


What it does

ThreatLens is a local-first spatial surveillance dashboard. It maps live camera feeds directly onto floor plans, giving cameras context about the space they monitor.

  • Users can define natural-language rules for specific areas (like restricted zones or counters).
  • The system also detects suspicious behavior autonomously, even without explicit rules.
  • When a violation or threat occurs, it alerts immediately, assigns a severity level, and logs a clear incident with a snapshot and context.
  • A built-in conversational AI assistant can summarize active threats, answer questions about incidents, and even resolve or dismiss violations based on user prompts.
  • Optional SMS notifications can be sent for critical events.

All processing happens entirely offline, so no video data ever leaves the device.


How we built it

  • Vision-Language Models (VLMs) run locally via Ollama to analyze live camera frames and reason about activity.
  • PostgreSQL stores blueprints, camera metadata, system state, and incident logs.
  • Users upload multiple floor plans, drag and drop cameras onto them, rotate them to match real-world orientation, and visualize coverage to identify blind spots.
  • A real-time pipeline handles detection, severity classification, incident logging, and alerts without cloud dependency.
  • The dashboard includes a global view for all cameras and individual views for focused investigation and rule management.
  • The conversational AI interacts with the user in natural language, letting them query threats or resolve incidents directly from the interface.

Challenges we ran into

  • Reducing false alerts: Balancing autonomous detection with user-defined rules to avoid noisy notifications.
  • Spatial accuracy: Aligning cameras and calculating fields of view precisely while keeping the interface intuitive.
  • Performance: Handling multiple live streams entirely on-device without lag or crashes.
  • AI interaction: Ensuring the conversational assistant could reliably understand prompts and take correct actions without introducing errors.

Accomplishments that we're proud of

  • Built a fully offline, real-time system capable of detecting both rule-based violations and autonomous threats.
  • Designed a clean, spatially accurate UI with blindspot visualization and multiple floor plan support.
  • Integrated immediate alerting and severity classification for actionable monitoring.
  • Added a conversational AI assistant that can summarize threats and resolve incidents on demand, making the system much easier to manage in real time.

What we learned

  • Security tools are far more effective when they understand context and space, not just motion.
  • Privacy and capability don’t have to be trade-offs—powerful detection and AI assistance can happen entirely on-device.
  • Balancing rules, autonomous detection, and conversational AI requires careful iteration and user testing.

What's next for ThreatLens

  • Expand multi-building and outdoor coverage support.
  • Add automatic pattern learning to detect new suspicious behaviors over time.
  • Improve AI reasoning and alert prioritization to help users respond faster.
  • Explore integration with existing security hardware while keeping the system local-first.
Share this project:

Updates