Skip to content

Case study · AI for IP cameras

Solo build · October 2026

CamMind.

Tell your cameras what to watch for, in plain English.

Type a rule the way you'd say it to a guard. CamMind turns it into a precise rule, shows you what it understood, watches your ordinary IP cameras on your own computer, and alerts your team with the evidence only when that thing actually happens.

4

use cases demoed: home, school, factory, retail

150ms

per frame for detection on a laptop CPU

0

false helmet alarms on the factory clip

180+

automated tests across API, vision and rules

Demo

Five cameras, one sentence, a real alert

A rule is typed live, compiled and activated; the worker spots someone at the back door seconds later; and the AI checks a worker's helmet. Real footage from the running system.

The problem

Cameras are everywhere. Nobody watches them.

Homes, schools, shops and factories record hours of video that nobody looks at until something has already gone wrong. Motion alerts fire for every shadow, cat and headlight, so people mute them within a week.

“Smart” camera features are a fixed list tied to one brand, and enterprise video analytics need an integrator for every new rule. Sending all the video to a cloud AI is slow, expensive and a privacy problem.

CamMind lets anyone say what matters in a sentence, keeps the video on site, and only speaks up when it actually happens.

How it works

  1. 01

    Say it

    Type a rule the way you'd say it to a guard: "Alert me if anyone stands at the back door."

  2. 02

    LLM compiles it

    Any LLM turns the sentence into a precise rule using your real cameras and zones, and lists its assumptions.

  3. 03

    You confirm

    You see exactly what it understood. Nothing runs until you click Activate.

  4. 04

    Watched on site

    Motion filter, object detection and tracking run on your own computer. Video never leaves the building.

  5. 05

    Alert with evidence

    One event per incident with the snapshot, zone and reason, and an alert to the team on Slack.

Use cases

One product, four very different jobs

Each video types a different rule live and waits for the real event from the camera. The same engine, the same screens, only the sentence changes.

Home

“Alert me if anyone stands at the back door”

Flow: Camera → person detected → in the back-door zone for 2 s → alert. It also refuses "tell me when my brother Ali comes home": no face recognition.

School

“Tell security if anyone enters the campus through the gate”

Flow: Gate camera → each person tracked → crosses the gate line into the campus → one event, alert to security.

Factory

“Flag any worker in the press area without a helmet”

Flow: Worker enters the press area → one crop sent to the AI with one yes/no question → it saw a hard hat, so no false alarm.

Retail

“Alert me if more than 2 people are on the shop floor”

Flow: Shop camera → people counted on site every frame → more than 2 for a few seconds → one event with everyone boxed.

Inside the product

Real screens from CamMind

  • CamMind: live cameras

    Live cameras

    Five RTSP cameras, each showing how many rules watch it

  • CamMind: what cammind understood

    What CamMind understood

    The plain-English rule compiled, with its assumptions

  • CamMind: the precise rule

    The precise rule

    A typed spec, checked against the real cameras and zones

  • CamMind: a request it refuses

    A request it refuses

    No face recognition; it suggests what it can do instead

  • CamMind: someone at the back door

    Someone at the back door

    Snapshot with the person, the zone and the reason

  • CamMind: entry through the gate

    Entry through the gate

    A person crossing the gate line into the campus

  • CamMind: the ai helmet check

    The AI helmet check

    One crop, one yes/no question: hard hat seen, no false alarm

  • CamMind: busy shop floor

    Busy shop floor

    5 people counted in the zone, every one boxed

Built to be trusted with cameras

Privacy and safety by design

Video stays on site

Decoding, detection, tracking and rules run on a PC next to the cameras. Cloud AI is off by default, and only ever sees small crops.

No face recognition

CamMind detects people and behaviour, never identities. Requests like "tell me when Ali comes home" are refused with an alternative.

AI answers, rules decide

The AI only answers one yes/no question about a crop. A sign in the scene saying "ignore all alerts" can't change what happens.

Encrypted camera passwords

