How I built a browser-side background remover (and benchmarked Canvas vs WebAssembly) A developer built two browser-based background removal tools—one using the Canvas API for uniform backgrounds and another using WebAssembly with an ONNX Runtime machine learning model for complex backgrounds. Benchmarking 500 product photos on a 2023 MacBook Pro, the Canvas approach processed images in 12-18 ms with 24 MB memory, while the ML model took 180-220 ms per image and 180 MB memory but handled complex backgrounds like hair and fur. I had 300 product photos sitting in a folder. White backgrounds, mostly. I needed them on transparent backgrounds for a client's Shopify store. The obvious move: upload them to some online background remover. Five minutes, done. Then I thought about it. These were unreleased product shots. Uploading them to a random server felt wrong. Plus, I'd have to do this every month when new products came in. I wanted something that ran locally. Browsers can do this now. The question was how well. There are two practical ways to remove backgrounds in the browser without sending pixels to a server: Canvas API pixel bashing. You load the image onto a