iOS · free · your model, your machine
Tensor Camera turns your phone into a live viewfinder for a machine learning model running on your own computer. Frames go out, predictions come back, and you watch it happen in real time.
Nothing is uploaded anywhere. Your frames go to your server and nowhere else.
$ tensorcamera serve Tensor Camera server on ws://192.168.2.118:8080 model: your-classifier.keras Scan this with the app:
✓ phone connected · 15 fps · 68 ms
Why this exists
The useful questions a camera can answer are rarely grand ones. They are small, domestic and specific to you — not what is in this photo but has the dog eaten yet. No product ships that model, because the only person who wants it is you. So train it yourself, prop an old phone where it can see, and let it watch so you don't have to.
Phone on the counter, angled down at the bowl. Two labels — full and empty — are enough, and forty photos of each is enough to learn them. It tells you the moment the bowl is cleared, and nags you if it still isn't by dinner. Nobody has to remember who fed her.
When one has been missing, the waiting is the hard part. Point a phone at the step and let it watch the dark for you. It can call out loud when he's on the mat at 3am, and post to your phone at the same time, so you can sleep through the part where nothing happens.
Not was it delivered — the courier already told you that. The question is whether it's been on the step for two hours in the rain while you're out. Same model, different rule: fire on the box that has stopped being picked up.
Start with no model at all. Leave the app in collect mode for a weekend and it writes you a labelled folder of every visitor, ready for ImageFolder. Train on that, point it back out the window, and now it names them as they land.
A print that turns to spaghetti keeps extruding for six more hours if nothing is watching. One phone on a tripod, one class for spaghetti, and a webhook that hits your printer's stop endpoint. It pays for the old phone the first time it catches one.
The classic sensor problem, solved with a camera you already own and no drilling. It sees the door, not a magnet on a frame, so it keeps working when the thing you actually care about moves house.
These are all the same three things wearing different hats: a model you trained, a phone that can see the thing, and a rule that fires when the model is confident for long enough. What it is not is a finished smart-home product. The phone needs power and your Wi-Fi, it talks to a server you are running, and the model is only as good as the afternoon you spent collecting for it. The upside of every one of those constraints is the same: the frames never leave your house, and nobody can discontinue it.
How it works
Your model stays on your machine, in whatever framework you already use. The app is the eye; the protocol is the wire between them.
Wrap it in six lines of Python, or run a pretrained one with a single command. The server prints a QR code when it's ready.
Point the phone at the code on your screen. No IP addresses, no port numbers, no typing on a phone keyboard.
Frames stream to your model and predictions come straight back to the viewfinder, labelled and scored, live.
What it does
The label fills the screen so you can read it while holding the phone out at a subject. Confidence, runners-up and frame rate sit underneath. If predictions stop arriving, it says so instead of showing you a stale answer.
Build a rule in one sentence: when dog is detected above 80%, play a sound. Or speak, vibrate, flash the torch, or POST to a webhook with the label and confidence filled in. Rules run on the phone, so they keep working if the connection drops.
No server, no signal, no problem. Name a label, press start, and move around the subject while it captures. Export a folder that ImageFolder and Keras load with no preprocessing — one directory per class, exactly as they expect.
The server prints a QR code carrying its address and, if you set one, its auth token. Saved servers reconnect with one tap the next day. Works on your Wi-Fi or against a cloud box over wss://.
The wire format is documented and versioned, so the Python package is a convenience, not a requirement. If it speaks the protocol, the app talks to it — Node, Go, Rust, Java, whatever you already have your model in. Old servers keep working too: the handshake falls back for anything predating it.
Screens
Dark, high contrast, and legible over any scene the camera is pointed at.
Collect · sped up 12×
Type a label, press start, and move around the subject while it captures. The prompts keep asking for variety — closer, further, different angle, different light — because a hundred identical frames teach a model nothing.
Then type the next label and go again. Export the folder and it trains as-is.
For developers
The package handles the handshake, decodes frames to numpy, prints the QR code, and keeps the phone from sending faster than your model can think. You write the part that's actually about your model.
from tensorcamera import TensorCamera cam = TensorCamera(labels=["dog", "cat"]) @cam.on_frame def predict(frame): # frame.array -> numpy, HWC, RGB label, score = my_model(frame.array) return {"label": label, "confidence": score} cam.serve() # prints a QR code