← all posts
// vision · vision-models

Vision models for camera-event understanding: privacy and security for visual inputs

Run motion detection and a plain object detector before you let a vision-language model anywhere near the frame. Only escalate to the VLM when the cheap stuff can't name what's happening: an unfamiliar layout, genuine ambiguity, a relationship between two objects, text mixed into the scene. That's the whole decision rule for a camera-event pipeline, and the rest of this is me explaining why I'd defend it in a design review.

Detect first, describe only when you must

The material is doorway cameras, workshop and warehouse floors, garden gates, the odd safety camera nobody remembers installing. The job is narrow: classify a bounded event from a handful of selected frames, keep the footage private, and don't fire the same alert three times for one event. Feed the model motion-gated frames, timestamps, camera zone metadata, and a short fixed vocabulary of events, not raw video and an open prompt asking it to describe what it sees. Narrow the question and you can measure whether the model is any good. Leave it open and you're grading vibes.

Every frame that reaches the model carries more than the event you asked about. A face in the background, a monitor showing somebody's inbox, a delivery label, a street sign caught in a window reflection: all of it rides along whether you wanted it there or not. That's the leak. Collection minimization, redaction, retention limits, access control, and safe handling of any text sitting inside the frame aren't optional extras bolted onto a vision pipeline; they are the pipeline. A motion detector and a bog-standard object detector never see any of that background material unless you deliberately go looking for it, which is exactly why they run first and the language model runs second, only on the frames the simple stuff already flagged as worth a second look.

What the log has to prove (visionmodels)

Before any of this touches a prompt, map every frame and thumbnail that gets stored, crop or redact before upload, keep tenants isolated from each other, and treat any text visible inside the image as untrusted input, not instructions. Keep the original asset and write down every transformation you applied before the model ever saw the pixels, because "the model was wrong" and "the crop threw away the evidence" are different bugs with different fixes. An evaluation record for this kind of pipeline needs to hold more than a model name and a verdict:

model + runtime + prompt revision
source dimensions, crop, resize, rotation
frame count, order, capture timestamps
OCR text or metadata attached alongside pixels
token accounting: visual, input, output
time to first token, total latency, peak memory
verdict: grounded, unsupported claim, abstain, repair

If the provider exposes an image-detail or resolution setting, log the value it actually used, not the default you assumed. For anything you run locally, log the vision projector, the quantization, the context length, and which preprocessing code produced the tensor the model saw. Text weights pulled from one release and a projector pulled from another can pair up, load without complaint, and answer fluently while quietly making things up; the harness will look healthy the whole time. The acceptance gate is event precision and recall, duplicate-alert rate, latency, privacy retention, and how often the model abstains when it should. Score an unsupported claim separately from a missing one. A model that says "I can't tell" costs you a manual review; a model that invents a serial number, a UI control, or an identity costs you a wrong action taken with confidence. Put genuinely unanswerable frames in the eval set and reward the model for saying so.

How one clue becomes a verdict

The failure that actually bites is a model turning one uncertain visual clue into a confident identity, hazard, or security conclusion, and it survives review because the answer usually matches what a person expected to see anyway. A close cousin of that failure is calling a system "private" because inference runs locally while the raw frames sit in logs and backups indefinitely; local-only says nothing about retention. Require a region, frame, or visible feature behind every conclusion that matters, and show that evidence to the reviewer instead of burying it in a log nobody opens. Split the prompt into four layers with different evidence and different authority: "there's a red indicator at the upper right" is observation, "it belongs to the network panel" is association, "the connection has failed" is inference, "restart the gateway" is an action, and none of them should let the next one skip its own check. Don't let a plausible observation walk straight into an irreversible tool call. Multiple images add an identity problem on top: label each input, state whether they show the same object or camera or time period, drop duplicate frames that burn tokens without adding evidence, and when order matters, attach timestamps and test a shuffled control. A model that tells the same causal story after you scramble the frame order isn't using the sequence. It's pattern-matching a genre.

Retention has to be set per asset type, not once for "the pipeline": originals, thumbnails, OCR text, embeddings, prompts, and debug captures each get their own clock, and a local model buys you less than people assume if the disk is unencrypted or the dashboard account can see everything anyway. Hosted and local paths get tested differently, too. For a hosted route like Gemini CLI's multimodal mode, the numbers that matter are upload time, regional routing, retention settings, rate limits, and how the provider fails. For something local, closer to how Ollama serves vision models, it's cold load time, projector memory, CPU/GPU placement, preprocessing time, heat, and concurrency. Compare the whole path at p50 and p95, not generation tokens per second, because that number flatters you and hides the parts a user actually waits through. Stop optimizing once the gate passes at an acceptable latency, cost, and abstention rate. A bigger model and more pixels are not automatically safer; they're more surface area for a private detail to leak and more room for the model to answer past what the evidence supports.

What I still don't have a good answer for is catching a projector mismatch from the outside. The server loads, the endpoint responds, the text reads fine, and nothing in a standard health check tells you the vision half has quietly come loose from the language half. Short of hand-building a small regression set of images with known answers and rerunning it after every local upgrade, I don't know how you'd catch this before a user does. I haven't built that regression set yet.

#vision-models#multimodal#evaluation