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
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