bowespublishing commited on
Commit
56fd28c
Β·
verified Β·
1 Parent(s): 9dace56

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -10
README.md CHANGED
@@ -8,6 +8,8 @@ tags:
8
  - clip-art
9
  - print-on-demand
10
  - t-shirt-design
 
 
11
  library_name: onnxruntime
12
  pipeline_tag: image-segmentation
13
  ---
@@ -16,23 +18,33 @@ pipeline_tag: image-segmentation
16
 
17
  **Purpose-built background removal for clip art, t-shirt designs, and print-on-demand assets.**
18
 
19
- Both models trained at **1024Γ—1024** on design-specific content (not photos). Exported as INT8-quantized ONNX for browser deployment via [ONNX Runtime Web](https://onnxruntime.ai/).
20
 
21
  ## Models
22
 
23
- | File | Architecture | Size | WASM (CPU) | WebGL (GPU) |
24
- |------|-------------|------|------------|-------------|
25
- | `onnx/crispcut-fast.onnx` | MobileNetV2 + UNet (distilled) | **6.5 MB** | ~5–10s | ~1–2s |
26
- | `onnx/crispcut-quality.onnx` | EfficientNet-b5 + UNet++ + SCSE | **30.8 MB** | ~25–45s | ~5–10s |
27
 
28
  Both models:
29
- - Trained at **1024Γ—1024** resolution
30
- - INT8 dynamic quantization
31
  - ONNX opset 17
32
  - ImageNet normalisation (mean: `[0.485, 0.456, 0.406]`, std: `[0.229, 0.224, 0.225]`)
33
  - Single input tensor: `input` β€” shape `[1, 3, 1024, 1024]` (NCHW, float32)
34
  - Single output tensor: `output` β€” shape `[1, 1, 1024, 1024]` (logits β†’ apply sigmoid)
35
 
 
 
 
 
 
 
 
 
 
 
36
  ## Usage with the npm package
37
 
38
  ```bash
@@ -65,11 +77,13 @@ cut(image, { modelUrl: '/models/crispcut-fast.onnx' });
65
 
66
  ## Training Details
67
 
 
 
68
  - **Dataset:** Design-specific content (clip art, illustrations, t-shirt graphics, POD assets)
69
  - **Resolution:** 1024Γ—1024
70
- - **Fast model:** Distilled from the quality model using knowledge distillation
71
- - **Quality model:** Full EfficientNet-b5 encoder with UNet++ decoder and SCSE attention
72
- - **Quantization:** INT8 dynamic (via ONNX Runtime)
73
 
74
  ## License
75
 
 
8
  - clip-art
9
  - print-on-demand
10
  - t-shirt-design
11
+ - birefnet
12
+ - knowledge-distillation
13
  library_name: onnxruntime
14
  pipeline_tag: image-segmentation
15
  ---
 
18
 
19
  **Purpose-built background removal for clip art, t-shirt designs, and print-on-demand assets.**
20
 
21
+ Distilled from [**BiRefNet**](https://github.com/ZhengPeng7/BiRefNet) (220 M params β†’ 6.6 M params) with **~95 % quality retention**. Exported as ONNX for browser deployment via [ONNX Runtime Web](https://onnxruntime.ai/).
22
 
23
  ## Models
24
 
25
+ | File | Precision | Size | WASM (CPU) | WebGL (GPU) |
26
+ |------|-----------|------|------------|-------------|
27
+ | `onnx/crispcut-fast.onnx` | INT8 quantized | **6.5 MB** | ~5–10 s | ~1–2 s |
28
+ | `onnx/crispcut-quality.onnx` | FP32 | **25.3 MB** | ~15–25 s | ~3–6 s |
29
 
30
  Both models:
31
+ - **Architecture:** MobileNetV2 + UNet (distilled from BiRefNet)
32
+ - **Trained at 1024Γ—1024** on design-specific content
33
  - ONNX opset 17
34
  - ImageNet normalisation (mean: `[0.485, 0.456, 0.406]`, std: `[0.229, 0.224, 0.225]`)
35
  - Single input tensor: `input` β€” shape `[1, 3, 1024, 1024]` (NCHW, float32)
36
  - Single output tensor: `output` β€” shape `[1, 1, 1024, 1024]` (logits β†’ apply sigmoid)
37
 
38
+ ## Distillation Details
39
+
40
+ | | Teacher (BiRefNet) | Student (CrispCut) |
41
+ |---|---|---|
42
+ | Parameters | 220 M | 6.6 M |
43
+ | Compression | β€” | **33Γ— smaller** |
44
+ | Quality | 100 % | ~95 % |
45
+
46
+ The student model uses a MobileNetV2 encoder with a UNet decoder, trained via knowledge distillation from the full BiRefNet teacher on design-specific data.
47
+
48
  ## Usage with the npm package
49
 
50
  ```bash
 
77
 
78
  ## Training Details
79
 
80
+ - **Teacher:** BiRefNet (220 M parameters)
81
+ - **Student:** MobileNetV2 + UNet (6.6 M parameters)
82
  - **Dataset:** Design-specific content (clip art, illustrations, t-shirt graphics, POD assets)
83
  - **Resolution:** 1024Γ—1024
84
+ - **Distillation method:** Knowledge distillation with feature-level and output-level supervision
85
+ - **Fast model:** INT8 dynamic quantization (via ONNX Runtime)
86
+ - **Quality model:** Full FP32 precision
87
 
88
  ## License
89