Hi everyone,
We are working on an Angular web application. The camera and image upload functionality are already implemented, and we now need to detect whether an image contains a valid identity card.
We already have a detection model trained on Roboflow. Due to privacy and regulatory compliance requirements, we would prefer to avoid sending images to external services.
We are currently considering two options:
- Running the model directly in the browser.
- Hosting an inference server on our own infrastructure.
Has anyone worked on a similar use case? What architecture would you recommend for a production environment?
Thanks in advance for your feedback!
Hi Adriana,
Good use case, and privacy-driven “keep everything local” requirements come up a lot with ID/document scanning. Both options you listed are viable, so it really comes down to your infrastructure and performance needs.
Running in the browser: Roboflow has a JS/web inference SDK that can run models client-side, though depending on how it’s configured it may still call out to Roboflow’s cloud for inference rather than running fully offline in-browser. If your compliance requirement is “never send images off the user’s device,” you’ll want to confirm the exact execution mode before committing to this path, since browser-based inference isn’t always the same as fully local/on-device inference. Worth testing directly with your model to see how it behaves in practice.
Self-hosted inference server: this is generally the more straightforward route for privacy/compliance-sensitive production deployments. Roboflow’s inference server is Docker-based and can run entirely on your own infrastructure (on-prem, your own cloud VPC, etc.), so images never leave your network. Since you’re already dealing with an Angular frontend that has camera/upload handling, this fits naturally: your Angular app POSTs the captured image to your own inference server endpoint over your internal network, and you get the detection results back without any data touching external services. Basic self-hosted usage is free, and Roboflow explicitly supports this pattern for compliance reasons where workloads need to stay on-premises.
For a production setup specifically, I’d lean toward the self-hosted inference server:
- You get consistent performance regardless of client device (no worrying about older phones/browsers struggling with in-browser inference)
- Easier to scale, monitor, and version your model server independently of the frontend
- Clean audit story for compliance since you control the entire request path
Relevant Resources:
- Run a Model Locally - covers self-hosted inference server setup and when to use it vs. managed/dedicated deployments
- Enterprise Deployment - for on-premises, air-gapped, or Kubernetes deployment options if you need something more locked down
- Web inference-sdk - docs for the browser-based inference SDK, worth reviewing to confirm whether it meets your “no external calls” requirement
- Roboflow Enterprise / Security - role-based access and compliance details if you need to document this for regulatory purposes
Best,
Bar Shimshon