Baidu's deep-learning framework, now inside your browser tab
Paddle.js brings PaddlePaddle model inference to browsers, mini-programs, and Node.js via WebGL, WebGPU, or WASM.

What it does Paddle.js is an inference engine that runs Baidu’s PaddlePaddle deep-learning models directly in the browser. It loads pre-trained models or converts them from PaddleHub using a Python tool, then executes them via whatever hardware abstraction the runtime offers: WebGL, experimental WebGPU, WebAssembly, or a plain CPU fallback. It also targets Baidu Smartprogram, WeChat mini-programs, and Node.js (through a headless WebGL backend).
The interesting bit The project treats the browser as a first-class deployment target rather than an afterthought. It ships a modular backend system—swap WebGL for WASM depending on what’s available—and bundles ready-made model packages for OCR, human segmentation, gesture recognition, and face detection. The “don’t put models on the network” escape hatch, accepting raw Float32Array params, is a pragmatic nod to offline and privacy-sensitive use cases.
Key highlights
- Multi-backend inference: WebGL (primary), WebGPU (experimental), WASM, CPU, and NodeGL for server-side rendering
- Pre-built model libraries: OCR, human segmentation, gesture, face detection, MobileNet classification
- Converter tool (
paddlejsconverter) transforms PaddlePaddle “fluid” models to browser-friendly JSON + binary chunks - Runs in WeChat and Baidu mini-programs, not just standard browsers
- Live demo site at paddlejs.baidu.com with WebWorker support
Caveats
- WebGPU backend is explicitly marked experimental; op support varies by backend and requires checking source files
- README is functional but sparse on performance numbers or model size limits
- Community support leans heavily on Chinese channels (Bilibili tutorials, QQ group, Baidu forum)
Verdict Worth a look if you’re already invested in PaddlePaddle models and need to deploy to web or mini-programs without rewriting. Less compelling if your stack is TensorFlow or ONNX—those ecosystems have broader browser tooling.