← all posts
// vision · vision-models

Vision models for camera-event understanding: local, hosted, and hybrid vision deployment

A motion-gated camera does not send a vision model a photograph. It sends a resized, cropped, tiled representation squeezed into a fixed token budget. On doorway, workshop, warehouse, garden, and safety-camera frames, that loss is real: a fluent answer can come back fully grounded, partially grounded, or built around a detail cropped away before inference started.

The job worth building for is narrow: classify a bounded event, package left, gate open, someone in the garden after dark, from a handful of selected frames, while keeping the alert rate sane and the footage private. The real input is motion-gated frames, a timestamp, camera zone metadata, and a short, fixed event vocabulary, not an open "describe this image" prompt. Narrow is the whole trick.

Send the easy cases to a detector, not a model

Deployment is a routing decision before it's a model decision: sensitivity of the footage, image size, task difficulty, hardware residency, and the deadline. Start with the boring baseline: motion detection plus a specialized object detector that's been doing this exact job for years. A vision-language model earns a place only once that baseline hits an ambiguous layout, a relationship between objects, or a question phrased in language rather than a bounding box. Not before.

Write down more than which model answered

Run the same visual gate locally and hosted, upload and review time included, and decide escalation conditions in writing before a false negative forces the call. Keep the original frame untouched and log every transformation applied before the model call.

An evaluation record needs more than a model name:

FieldWhy
Model ID, runtime, prompt revisionreproducibility
Dimensions, crop, resize, orientationwhat reached the model
Frame count, order, timestampssequence errors
OCR/metadata beside the pixelsreading vs seeing
Vision, input, output tokenscost accounting
First response, total latency, peak memoryreal cost
Grounded, unsupported, abstain, repairhonesty score

Log the image-detail or resolution value actually used, not the assumed default. For a local model, log the vision projector, quantization, context setting, and preprocessing code: mismatched weights and projector fail quietly while the server keeps answering fluently.

The gate that decides whether an answer ships

The acceptance gate is event precision and recall, duplicate-alert rate, latency, privacy retention, and safe abstention. Score unsupported claims separately from plain missing information: an omission gets flagged for review, but an invented serial number, UI control, trend, identity, or product attribute can trigger a wrong action. Include cases with no real answer, on purpose, and reward the model for saying the evidence isn't there.

Four rungs between a pixel and a decision

The failure that costs you is turning one ambiguous visual cue into a confident identity, hazard, or security conclusion, and it survives casual review because the answer matches what people expect. The lens-specific version cuts two ways: a local model that quietly uploads a sensitive frame to a bigger API when it's unsure, or a router that sends every thumbnail to an expensive frontier model out of habit. Require a region, a frame, or a visible feature behind every conclusion that matters, and surface that provenance instead of burying it in a log nobody opens.

Split the reasoning into four layers: observation ("a red indicator, upper right"), association ("it belongs to the network panel"), inference ("the connection has failed"), action ("restart the gateway"). Each layer needs different evidence and authority, and a plausible observation is not permission for an irreversible action.

A second frame multiplies the identity risk. Label each input and state whether it shows the same object, the same camera, or a different time period, then strip duplicate frames before they waste tokens. If order matters, attach timestamps and test a shuffled control: the same story after scrambling means it was never using the sequence.

What holds once the pipeline is running

Privacy stays hard, remote escalation stays visible, and you compare accepted visual tasks per dollar and per second, not per token, encoded in preprocessing and routing code, not prompt wording a later edit can weaken. Store the model and pipeline version with every result so upgrades replay against the same footage.

Crop irrelevant rooms, faces, screens, addresses, and reflections, and set separate retention for originals, thumbnails, OCR text, embeddings, prompts, and debug captures: a local model that never leaves your network won't protect an unencrypted disk or an over-permissioned dashboard login.

Test hosted inference, gemini-cli-multimodal included, on upload time, regional routing, retention, rate limits, and provider errors, and test a local rig like ollama-vision-local on cold-load time, projector memory, GPU placement, preprocessing time, heat, and concurrency. Compare both at p50 and p95, and stop tuning once the gate passes at an acceptable latency and cost. A bigger model with more pixels is not automatically safer: more private detail exposed, more surface for answers the evidence never supported.

I default to the local baseline and treat hosted escalation as a narrow, logged exception, accepting that the local model will occasionally miss a case a bigger one would have caught. That's the tradeoff I'm making on purpose: less peak accuracy on the hardest slice of events, for footage that stays on my network unless the pipeline explicitly decided otherwise.

#vision-models#multimodal#evaluation