100% Private Skin Screening: Building an Edge AI Vision App with WebGPU and Transformers.js A developer built a browser-based skin lesion screening app that runs entirely on-device using WebGPU acceleration, Transformers.js, and WebLLM, so no images are uploaded to a server. The app loads a quantized Vision Transformer locally for image classification and uses an in-browser Llama-3-8B model to explain results in plain language, with the author noting that production deployment requires quantization to cut model size from roughly 300MB to about 80MB. What if you could screen for skin health issues without ever uploading a single photo to a corporate server? In the era of massive data breaches and privacy concerns, "sending data to the cloud" is becoming a liability, especially for sensitive medical imagery. Today, we are diving deep into the world of Edge AI and Privacy-First Machine Learning . We will build a skin lesion screening application that runs entirely in the browser using WebGPU acceleration , Transformers.js , and WebLLM . By leveraging on-device computation, we ensure that user data stays strictly within the browser sandbox. Keywords: Edge AI , WebGPU Acceleration , Privacy-Preserving AI , Transformers.js Tutorial , On-device Machine Learning . Traditional AI apps send images to a Python backend. Our approach flips the script. We download the model weights once and execute the inference locally using the user's GPU. php graph TD A User Uploads Image -- B{Browser Environment} B -- C WebGPU Tensors C -- D Transformers.js Vision Model D -- E Skin Lesion Classification E -- F WebLLM Assistant F -- G Local Privacy-First Report B -.- |No Data Transmitted| H External Internet style H fill: f96,stroke: 333,stroke-dasharray: 5 5 Before we start, ensure your browser Chrome 113+ or Edge supports WebGPU. First, we need to initialize our image classification model. We'll use a pre-trained Vision Transformer ViT fine-tuned on medical datasets. js import { pipeline, env } from '@xenova/transformers'; // Enable WebGPU if available env.allowLocalModels = false; env.useBrowserCache = true; const useSkinClassifier = = { const classifier, setClassifier = useState null ; useEffect = { const initModel = async = { // Initialize the pipeline with WebGPU execution provider const pipe = await pipeline 'image-classification', 'Xenova/vit-base-patch16-224', { device: 'webgpu', } ; setClassifier = pipe ; }; initModel ; }, ; return classifier; }; When a user selects a file, we convert it into a format Transformers.js understands without any multipart/form-data uploads. js const handleUpload = async event: React.ChangeEvent