Home / Insights / AI and Machine Learning
AI and Machine Learning
Cloud, Edge or On-Device Computer Vision? How to Choose Where Your Model Runs
Where a vision model runs shapes its latency, running cost, privacy posture and how easily you can update it. This guide compares cloud, edge and on-device deployment, explains the trade-offs, and shows when a hybrid design makes sense.
TopicsAI and Machine LearningArchitecture and ModernizationMobile App Development
Key takeaways
- Decide deployment early. It constrains model size, hardware, data flows and the update process.
- Cloud is simplest to build and update but depends on connectivity and sends images off-site.
- Edge hardware suits fixed sites with strict latency or bandwidth limits, at the cost of managing devices.
- On-device inference in mobile apps works offline and keeps images on the phone, but limits model size and needs testing across devices.
- Many products use a hybrid: a small local model for fast decisions and a larger cloud model for hard cases and retraining.
On this page
Teams often treat deployment as the last step of a computer vision project: train a model, then figure out where to put it. In practice, the deployment target should be chosen near the start. A model that runs comfortably on a cloud GPU may be far too large for a phone; a design that streams video to the cloud may be unaffordable at the bandwidth a site actually has; a privacy commitment to keep images on the device rules out some architectures entirely.
Our computer vision development work deploys to cloud, edge hardware and mobile apps, and the choice is one of the decisions we settle in the first phase. This article sets out how to make it. If you are inspecting parts on a production line, our visual inspection checklist covers the wider project.
The three deployment options at a glance
| Factor | Cloud | Edge hardware | On-device (mobile) |
|---|---|---|---|
| Latency | Network round trip plus inference | Low and predictable | Low; no network needed |
| Works offline | No | Yes, within the site | Yes |
| Model size and complexity | Largest models possible | Limited by device GPU or accelerator | Most constrained; must fit phone memory and battery |
| Where images go | Leave the site or device | Stay on site unless sent on | Stay on the phone unless uploaded |
| Updating models | Deploy once, centrally | Fleet updates to devices | App updates or model downloads |
| Main cost drivers | Per-request compute, bandwidth, storage | Hardware purchase, installation, maintenance | Engineering effort for optimisation and device testing |
When cloud inference is the right choice
Cloud deployment is usually the fastest path to a working system. You can use larger models, scale up for busy periods, and update the model once for every user. It is a good fit when:
- Images arrive asynchronously and a delay of a second or more is acceptable, for example photos submitted with an insurance claim or a property inspection report.
- Volume is moderate or bursty, so paying per request is cheaper than owning hardware.
- You want to use managed vision APIs for common tasks such as text extraction or generic labelling, alongside custom models for domain-specific tasks.
- Data policies allow images to be processed by your cloud provider in the required region.
Watch for running costs with continuous video. Streaming many cameras to the cloud for frame-by-frame analysis can be expensive in both bandwidth and compute; sampling frames, or filtering at the edge first, is often necessary.
When edge hardware earns its keep
Edge deployment means running the model on a computer near the cameras: an industrial PC, a small server, or an embedded GPU module such as the NVIDIA Jetson family. It suits:
- Strict latency, such as rejecting a part on a moving line within a fraction of a second.
- Limited or unreliable connectivity at factories, warehouses, construction sites or vehicles.
- High-bandwidth video, where it is cheaper to analyse locally and send only events or summaries.
- Data residency or privacy requirements that images stay on site.
The trade-off is operational. You now manage a fleet of devices: provisioning, security patching, monitoring, remote model updates and hardware failures. Plan for remote management from day one, and for a way to capture sample images centrally for retraining. See cloud vendor lock-in for related considerations about tying edge fleets to one provider’s tooling.
When to run vision inside a mobile app
On-device inference runs the model inside an iOS or Android app using runtimes such as Core ML on Apple platforms or LiteRT (formerly TensorFlow Lite), which supports Android, iOS, web, desktop and embedded targets. It suits:
- Field work without reliable signal: inspections, stock counts, agricultural or site surveys.
- Real-time camera feedback, such as guiding a user to frame a document or product correctly before capture.
- Privacy-sensitive images that users or policies prefer not to upload.
- Reducing server costs for high-volume consumer features.
Constraints to plan for:
- Model size and speed. Models usually need to be compressed (for example through quantisation or a smaller architecture), which can reduce accuracy. Measure accuracy after optimisation, not before.
- Device variation. Performance differs across phone models, chipsets and OS versions. Test on a representative range, including older devices your users actually own.
- Battery and heat during continuous camera use.
- Updates. Decide whether models ship inside the app binary or download separately, and how you handle users who do not update.
Cross-platform frameworks such as Flutter can host on-device models across iOS and Android, but platform-specific acceleration may still need native integration. Our guide to native or cross-platform covers the wider framework decision.
Hybrid designs: combining local speed with cloud capability
Many production systems split work between tiers:
- Local filter, cloud analysis. An edge or on-device model detects when something interesting is in frame and sends only those images to a larger cloud model.
- Local decision, cloud fallback. The local model handles confident cases; low-confidence images are sent to the cloud or to a human reviewer.
- Local inference, central learning. Devices run the model offline and upload a sample of images and outcomes when connected, so the central team can monitor quality and retrain.
An illustrative example: a field inspection app runs a small on-device model to check that a photo is in focus and shows the right component, giving instant feedback to the technician. The accepted photo is then uploaded when signal allows, where a larger model assesses the condition and a supervisor reviews uncertain cases.
Questions to settle before choosing
- What is the maximum acceptable time from image capture to decision?
- Will connectivity be reliable everywhere the system is used?
- How many images or video streams, at what resolution and frame rate?
- May images leave the device or site? Do they contain faces, licence plates or personal data?
- How often will the model need updating, and who will manage devices?
- Which devices or hardware will users actually have, and what is the budget for new hardware?
- How will uncertain results be reviewed, and where will the images for that review be stored?
Answering these with the operations, security and product owners usually makes the choice clear. Where it does not, a short prototype on the candidate hardware with real images is the quickest way to resolve it.
Frequently asked questions
Is on-device inference always more private?
It keeps images on the device by default, which helps. Privacy still depends on what the app logs, uploads for retraining or support, and how that data is stored. Design and document those flows explicitly.
Can we start in the cloud and move to edge later?
Yes, and it is a common path. Choose model architectures and code structures that can be optimised for smaller hardware later, and collect data on latency and costs during the cloud phase.
Do managed vision APIs replace custom models?
For generic tasks such as text extraction or common object labels, they can. For domain-specific defects, products or conditions, a custom or fine-tuned model is usually needed. Many systems combine both.
How much accuracy do we lose by shrinking a model for phones?
It varies by task and technique. Always evaluate the optimised model on your own test set and on target devices, and set the acceptance criteria against that version.
Sources and methodology
Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.
- Google AI Edge: LiteRT overview — Supports the description of LiteRT (formerly TensorFlow Lite) as an on-device runtime and its supported platforms.
Related reading
Continue your research
Should your vision model run in the cloud, on site or on the phone?
We can assess your latency, connectivity and privacy requirements and prototype on candidate hardware with your own images before you commit.
