A pattern is more than a label
Batech identifies eight Indonesian batik motifs from a photo, entirely in your browser: a quantized ResNet-152V2 runs on WebGPU, or WebAssembly where WebGPU isn't available, and your image never leaves the device.
It's shipped and free, built for artisans and small Indonesian businesses.
The model dates from 2023, when a team of four of us trained it and won Habibie Tech Fest.
After the win it sat as H5 files (the format Keras uses to save trained models) and never became a product. In 2026 I decided to finish it.
A winning model that no one can open isn't a product yet.
So I converted it to ONNX, quantized it to INT8, and built the interface around ONNX Runtime Web. The page downloads the model on first use, prepares your photo locally, and returns a ranked list of labels.
Batik carries centuries of regional history and meaning that a photograph can't fully convey. Batech is an educational bridge and cataloging tool for artisan communities, not a judge of cultural lineage.
Keep the image on the device
Your photo is resized and classified on your own device, and nothing is uploaded.
The usual design is the reverse: send the image to a server GPU and wait for the label. I rejected that for two reasons.
A GPU bill doesn't suit grassroots entrepreneurs and local UMKM (micro, small, and medium enterprises), and I'd rather no classification server ever saw their photos.
The image is resized to 150 × 150 RGB input. The model ranks eight labels: Bali, Betawi, Celup, Cendrawasih, Kawung, Megamendung, Parang, and Tambal.
The price is a download. The browser fetches the model on first use, and cache reuse is best-effort, so a later visit may need to fetch it again.
Would a slower first visit be worse than an upload? Not for this audience, I think.
Try a motif
Choose an image or point your camera at a batik. The model starts downloading the moment you do, so give it a moment.
Quantization made the model more than ten times smaller
The original was 818 MB.
The model the page downloads is 69.3 MiB. 818 MB is fine on a workstation and a poor deal for a web page, so I wasn't going to make every visitor wait for the original.
Here's quantization in plain terms. Picture a recipe that calls for 237.482 grams of flour. Round every amount to the nearest spoonful (close enough for cake) and the recipe gets far shorter. Usually, the cake still works.
A neural network is mostly a huge list of numbers called weights. The original stores each one as a long decimal. INT8 squeezes each into a small whole number, so the file shrinks.
The catch is precision, because rounding can cost some. This page has no evaluation numbers, so I won't claim the small model matches the big one. Like the cake, a quantized model only proves itself when you taste it.
Prefer WebGPU, but don't require it
WebGPU is a preference, so Batech works without it. If WebGPU is unsupported or inference on it fails, WebAssembly (with SIMD where supported) takes over as the WASM fallback.
Requiring WebGPU would turn every device without it into an error page.
When you pick a photo, JavaScript draws it onto a square canvas and turns the RGBA pixels into an NHWC float32 tensor (batch, height, width, channels) scaled from 0.0 to 1.0.
ONNX Runtime Web then runs that tensor on WebGPU or WebAssembly, which it offers as separate execution providers.
Choosing between them is the app's own logic, and the playground says so when the slower path takes over.
My test: when a device can't do the fast thing, does the visitor get a slower answer or an error page? I'd rather ship the slower answer.
What Batech can't do
- It guesses: the model can be wrong on mixed, unfamiliar, or cropped patterns, and a high score doesn't verify a textile's origin or cultural lineage.
- Eight labels, no more: a pattern outside the eight can only come back as one of them.
- No speed promise: WebGPU is preferred, but some operations may still run on the CPU. The fallback path is slower, and the first visit includes the model download.
- No benchmark: this page publishes no accuracy or F1 figures, so I'm not claiming any.
If a wrong label would cost someone money or trust, I treat the score as a hint and ask someone who knows the craft.
Next time a motif has you stumped, photograph it and see what Batech suggests. The photo stays on your device.
Batech began in 2023 as a team of four, under the supervision of Hasri Akbar Awal Rozaq. Thank you to Pawal Atakosi, Immalatunil Khaira Affi and Fathih Muhammad Alfi. This browser version is our work, revived.
The same keep-it-on-the-device rule shapes Trackshot, a concept for local screenshot search.