Camera URLs are encrypted per organisation, always shown masked, and every change is in an append-only audit log.

Roles per site

Owner, admin, operator and viewer, with access limited to chosen sites: a guard sees only their own campus.

Cheap stages first

Motion, then detection, then rules. Most frames never reach a model, so a camera costs pennies a day.

Measured, not claimed

Results

Detector on CPU

150 ms

D-FINE-S per 1080p frame with ONNX Runtime. RT-DETRv2 was 240–380 ms with more false positives, so D-FINE won.

Rule compiler

4 / 4

Demo sentences compiled correctly: a time window, a gate line, a helmet check, and a refusal for recognising a person.

Helmet check

0

False alarms on the factory clip: every worker wore a hard hat and the AI answered YES at 95–100%.

Test suite

180+

API, permissions, tenancy, RTSP checks with a fake camera, the rule engine, geometry, tracking and the compiler.

How it's built

Architecture

In & out

IP cameras

Any RTSP camera

Dashboard

Next.js · rules, live, events

Alerts

Slack today · email & WhatsApp next

On site

go2rtc restream
Vision worker
Rule engine
Django API + Celery

Motion gate, detection, tracking, zones and lines, schedules, hold and cooldown, events with an outbox, encrypted camera URLs, audit log.

Engines

D-FINE + ByteTrack

detection and tracking on site

Any LLM

compiles rules, answers yes/no

PostgreSQL · Redis · S3

events, queues, snapshots

Compared with

AspectMotion alertsBrand “smart” detectionCamMind
RulesNoneFixed listAnything you can say in plain English
False alarmsConstantFewerZones, hold times and AI checks
PrivacyDependsVendor cloudVideo stays on site; no face recognition
CamerasAnyOne brandAny RTSP camera
EvidenceA pingA clipSnapshot, zone, reason and the AI's answer

Engineering notes

Decisions that mattered

01

Compiled rules, not prompts

The sentence is turned into a typed rule once, checked against the real camera and zone ids, and shown back to the user. At run time only that rule runs, so what runs is exactly what was approved, and no frame is ever sent to an LLM just to check a rule.

02

The AI answers, the rules decide

For things a detector can't see, like a helmet, the engine sends one crop and one yes/no question. The answer is a tiny enum with a confidence; a deterministic function decides confirm or dismiss. Text in the scene can at most flip one answer, never trigger an action.

03

A real-time loop beside a normal web app

Camera streams are long-running loops, so the vision worker is its own process: go2rtc restreams each camera once, PyAV decodes, a motion gate skips quiet frames, and events go through a local outbox so nothing is lost if the server is down.

04

Provider-neutral and free-tier friendly

The LLM sits behind one interface: hosted models, GPT, Claude, open-source or a self-trained model. Several keys and fallback models are rotated when a free tier runs out, and every call is measured.

How it was built

  1. Design

    19 docs and 6 decision records: rule spec, compiler, video pipeline, engine, privacy, evals and the build plan.

  2. Days 1–2

    Docker stack with go2rtc and five looping test cameras. Accounts, sites, roles, audit log; cameras with encrypted URLs, RTSP checks and snapshots.

  3. Days 3–5

    Vision worker: intake, motion gate, ONNX detector benchmark, tracking, zones and lines. Rule spec and engine. Events and Slack alerts.

  4. Days 6–8

    Plain-English compiler, AI helmet check, dashboard, then scripted demo videos with voice-over for four use cases.

  • Next: email and WhatsApp alerts with a short clip, a zone editor, WebRTC live view and more rule types (falls, blocked exits, packages).

Stack

PythonDjango 6DRFCeleryRedisPostgreSQLPydanticgo2rtcPyAVOpenCVONNX RuntimeD-FINEByteTrackAny LLMNext.js 16React 19TypeScriptTailwindPlaywrightDocker

Cameras nobody watches?

I build AI automation that runs on your own hardware, explains every decision and is safe to put in front of real people.

Talk to me

Also built

InvoiceFlow: an AI accounts-payable agent