Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit 00535d9

Browse files
author
bauratynov
committed
README: replace ASCII architecture diagram with docs/scheme.jpg
Graphic beats monospace art for the Architecture section: more legible on mobile, renders fine on GitHub + any markdown viewer, same information (input -> calibration pipeline -> runtime engine -> output). Kept a short 4-bullet prose caption under the image so the content is still searchable/accessible.
1 parent 0429049 commit 00535d9

2 files changed

Lines changed: 16 additions & 39 deletions

File tree

README.md

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -151,45 +151,22 @@ ff.close()
151151

152152
## Architecture
153153

154-
```
155-
┌───────────────────────┐ ┌───────────────────────────┐
156-
│ RGB face 112x112 │ │ Calibration pipeline │
157-
│ fp32 [-1, 1] HWC │ │ (one-shot, Python) │
158-
└──────────┬────────────┘ │ │
159-
│ │ ONNX model │
160-
│ │ ↓ │
161-
│ │ Per-channel activation │
162-
│ │ statistics on LFW calib │
163-
│ │ ↓ │
164-
│ │ p99.9 percentile + │
165-
│ │ outlier inclusion │
166-
│ │ ↓ │
167-
│ │ BN-fold + scale-fold │
168-
│ │ ↓ │
169-
│ │ w600k_r50_ffw4.bin (43M) │
170-
│ │ op_scales_v2.bin (0.2M) │
171-
│ └───────────┬───────────────┘
172-
│ │
173-
▼ ▼
174-
┌─────────────────────────────────────────────────────────────┐
175-
│ fastface_int8.exe (96 KB) │
176-
│ │
177-
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
178-
│ │ int8 Conv │ │ int8 Conv │ │ int8 Gemm │ │
179-
│ │ + BN + PReLU │→→│ + Add (res) │→→│ VNNI matvec │ │
180-
│ │ fused │ │ fused │ │ 25088 → 512 │ │
181-
│ └──────────────┘ └──────────────┘ └──────────────┘ │
182-
│ ↑ │
183-
│ Winograd F(2,3) Conv + AVX-VNNI vpdpbusd matvec │
184-
│ Per-channel INT8 activation quant + weight fold │
185-
└─────────────────────────────────────────────────────────────┘
186-
187-
188-
┌───────────────────────┐
189-
│ Embedding (512,) │
190-
│ fp32, L2-able │
191-
└───────────────────────┘
192-
```
154+
![FastFace architecture: input, calibration pipeline, runtime engine, output](docs/scheme.jpg)
155+
156+
Three boxes:
157+
158+
1. **Input** -- 112x112 RGB face, fp32 in [-1, 1], HWC layout.
159+
2. **Calibration pipeline** (offline, one-shot Python): ONNX model ->
160+
per-channel activation statistics on LFW calib faces -> p99.9
161+
percentile + outlier inclusion -> BN + scale fold -> produces
162+
`w600k_r50_ffw4.bin` (43 MB) and `op_scales_v2.bin` (0.2 MB).
163+
3. **Runtime engine** `fastface_int8.exe` (96 KB): three fused
164+
stages -- int8 Conv + BN + PReLU, int8 Conv + residual Add, int8
165+
Gemm via AVX-VNNI `vpdpbusd` matmul (25088 -> 512). Winograd
166+
F(2,3) for Conv 3x3, per-channel INT8 activation quant with
167+
weight-fold.
168+
4. **Output** -- 512-d fp32 embedding, ready to L2-normalize for
169+
cosine similarity.
193170

194171
---
195172

docs/scheme.jpg

152 KB
Loading

0 commit comments

Comments
 (0)