βοΈ CrispCut β AI Background Removal for Designs
Purpose-built background removal for clip art, t-shirt designs, and print-on-demand assets.
Both models trained at 1024Γ1024 on design-specific content (not photos). Exported as INT8-quantized ONNX for browser deployment via ONNX Runtime Web.
Models
| File | Architecture | Size | WASM (CPU) | WebGL (GPU) |
|---|---|---|---|---|
onnx/crispcut-fast.onnx |
MobileNetV2 + UNet (distilled) | 6.5 MB | ~5β10s | ~1β2s |
onnx/crispcut-quality.onnx |
EfficientNet-b5 + UNet++ + SCSE | 30.8 MB | ~25β45s | ~5β10s |
Both models:
- Trained at 1024Γ1024 resolution
- INT8 dynamic quantization
- ONNX opset 17
- ImageNet normalisation (mean:
[0.485, 0.456, 0.406], std:[0.229, 0.224, 0.225]) - Single input tensor:
inputβ shape[1, 3, 1024, 1024](NCHW, float32) - Single output tensor:
outputβ shape[1, 1, 1024, 1024](logits β apply sigmoid)
Usage with the npm package
npm i @crispcut/background-removal
import { cut } from '@crispcut/background-removal';
// Fast mode (default) β downloads crispcut-fast.onnx from this repo
const result = await cut(image);
img.src = result.url;
// Quality mode with GPU
const result = await cut(image, { model: 'quality', gpu: true });
Models are fetched automatically from this repo at runtime. No server needed β everything runs in the browser.
π¦ npm: @crispcut/background-removal π» GitHub: bowespublishing/crispcut
Self-hosting
Download the .onnx files from the onnx/ folder and serve them from your own CDN:
cut(image, { modelUrl: '/models/crispcut-fast.onnx' });
Training Details
- Dataset: Design-specific content (clip art, illustrations, t-shirt graphics, POD assets)
- Resolution: 1024Γ1024
- Fast model: Distilled from the quality model using knowledge distillation
- Quality model: Full EfficientNet-b5 encoder with UNet++ decoder and SCSE attention
- Quantization: INT8 dynamic (via ONNX Runtime)
License
AGPL-3.0 for open-source and personal use.
Commercial license required for closed-source or commercial products.
π© Contact: bowespublishing@gmail.com