image-segmentation · vision · SegFormer MiT-B0 (18 ATR classes) · Transformers.js 3.7.5 WASM · q8 · 4.4 MB · MIT

SegFormer-B0 Clothes Apparel Segmentation Studio

Label every pixel across 18 clothing & body classes using Xenova/segformer_b0_clothes (upstream mattmdjaga/segformer_b0_clothes, image-segmentation, MIT, 4.38 MB onnx/model_quantized.onnx / 4.4 MB total) running 100% locally on CPU WASM via shared lib/webai.js. Click any garment on the canvas to isolate its mask and apply luminance-preserving OKLCH recoloring while strictly locking background and body regions.

Xenova/segformer_b0_clothes image-segmentation WASM · q8 · 4.4 MB [1,3,512,512] → [1,18,128,128] MIT

Interactive 18-class apparel mask & OKLCH tint canvas

SegFormer-B0 Clothes canvas stage. Initialise the model to segment garments and click regions to inspect classes.

Click any pixel on the image after inference to inspect its 18-class label, softmax confidence, and target it for OKLCH garment tinting.

Loading starter wardrobe scene…

Clickable 18-class detected labels

Initialise SegFormer-B0 Clothes above to populate clickable garment chips.

Per-class pixel coverage breakdown (0 NaN)

Run inference to inspect pixel coverage and mean softmax confidence per class.

See inside SegFormer-B0 Clothes

Raw 18-class argmax mask (model output only)

Verified ONNX model contract & architecture

HF Repo
Xenova/segformer_b0_clothes
Upstream
mattmdjaga/segformer_b0_clothes (ATR 18 classes · MIT)
Task
image-segmentation (SegformerForSemanticSegmentation)
Backbone
MiT-B0 depths [2,2,2,2], hidden [32,64,160,256], MLP 256
Quantization
q8 · onnx/model_quantized.onnx (4,384,537 B / 4.38 MB · 4.4 MB total)
Runtime
Shared lib/webai.js · Transformers.js 3.7.5 · CPU WASM Worker
Show the code — Luminance-preserving OKLCH garment tint with locked body/background (applyOklchGarmentTint)
Show the code — Off-main-thread SegFormer-B0 q8 WASM inference & bilinear logit upsampling (runSegmentation)

Explore the SegFormer-B0 Clothes use-case ladder