Almost every vision project reaches the same fork early: run the model on the device that holds the camera, or send images to a server and run it there. Both are valid. Picking the wrong one is expensive to undo, because it shapes the hardware, the app and the data pipeline.
Here are the five questions I ask, followed by how they played out on two of my projects.
1. Will there be a connection when it matters?
This question decides more projects than any other. If the camera is in a factory with patchy Wi-Fi, a forest yard or a moving vehicle, a cloud model means the feature simply stops working when the signal does. If the answer is "not reliably", the model goes on the device and the cloud becomes a place to sync results later.
2. How fast does the answer need to be?
A network round trip adds latency you don't control. For a person reviewing a report, a second is fine. For a production line that must trigger a buzzer before a defect passes the next roller, it isn't. Anything closing a physical loop belongs close to the camera.
3. Can the images leave the building?
Faces, medical images, a factory's process: some images should never leave the site, whatever the contract says. On-device inference sends only results, which is a much easier conversation.
4. How big does the model need to be?
A detector for one or two object types, like YOLOv8 small or nano, fits comfortably on a phone or a small GPU board. A large multimodal model does not. If the task needs open-ended understanding rather than detection, the cloud may be the only option, at least for that step.
5. How often will the model change?
Cloud models can be updated in minutes. On-device models ship with an app release or an over-the-air update. That's manageable, but you need a pipeline for it from the start, not as an afterthought.
The answer is often "both": a small model on the device makes the real-time decision, and images flagged as uncertain are uploaded later to improve the next model.
Worked example: Trrimber
Trrimber measures stacks of timber from a phone photo. Timber yards often have poor signal, so question 1 decided it immediately. The detector is YOLOv8 exported to TensorFlow Lite and runs on the phone, and the app works fully offline. Captures sync to the backend every few minutes or when the connection returns. New field photos feed a continual-training pipeline, and improved models ship in app updates, which answers question 5.
Worked example: fabric defect detection
Here the camera watches a production line and must signal hardware fast. Latency (question 2) decided it. Inference runs on a local GPU machine next to the line, and detections go over a serial link to an ESP32 that drives a buzzer. A cloud round trip would add delay and a dependency on the factory's internet for no benefit.
Costs people forget
Cloud inference looks cheap per image until you multiply by every frame of every camera, all day. On-device inference looks free until you count the engineering time for model export, testing on several phone models and an update pipeline. I write both down for a realistic month of use before deciding. The cheaper option is often not the one the team expected.
The decision table
| If… | Lean towards |
|---|---|
| Connectivity is unreliable | On-device |
| A physical action depends on the result | On-device or on-site |
| Images are sensitive | On-device |
| The task needs a very large model | Cloud, or hybrid |
| Low volume and a model that changes weekly | Cloud |
Start from where the camera lives and what happens when the network doesn't. The model choice usually follows.
